RAM[cell] |
Available memory (n cells, each with 4 bytes) for variables, commands and contents of stack. |
Akku |
Akku (Akkumulator) is a buffer to temporarily store results or to read parameters for binary operations. Many commands take use of Akku . |
Result |
Saves the result of a comparison. |
Port[n] |
I/O Ports to import and export values from and to differend sources and destinations |
CP |
CP (command pointer) points to the actual command line in RAM. |
SP |
SP (stack pointer) points to the next empty cell of the stack (bottom of RAM). |
BP |
BP (base pointer) points to a cell within the stack for relative accesses. |
label: |
Defines the label "label" |
CONST name value |
Defines the constant "name" with the value "value". You can use a constant everywhere where you can use a number |
LDAU n |
Akku := n |
LDAD var |
Akku := RAM[var] |
STAD var |
RAM[var] := Akku |
LEA var |
Akku := var (store address) |
IN |
Akku := Read value from the IOPort |
OUT |
Write the value of Akku to the IOPort |
IOPTU n |
IOPort := Port[n] (Specifies the IOPort to read and write) |
IOPTD var |
IOPort := Port[RAM[var]] (Specifies the IOPort to read and write) |
ADDU n |
Akku := Akku + n |
ADDD var |
Akku := Akku + RAM[var] |
SUBU n |
Akku := Akku - n |
SUBD var |
Akku := Akku - RAM[var] |
MULU n |
Akku := Akku * n |
MULD var |
Akku := Akku * RAM[var] |
DIVU n |
Akku := Akku / n |
DIVD var |
Akku := Akku / RAM[var] |
MODU n |
Akku := Akku % n |
MODD var |
Akku := Akku % RAM[var] |
ANDU n |
Akku := Akku & n |
ANDD var |
Akku := Akku & RAM[var] |
ORU n |
Akku := Akku | n |
ORDD var |
Akku := Akku | RAM[var] |
XORU n |
Akku := Akku ! n |
XORD var |
Akku := Akku ! RAM[var] |
NOT |
Akku := ~Akku |
SHLU n |
Akku := Akku << n |
SHLD var |
Akku := Akku << RAM[var] |
SHRU n |
Akku := Akku >> n |
SHRD var |
Akku := Akku >> RAM[var] |
CMPU n |
Result := Akku - n |
CMPD var |
Result := Akku - RAM[var] |
JMP lable |
CP := lable |
JP lable |
if Result > 0 then CP := lable |
JNP lable |
if Result ≤ 0 then CP := lable |
JN lable |
if Result < 0 then CP := lable |
JNN lable |
if Result ≥ 0 then CP := lable |
JZ lable |
if Result = 0 then CP := lable |
JNZ lable |
if Result ≠ 0 then CP := lable |
IF n |
if Result = 0 then CP := CP + n (Excutes the next n commands only if Result is non-zero. ATTENTION: Labels and constant definitions are not counted as commands) |
IFN n |
if Result ≠ 0 then CP := CP + n (Excutes the next n commands only if Result is zero. ATTENTION: Labels and constant definitions are not counted as commands) |
STOP |
Stops execution |
CALL lable |
RAM[SP] := CP (memorise old CP)CP := lable SP := SP - 1 |
RET |
SP := SP + 1 CP := RAM[SP] |
RETN n |
SP := SP + 1 CP := RAM[SP] SP := SP + n (n < 0 := Interrupt Return) |
NEWB |
RAM[SP] := BP BP := SP SP := SP - 1 |
OLDB |
SP := SP + 1 BP := RAM[SP] |
RES n |
SP := SP - n |
RED n |
SP := SP + n |
PUSH |
RAM[SP] := Akku SP := SP - 1 |
POP |
SP := SP + 1 Akku := RAM[SP] |
STL n |
RAM[BP + n] := Akku |
LDL n |
Akku := RAM[BP + n] |
ADL n |
Akku := Akku + RAM[BP + n] |
SBL n |
Akku := Akku - RAM[BP + n] |
CPL n |
Result := Akku - RAM[BP + n] |
STLI n |
RAM[RAM[BP + n]] := Akku |
LDLI n |
Akku := RAM[RAM[BP + n]] |
ADLI n |
Akku := Akku + RAM[RAM[BP + n]] |
SBLI n |
Akku := Akku - RAM[RAM[BP + n]] |
CPLI n |
Result := Akku - RAM[RAM[BP + n]] |