by-its-argument
A program of Conditionals and packs.
main.ngp
target { region $0080 .. $00FF ram region $2000 .. $BFFF ram }
modules { "skip.asm" }
container raw
skip.asm
; Advance a zero-page pointer by a constant. There is a shortest way for each
; of them, and which one is written out is decided where the macro is used.
.macro skip p, n
.if n == 1
inc p
.elsif n == 2
inc p
inc p
.else
clc
lda p
adc #n
sta p
.endif
.endm
.proc entry
at .ztemp 1
skip at, 1
skip at, 2
skip at, 7
rts
.endp
Memory map
- phase01 zero page, 14 bytes
| Address | Bytes | Section | Module | Kind | Phases | Waits |
|---|---|---|---|---|---|---|
| $0080–$0080 | 1 | entry.at | skip | temporary | 0 | |
| $2000–$200D | 14 | entry | skip | proc | 0 |