Return to Menu
= = = DUO BASIC ASSEMBLER AND EMULATOR = = =
Assembly

Memory

Machine State
A Register:
0
B Register:
0
PC Register:
0

= = = EXAMPLE ASSEMBLY PROGRAMS = = =

Stores 5 in A register and 7 in B register. Writes the sum of the numbers in A register.

MNZ 0 A
ADD 5 A
MNZ 7 B
ADD B A

Increments the A register forever.

MNZ 0 A
ADD 1 A
MNZ 1 PC

Add 6 + 5 + 4 + 3 + 2 + 1.

MNZ 0 A
ADD 6 A
MNZ 0 B
ADD B B
ADD 255 A
MNZ 5 PC
ADD B A
MNZ 13 PC
Return to Menu
Return to the Ostracod Pond