Status: Tags: Links: HACK Programming
HACK Registers and Memory
Registers
D: Data Register
- D cannot be directly set, so we have to set D = A
- But, D can be directly adjusted
A: Address/Data Register
- Be sure to differentiate between setting D and setting M
- ex) @15 (D) vs @R15 (M) M: The Currently Selected Memory Register (M=RAM[A])
Random
- Whitespace and comments are ignored
- To prevent hackers from exploting code, it’s a good idea to keep things in an infinite loop
Symbols
- R (0..15)
- SCREEN (16384)
- KBD (24576)
Examples of Register Manipulation
|
|