-
Notifications
You must be signed in to change notification settings - Fork 33
Addressing
Jakob Erzar edited this page Mar 9, 2018
·
1 revision
In the following:
- five is absolute symbol (e.g., five EQU 5)
- label is relative symbol (e.g., label FIX)
Immediate addressing
- precedence order: signed absolute, pc, base
- absolute (direct): signed 12-bit operand
- LDA #5
- LDA #-42
- LDA #five
- pc-relative: signed 12-bit displacement
- LDA #label
- base-relative: unsigned 12-bit displacement
- LDA #label
- absolute extended: unsigned 20-bit operand
- +LDA #5
- +LDA #five
- +LDA #label
Indirect addressing
- precedence order: pc, base, absolute
- absolute (direct): unsigned 12-bit address
- LDA @5
- LDA @five
- pc-relative: signed 12-bit displacement
- LDA #label
- base-relative: unsigned 12-bit displacement
- LDA #label
- absolute extended: unsigned 20-bit address
- +LDA @5
- +LDA @five
- +LDA @label
Simple addressing
- precedence order: pc, base, absolute, sic absolute
- absolute (direct): unsigned 12-bit address
- LDA 5
- LDA five
- pc-relative: signed 12-bit displacement
- LDA #label
- base-relative: unsigned 12-bit displacement
- LDA #label
- sic absolute: unsigned 15 bit address
- LDA 5
- LDA five
- LDA label
- program becomes unrelocatable
- absolute extended: unsigned 20-bit address
- +LDA 5
- +LDA label
- all modes can be combined with indexed addressing