Add assembly language reference
This commit is contained in:
parent
75f8bdd118
commit
086e5d630e
22
readme.md
22
readme.md
|
|
@ -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
|
||||
Loading…
Reference in New Issue