parentheses
A program of Instructions.
What the tool said
NGA0141 these parentheses group rather than indirect; `(expression,x)` is the indirect form /Users/waldek/Desktop/NGA/tutorial/12-instructions/parentheses/read.asm:21
main.ngp
target { region $0080 .. $00FF ram region $2000 .. $BFFF ram }
modules { "read.asm" }
container raw
read.asm
.section zeropage
pointer
.res 2
.ends
.section
table
.res 4
.ends
; tag four
; Four operands that begin with a parenthesis, and four different
; instructions. What each one came to is its size, and each is held to it
; below: two bytes where the parenthesis indirected, three where it grouped.
.proc entry
ldy #0
ldx #0
@a lda (pointer),y
@b lda (pointer,x)
@c lda (table)+1
@d lda (table),x
@e
rts
.assert @b - @a == 2
.assert @c - @b == 2
.assert @d - @c == 3
.assert @e - @d == 3
.endp
; end four
Memory map
- phase02 zero page, 19 bytes
| Address | Bytes | Section | Module | Kind | Phases | Waits |
|---|---|---|---|---|---|---|
| $0080–$0081 | 2 | pointer | read | section | 0 | |
| $2000–$2003 | 4 | table | read | section | 0 | |
| $2004–$2012 | 15 | entry | read | proc | 0 |