<< >>

SpecMan4EPR system of commands allows the program to perform simple mathematical operations on the general use ax register, current time register treg, and the stack. The assembler language also supports memory addressing, conditional statements and jumps. To reduce the length of program, many commands perform a composite actions.

  Command Action Comment
0 NOP nop Empty operation
1 ADD add ax, stack; pop stack Addition
2 SUB sub ax, stack; pop stack Subtraction
3 MUL mul ax, stack; pop stack Multiplication
4 DIV div ax, stack; pop stack Division
5 IDIV idiv ax, stack; pop stack Division with rounding
6 NEG inv ax ax = -ax
7 AND and ax, stack; pop stack Logical AND
8 OR or ax, stack; pop stack Logical OR
9 LT lt ax, stack; pop stack ax = stack < ax ? 1 : 0
10 LE le ax, stack; pop stack ax = stack <= ax ? 1 : 0
11 EQ eq ax, stack; pop stack ax = stack == ax ? 1 : 0
12 NE ne ax, stack; pop stack ax = stack != ax ? 1 : 0
13 GE ge ax, stack; pop stack ax = stack >= ax ? 1 : 0
14 GT gt ax, stack; pop stack ax = stack > ax ? 1 : 0
15 NOT not ax Logical NOT
16 MOVE_A_ADDR mov ax, *ax Move to ax from memory
17 MOVE_ADDR_A mov *ax, ax Move ax to memory
18 MOVEAX_AX mov ax, [*ax+stack]; pop stack Move to ax from memory using offset from stack
19 PUSH push ax Push to stack
20 POP pop ax Pop from stack
21 JZ jz Conditional jump
22 JNZ jnz Conditional jump
23 JP jp Unconditional jump
24 PARAL_BEGIN push treg Push current time to stack
25 PARAL_END pop treg Pop current time from stack
26 PULSE treg = treg + pulselength Pulse command

<< >>