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

  1. phase02 zero page, 19 bytes
AddressBytesSectionModuleKindPhasesWaits
$0080–$00812pointerreadsection0
$2000–$20034tablereadsection0
$2004–$201215entryreadproc0