Add assembly language reference

This commit is contained in:
n loewen 2023-08-02 10:17:58 +01:00
parent 75f8bdd118
commit 086e5d630e
1 changed files with 22 additions and 0 deletions

View File

@ -56,3 +56,25 @@ Misc:
### Maybe someday
- timer (for a version in software/electronic-hardware)
## Assembly language
ADD $01 ; comments follow a `;`
ADD $FF ; this is direct addressing
ADD ($CC) ; this is indirect addressing
END ; END, CFC, and CHP don't require arguments
; (a default value of 0 will be used as their operand)
@subroutine ; create a label
ADD $01 ; (it must be on the line before the code it names)
ADD $02
JMP @subroutine ; use a label as an argument
; the label will be replaced with
; the address of the label
- Hexadecimal numbers are preceded by a `$`
- Whitespace is ignored