a-value

A program of Conditionals and packs.

main.ngp

; tag constants
constants {
  NTSC = 1
}
; end constants

target { region $0080 .. $00FF ram   region $2000 .. $BFFF ram }
modules { "wait.asm" }
container raw

wait.asm

; tag value
; A second is fifty frames on one machine and sixty on the other. That is one
; number with two values, not two programs, so it is written as a value.
frames = NTSC ? 60 : 50
; end value

.section
second
        .byte frames
.ends

.proc entry
        lda second
        rts
.endp

Memory map

  1. phase00 zero page, 5 bytes
AddressBytesSectionModuleKindPhasesWaits
$2000–$20001secondwaitsection0
$2001–$20044entrywaitproc0