Ignore:
Timestamp:
Oct 14, 2020, 8:04:25 PM (4 years ago)
Author:
chronos
Message:
  • Added: New LDI and STI instruction for indexed access to memory.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/UCpu.pas

    r216 r219  
    1212    inAdd, inSub, inIn, inOut, inJump, inJumpZero, inJumpNotZero, inPush, inPop,
    1313    inCall, inRet, inAnd, inOr, inXor, inShl, inShr, inMul, inDiv, inMod,
    14     inJumpRel);
     14    inJumpRel, inLoadIndex, inStoreIndex);
    1515
    1616  TInteger = Integer;
     
    114114  Index: TInteger;
    115115  Port: TInteger;
     116  Dest: TInteger;
    116117begin
    117118  Instruction := TInstruction(ReadNext);
     
    207208      R[Index] := R[Index] mod R[ReadNext];
    208209    end;
     210    inLoadIndex: R[ReadNext] := Data[R[ReadNext] + ReadNext];
     211    inStoreIndex: Data[R[ReadNext] + ReadNext] := R[ReadNext];
    209212  end;
    210213  Inc(Ticks);
Note: See TracChangeset for help on using the changeset viewer.