Memory Reference Instructions
Memory Reference instructions can directly access memory only within the Current Page (i.e. the page within which the instruction itself is stored) or within the lowest Page (i.e. Page 00, often called Zero Page, comprising Words 00/0000 to 00/1777).
But that word may contain the 16-bit address of any word in memory and the Memory Reference instruction can indirectly access that word through the "pointer". If the pointer's B17 is set, then the target word is itself a pointer and so on indefinitely. It's left to the programmer to ensure that such a chain does not form a closed loop.
Operation Code | Mnemonic | Instruction Function |
02 | JUMP | Jump unconditionally |
03 | JSBR | Jump to Subroutine |
04 | INSZ | Increment by one, Skip if result is zero |
05 | DESZ | Decrement by one, Skip if result is zero |
06 | ANDA | AND into A-Register |
07 | IORA | Inclusive OR into A-Register |
10 | XORA | Exclusive OR into A-Register |
11 | ADA | Add to A-Register |
12 | ADB | Add to B-Register |
13 | SFA | Subtract from A-Register |
14 | SFB | Subtract from B-Register |
15 | ADAC | Add to A-Register with CARRY |
16 | ADBC | Add to B-Register with CARRY |
17 | SFAC | Subtract from A-Register with CARRY |
20 | SFBC | Subtract from B-Register with CARRY |
21 | LDA | Load into A-Register |
22 | LDB | Load into B-Register |
23 | CMPA | Compare with A-Register, Skip if B17:B1 unequal (see also GT-Flag) |
24 | CMPB | Compare with B-Register, Skip if B17:B1 unequal (see also GT-Flag) |
25 | STA | Store A-Register |
26 | STB | Store B-Register |