Input code into the left box. Then click "Assemble Code". The Result pane will show the output after you run the assembler.
If all goes well, you will see your final code output after a line like this: "--------------------".
You can then use the "Try Code in Little Computer" button to try running the program in a Little Computer.
There is an assembly language reference at the bottom of the page. See here for more information about writing Little Computer Assembly.
There is an assembly language reference at the bottom of the page. See here for more information about writing Little Computer Assembly.
Type Assembly Here:
Result:
Instruction Guide:
Assembly | Machine Code | Instruction | Note |
---|---|---|---|
HLT | 000 | Halt | |
ADD | 1XX | Add location XX | |
SUB | 2XX | Subtract location XX | |
STA | 3XX | Store to XX | STore Accumulator |
LDA | 5XX | Load from XX | LoaD Accumulator |
BRA | 6XX | Branch always to XX | BRanch Always |
BRZ | 7XX | Branch to XX if ACC equals 0 | BRanch if Zero |
BRP | 8XX | Branch to XX if ACC >= 0 | BRanch if Positive |
INP | 901 | Get input | |
OUT | 902 | Output | |
DAT | Used to say "store data here". Examples:
|
XX indicates a two-digit memory address