diff --git a/readme.md b/readme.md index 774f059..3345d6a 100644 --- a/readme.md +++ b/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 \ No newline at end of file