Source

simple-cpu / op-codes.txt

Simple CPU Simulator -- included CPU OP-CODES:

INT:
  byte-code: 1
  Next byte should be the interrupt to call.
  See the sample-interrupts.txt for list of possible interrupts.
AX:
  byte-code: 2
  AX register is set to the next read byte in memory.
BX:
  byte-code: 3
  BX register is set to the next read byte in memory.
CX:
  byte-code: 4
  CX register is set to the next read byte in memory.
DX:
  byte-code: 5
  DX register is set to the next read byte in memory.
JMP:
  byte-code: 6
  Set CPU Memory pointer to the next read byte in memory.
PUSH:
  byte-code: 7
  Store the current CPU Memory pointer for a later use.
POP:
  byte-code: 8
  Restore the previously stored CPU Memory pointer.
CALL:
  byte-code: 9
  PUSHes the next to execute CPU Memory pointer, then performs a JMP using the next read byte.
CX++:
  byte-code: 10
  Increments CX by 1.
CX--:
  byte-code: 11
  Decreases CX by 1.
ADDCX:
  byte-code: 12
  Increments CX by the next read byte.
SUBCX:
  byte-code: 13
  Decreases CX by the next read byte.
USE:
  byte-code: 14
  Sets CX to the byte stored at CPU Memory pointer stored in CX...
  I know it sounds confusing, and it sort of is.  It's used with the IFs mainly.
IF=:
  byte-code: 15
  If CX equals the value in the next read byte, then set the CPU Memory pointer to DX.
IF!:
  byte-code: 16
  If CX does not equals the value in the next read byte, then set the CPU Memory pointer to DX.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.