Ignore:
Timestamp:
Aug 1, 2024, 11:47:03 PM (3 months ago)
Author:
chronos
Message:
  • Added: More instructions implemented.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bigint/Instructions.pas

    r4 r7  
    77
    88type
    9   TParamType = (ptNone, ptNumber, ptIndirect);
     9  TParamType = (ptNone, ptNumber, ptIndirect, ptIndirect2);
    1010  TParamTypeArray = array of TParamType;
    1111
     
    7474  AddNew(inHalt, 'HALT', [], 'It terminates program execution and halts processor. Processor can be waked up by interrupt.');
    7575  AddNew(inLoadConst, 'LDC', [ptIndirect, ptNumber], 'Loads constant into address location.');
    76   AddNew(inLoad, 'LD', [ptIndirect, ptIndirect], 'Copies value from one register to another.');
     76  AddNew(inLoadIndex, 'LDI', [ptIndirect, ptIndirect, ptNumber], 'Loads value from one memory location with added relative index to another.');
     77  AddNew(inLoad, 'LD', [ptIndirect, ptIndirect], 'Loads value from one memory location to another.');
     78  AddNew(inLoadMem, 'LDM', [ptIndirect, ptIndirect2], 'Loads value from one indirect memory location to another.');
     79  AddNew(inStoreMem, 'STM', [ptIndirect2, ptIndirect], 'Stotes value to indirect memory location from source location.');
    7780  AddNew(inInc, 'INC', [ptIndirect], 'Increments value in specified register.');
    7881  AddNew(inDec, 'DEC', [ptIndirect], 'Decrements value in specified register.');
     
    8285  AddNew(inJumpZero, 'JPZ', [ptIndirect, ptNumber], 'Jumps to given address if value of register is zero');
    8386  AddNew(inJumpNotZero, 'JPNZ', [ptIndirect, ptNumber], 'Jumps to given address if value of register is not zero');
     87  AddNew(inPush, 'PUSH', [ptIndirect], 'Push memory location onto stack.');
     88  AddNew(inPop, 'POP', [ptIndirect], 'Pop item from stack and store it into memory location.');
     89  AddNew(inCall, 'CALL', [ptNumber], 'Call subroutine.');
     90  AddNew(inRet, 'RET', [], 'Return from subrotine.');
    8491end;
    8592
Note: See TracChangeset for help on using the changeset viewer.