You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
714 B
20 lines
714 B
; blink (from the membership card manual by Lee Hart) |
|
; 1802 machine code |
|
; This program makes use of some basic building blocks like |
|
; jumps, conditional jumps, decrements, and immediate loading. |
|
|
|
; Memory address, command in hexadecimal, mnemonic, comment |
|
|
|
0 F8 LDI Load immediate... |
|
1 02 2 ...the value 2 |
|
2 A2 PLO R2 Put it in the lower part of register 2 |
|
3 22 DEC R2 Decrement register 2 by one |
|
4 82 GLO R2 Load the lower part of register 2 |
|
5 3A BNZ Branch if that is not zero... |
|
6 03 3 ...to address 3 |
|
7 CD LSQ Long skip (skip two next) if Q=1 |
|
8 7B SEQ Set Q to 1 |
|
9 38 SKP Skip next |
|
A 7A REQ Set Q to 0 |
|
B 30 BR Branch... |
|
C 00 0 ...to address 0 |