Ignore:
Timestamp:
Aug 9, 2018, 9:45:07 AM (6 years ago)
Author:
chronos
Message:
  • Added: More processor instructions.
Location:
branches/virtcpu fixed int
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/virtcpu fixed int

    • Property svn:ignore
      •  

        old new  
        33virtcpu.lps
        44virtcpu.res
         5*.dbg
  • branches/virtcpu fixed int/UFormMain.pas

    r163 r165  
    7272    AddOut(0, 1);
    7373    AddInc(2);
    74     AddJr(LabelStart);
     74    AddJump(LabelStart);
    7575    AddHalt;
    7676  end;
     
    154154function TForm1.CpuInput(Port: T): T;
    155155begin
     156  Result := 0;
    156157  case Port of
    157158    0: begin
     
    162163      if Length(KeyInputBuffer) > 0 then begin
    163164        Result := Ord(KeyInputBuffer[0]);
    164         Move(KeyInputBuffer[1], KeyInputBuffer[0], Length(KeyInputBuffer) - 1);
     165        if Length(KeyInputBuffer) > 1 then
     166          Move(KeyInputBuffer[1], KeyInputBuffer[0], Length(KeyInputBuffer) - 1);
    165167        SetLength(KeyInputBuffer, Length(KeyInputBuffer) - 1);
    166168      end else Result := 0;
Note: See TracChangeset for help on using the changeset viewer.