sum
A program of The Project and Modules.
main.ngp
modules { "sum.asm" }
sum.asm
.section
total
.res 1
.ends
.proc entry
lda #0
ldx #4
@add clc
adc numbers,x
dex
bpl @add
sta total
rts
.endp
.section
numbers
.byte 3, 1, 4, 1, 5
.ends
Memory map
- phase00 zero page, 21 bytes
| Address | Bytes | Section | Module | Kind | Phases | Waits |
|---|---|---|---|---|---|---|
| $2000–$2000 | 1 | total | sum | section | 0 | |
| $2001–$200F | 15 | entry | sum | proc | 0 | |
| $2010–$2014 | 5 | numbers | sum | section | 0 |