Pulse Assembler
Assembler: a low-level programming language for a computer, in which there is a very strong correspondence between the language and the architecture's machine code instructions.
Virtual machine: an emulation of a particular or hypothetical computer system.
SpecMan4EPR Assembler is executed on the Virtual Machine that has two registers: ax register, internal time counter register treg, and the stack. The Assembler supports memory addressing, conditional statements, cycles and jumps. To reduce the length of program, many assembler commands perform 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 | Print ax value | ||
| 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 |
| 27 | RepStart | Beginning of repetition on hardware | |
| 28 | RepEnd | End of repetition on hardware | |
| 29 | TIMEZERO | AWG engine and detection phase related | |
| 30 | REFERENCE | Detection phase related | |
| 31 | Round | Function |
See also

