inline

A program of Macros.

main.ngp

include "atari/130xe.ngp"
include "atari/extension.ngp"

modules { "print.asm" "run.asm" "intro.asm" "level.asm"
; tag generator
  script( "tools/rows.js", map = "maps/level1.map", width = 37, in = level ) as maps
; end generator
}

panes in ext { level }

resident { print, run }

phase intro { needs intro  then level  entry introStart }
phase level { needs level, maps  entry levelStart }
entry intro

container xex
130xe.ngp project
; An Atari 130XE: five Banks as a unit set — the four of extended memory and,
; last, the machine's own memory under the Window — the Window PORTB brings
; one of them into, every Region of the address space, and the Modules a
; program on this machine needs. It declares no storage. A program that loads
; anything during a run includes `atari/extension.ngp` beside this, which makes
; the Banks its storage. What PORTB takes to show a state is the
; driver's and not here, and the OS is two Modules rather than a Region because
; it occupies memory for a while rather than being a truth about addresses: its
; variables for the whole of a program, its ROM in every Phase that does not
; say `without osrom` — see 0229. The same register switches the ROMs, so the
; driver is what declares them.
target {
  cpu "6502"

  ; DOS loads a `.xex`, and a Project naming any other Container is refused
  ; here rather than at the writer.
  containers xex

  ; No Window has a base, so the memory under this one is a Bank like the
  ; others and nothing of the program stands there but a Pane or storage — see
  ; docs/decisions/0229-no-window-has-a-base.md.
  units  extension 5
  window ext  $4000 .. $7FFF  views extension
}

target {
  region ram    $0000 .. $CFFF  ram
  region        $D800 .. $FFFF  ram
  region stack  $0100 .. $01FF  reserved
  region io     $D000 .. $D7FF  register
  ; The RAM the OS ROM covers, named so that a Section may say `in underOsLow`
  ; and stand there: only in a Phase without `osrom`, or hidden under it where
  ; nothing needs it — see docs/decisions/0243-a-section-may-name-the-region-it-stands-in.md.
  region underOsLow   $C000 .. $CFFF  ram
  region underOsHigh  $D800 .. $FFFF  ram

  ; This machine takes a `.xex` and nothing else, and a `.xex` is loaded by a
  ; DOS, which stays where a DOS of the 2.x family stays. A Project whose DOS
  ; takes more says so with a `reserved` Region of its own, which narrows this
  ; one further.
  region dos    $0700 .. $1FFF  reserved

  ; What the driver writes. A Project that wants more of the hardware by name
  ; declares it, as it declares the memory its DOS holds.
  register PORTB  $D301

  ; The hardware that holds a Section while a program has handed it one, by
  ; `.root NAME` before the taking of its address, until it hands another or
  ; `.release NAME`: what it holds stays where it is for that long. See
  ; docs/decisions/0247-the-hardware-holds-a-section-for-as-long-as-it-is-given-it.md.
  holder dlist                          ; ANTIC's display list: SDLSTL, or DLISTL
  holder dli                            ; the display list interrupt: VDSLST
  holder vbi                            ; the immediate vertical blank: VVBLKI
  holder vbd                            ; the deferred vertical blank: VVBLKD
  holder nmi                            ; $FFFA, where the OS ROM is switched out
  holder irq                            ; $FFFE, where the OS ROM is switched out
  holder chbase                         ; the character set: CHBAS, or CHBASE
  holder pmbase                         ; the player-missile memory: PMBASE
  holder dosini                         ; DOSINI: called once a boot returns, and on every reset
}

; The OS and the driver, listed as a file of the Project's own would be. The
; driver is here and not beside the storage because it does more than read it:
; it shows a Pane's Bank and switches the ROMs, with or without storage. BASIC
; is not listed: a program that wants it lists `atari/basic.asm` and names it
; in a Phase's `needs`, and the driver switches it out everywhere else.
modules {
  "atari/osram.asm"  "atari/osrom.asm"  "atari/mathpack.asm"
  "atari/charsets.asm"  "atari/portb.asm"
}
resident { osram, osrom, mathpack, charsets, portb }
extension.ngp project
; Storage in a 130XE's extended memory, for an `atari/130xe.ngp` program: the
; Banks of the unit set `extension`, read through the Window `ext`, and the
; decoders the tool ships. A Project includes this beside the machine. The
; driver is the machine's, since it shows a Pane's Bank whether or not there is
; storage.
storage { units extension }

; Every Transition calls the decoders, so they are resident; a decoder nothing
; uses is dropped.
modules { "stream/zx0.asm" }
resident { zx0 }
osram.asm osram
; The memory the Atari OS keeps its variables in: half the zero page and the
; pages from $0200 to $06FF. Sections that hold no bytes, pinned where the OS
; keeps them, so the solver sees memory that is taken rather than a Region it may
; never allocate from. See 0038 for why what occupies memory for a while is a
; Module, and 0229 for why the OS is two of them.
;
; **Resident wherever the OS is used at all**, and not only in the Phases whose
; ROM is in: a Phase without `atari/osrom.asm` runs with the ROM switched out and
; the OS asleep, and the variables have to be as the OS left them when a later
; Phase switches it back in.
;
; Every Section here is `root`: the OS and the hardware reach them with no
; Reference in any Chunk, so nothing else would keep them. None holds bytes, so
; none has a Payload and no Transition loads one. This is the OS as an XL or XE
; ships it; a machine whose OS lives elsewhere declares a Module of its own.

.export RTCLOK, SDMCTL, SDLSTL, SDLSTH, CH

; The OS's half of the zero page. The program's own variables live above it,
; in the half the variant leaves to the solver.
.section zeropage at $0000, root
osZero
        .res $12
RTCLOK  .res 3                          ; $0012: the frame counter, three bytes
        .res $6B
.ends

; The OS's variables and buffers. The shadow registers are among them and
; are Labels here rather than registers of the variant: they are the OS's
; memory, which the OS copies to the hardware on every vertical blank, and
; a `register` Region inside this Section would be an address the Section
; may not cover.
.section absolute at $0200, root
osRam
        .res $2F
SDMCTL  .res 1                          ; $022F: shadows DMACTL
SDLSTL  .res 1                          ; $0230: the display list address, low
SDLSTH  .res 1                          ; $0231: and high
        .res $CA
CH      .res 1                          ; $02FC: the last key pressed, $FF for none
        .res $403
.ends
osrom.asm osrom
; The Atari OS ROM, in the two ranges the hardware registers leave between them,
; and the entry points a program calls in the second. Sections that hold no
; bytes, pinned where the ROM is, so that a Phase that needs this Module has
; the ranges taken and one without it has the RAM underneath — see 0229.
;
; **A ROM the driver switches out.** A variant lists this Module in `resident`,
; so every Phase has the OS unless it says `without osrom`, which the driver's
; `.driver rom osrom` is what allows; a Phase without it has the RAM under the
; ROM, its own vectors at $FFFA to look after, and no call into the OS — a
; `jsr` to an entry point below is a Reference to a Section that Phase does not
; have, and refused as one.
;
; The high range begins at **$E000 and not at $D800**: $D800-$DFFF is the
; floating-point pack, which a device on the parallel bus maps its own ROM
; over once it is selected, so it is `atari/mathpack.asm` — a Module a variant
; may leave out, and one whose absence is a fact about the machine rather than
; an omission. A variant that lists this file lists that one too, unless it
; has something else to say about those addresses.
;
; Every Section is `root`, since the OS and the hardware reach them with no
; Reference in any Chunk. This is the ROM an XL or XE ships.

.export SETVBV, XITVBV

.section absolute at $C000, root
osRomLow
        .res $1000
.ends

.section absolute at $E000, root
osRomHigh
        .res $45C
SETVBV  .res 3                          ; $E45C: A = the stage, X/Y = the routine
        .res 3
XITVBV  .res 3                          ; $E462: the end of a deferred routine
        .res $1B9B
.ends
mathpack.asm mathpack
; The floating-point routines the OS keeps at $D800-$DFFF, as a Section that
; holds no bytes, so that the solver sees memory that is taken.
;
; **A Module of its own and not part of `atari/osrom.asm`**, because this is the
; one range of the OS that something else can take away. A device on the
; parallel bus maps its ROM over the whole of it once it is selected — the
; kernel's own PBI scan says so in as many words, and looks for a device's
; identifying bytes at $D803 and $D80B, which is why the math pack must not
; begin with them. A variant for a machine whose PBI device is selected for
; the life of the program therefore does not list this file, and says what
; stands there instead.
;
; **Switched out with the OS.** On an XL the one bit of PORTB that takes the OS
; ROM out takes this out too, so a driver that switches ROMs declares it as
; `.driver rom mathpack osrom`: a Phase that needs this needs the OS's ranges
; taken as well, and cannot do without `osrom` — see 0229.
;
; Nothing is exported. The pack's entry points are documented by Atari and a
; program that calls one declares it, as it declares any address of the OS
; `atari/osrom.asm` does not name; nothing the tool ships calls into it.
;
; `root`, because the OS reaches it with no Reference in any Chunk of the
; program, and holding no bytes it has no Payload and no Transition loads it.

.section absolute at $D800, root
mathPack
        .res $800
.ends
charsets.asm charsets
; The Atari's two codes for the same letters, as Charsets.
;
; `atascii` is what the character I/O takes: the machine's own code, with the
; graphics characters where an ASCII machine keeps its control codes, and the
; letters where ASCII has them — which is why an unprefixed literal of plain
; letters has always worked and why nothing else has. `\n` is `$9B`, the end of
; line, and not `$0A`.
;
; `screen` is what the display reads out of screen memory, which is the same
; letters at other numbers. A program that writes where the display looks
; rather than through the OS wants this one.
;
; The graphics characters are written here as the Unicode the box-drawing and
; block characters have, so a picture drawn in the source is the picture the
; machine draws. A letter in inverse video is one of those too — Unicode squares
; them off in a negative, and `atascii"PRESS 🆂"` is seven bytes with the last
; one inverse. A whole line of inverse text is better asked of a Charset
; derived from this one, `.charset bright : atascii ^ $80`, which is what a
; derivation is for. Two of them have no exact Unicode: `$02` and `$0D` are a
; quarter of a cell where the nearest character is an eighth, and are written
; as `▕` and `▔`. Everything else, the inverse entries included, was read off
; the machine's own font and matches it.
;
; This Module emits nothing: it is two names and two tables.

.export atascii, screen

; tag atascii
.charset atascii
  "♥├▕┘┤┐╱╲◢▗◣▝▘▔▂▖♣┌─┼●▄▎┬┴▌└"                                       = $00
  "↑↓←→"                                                              = $1C
  " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" = $20
  "♦"                                                                 = $60
  "abcdefghijklmnopqrstuvwxyz"                                        = $61
  "♠"                                                                 = $7B
  "│"                                                                 = $7C
  "\n"                                                                = $9B

  ; Inverse video is the same glyph with the bits the other way round, which
  ; for the blocks and the triangles is another character Unicode draws. Every
  ; one of these was read off the machine's own font and is exact; the rest of
  ; the inverse half has no glyph to be written as, and is reached by adding
  ; $80 or by a Charset derived from this one.
  "▊" = $82        ; ▕
  "◤" = $88        ; ◢
  "▛" = $89        ; ▗
  "◥" = $8A        ; ◣
  "▙" = $8B        ; ▝
  "▟" = $8C        ; ▘
  "▆" = $8D        ; ▔
  "▜" = $8F        ; ▖
  "▀" = $95        ; ▄
  "▐" = $99        ; ▌
  "█" = $A0        ; the space

  ; And the letters, which Unicode squares off in a negative.
  "🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉" = $C1
.endch
; end atascii

.charset screen
  " !\"#$%&'()*+,-./0123456789:;<=>?"                                 = $00
  "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"                                 = $20
  "♥├▕┘┤┐╱╲◢▗◣▝▘▔▂▖♣┌─┼●▄▎┬┴▌└"                                       = $40
  "♦"                                                                 = $60
  "abcdefghijklmnopqrstuvwxyz"                                        = $61
  "♠"                                                                 = $7B
  "│"                                                                 = $7C

  ; The same inverses, at the display's numbers.
  "▊" = $C2
  "◤" = $C8
  "▛" = $C9
  "◥" = $CA
  "▙" = $CB
  "▟" = $CC
  "▆" = $CD
  "▜" = $CF
  "▀" = $D5
  "▐" = $D9
  "█" = $80
  "🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉" = $A1
.endch
portb.asm portb
; The storage driver for extended memory behind PORTB: the units are the
; Banks of the variant's `extension`, which a value written to PORTB brings
; into the $4000-$7FFF window — `ext` in the variant — and the stream is a
; pointer into that window that walks on to the next unit at its end. Each
; role is a macro declared with `.driver`, which the routine, the loader's
; glue, the decoders and the tool's own Procs expand where they use it as
; `nga.open`, `nga.read`, `nga.show` and `nga.showAt`. What the hardware
; calls each state of a Window is this Module's alone: `portbValues` holds
; a PORTB value per state of `ext`, one per Bank, as many as the variant's
; `extension` counts — the last of the 130XE's five being the machine's own
; memory, which no Window keeps as a base — see 0229. `PORTB` is the variant's
; register.
;
; **The same register holds the OS ROM and BASIC**, bits 0 and 1, so this
; driver is also what switches them: `.driver rom` names the Modules that are
; those ROMs, and `select` is handed the set a Phase needs and writes the two
; bits, which every switch of a Bank keeps as they are — see 0229.
;
; Resident, and outside the window — the variant lists this Module in
; `resident`, and the tool holds it outside the window the stream reads
; through.

portbWindow    = $4000
portbWindowEnd = portbWindow + $4000    ; one past the window: the high byte of the first address outside it
portbUnitPages = $40                    ; a unit, in pages: what an offset carries by

.driver open    portbOpen
.driver read    portbRead
.driver unit    portbUnit
.driver offset  portbPtr
.driver stream  ext
.driver show    ext portbShow
.driver showAt  ext portbShowAt
.driver init    portbInit
.driver finalize portbFinalize
.driver rom     osrom                   ; bit 0 of the set
.driver rom     mathpack osrom          ; bit 1, which one bit of PORTB shows with the OS
.driver rom     basic                   ; bit 2
.driver select  portbRoms
.driver mask    portbMask
.driver unmask  portbUnmask

.transform copy portbCopy

; PORTB as the program found it, kept by `init` and put back by `finalize`: the
; bits of BASIC and of the self-test are the user's, whatever the program does
; with them meanwhile, and a DOS returned to expects its machine as it left it
; — see docs/decisions/0229-no-window-has-a-base.md.
.macro portbInit
        lda PORTB
        sta portbFound
.endm

.macro portbFinalize
        lda portbFound
        sta PORTB
.endm

.section
portbFound      .res 1
.ends

; What the load wraps a switch of every ROM out in, while the DOS's interrupts
; are still on: with the OS out, $FFFA is RAM the load is writing. IRQ masked,
; and NMI, which `sei` does not reach, off at ANTIC; then back as the OS keeps
; it, the vertical blank on — see
; docs/decisions/0241-bytes-kept-for-a-later-phase-may-lie-hidden-under-a-rom.md.
NMIEN = $D40E

.macro portbMask
        sei
        lda #0
        sta NMIEN
.endm

.macro portbUnmask
        lda #$40
        sta NMIEN
        cli
.endm

.macro portbOpen
        jsr portbOpenStream
.endm

.macro portbRead
        jsr portbReadByte
.endm

; The state to show, as the tool numbers ext's states: Bank n is n.
.macro portbShow state
        ldx #state
        jsr portbBank
.endm

; X = the state to show.
.macro portbShowAt
        jsr portbBank
.endm

; A = the set of ROMs the Phase needs.
.macro portbRoms
        jsr portbSelectRoms
.endm

; PORTB per state of ext, one value per Bank. The list runs to the 130XE's
; five — four of extended memory, and then $FF, the machine's own with the
; self-test out — and the variant's count trims it, so that a variant with
; fewer Banks takes a prefix; one with more lists its values here. Every value
; has bits 0 and 1 set, which is what lets portbBank keep the ROMs' bits as
; they are with one `and` and no scratch byte.
.macro portbBankValues n, values...
.if n > 0
.match values
.case first, rest...
        .byte first
        portbBankValues n - 1, rest...
.endmatch
.endif
.endm

; The table portbBank indexes, in a Section of its own: what has an
; address stands in one, and a Proc holds code alone.
.section
portbValues
        portbBankValues extension, $E3, $E7, $EB, $EF, $FF
.ends

; The stream: where the next byte is, and which unit is in. A plain zero-page
; Section rather than Temporaries, because the value has to survive between
; one call and the next while nothing here is running. They are also the
; cells the routine writes a position into before it opens the stream,
; `portbPtr` the offset and `portbUnit` the unit.
.section zeropage
portbPtr        .res 2
portbUnit       .res 1
.ends

; X = the state of ext to show: its PORTB value, with the bits of the OS ROM
; and of BASIC left as they are, since those are what `select` said. Writes no
; memory, so that a loader running it leaves nothing behind but the register.
.proc portbBank
        lda PORTB
        ora #$FC
        and portbValues,x
        sta PORTB
        rts
.endp

; A = the set of ROMs the Phase entered needs: bit 0 `osrom`, bit 1 `mathpack`,
; bit 2 `basic`. Bit 0 of PORTB is set for the OS ROM and the floating-point
; pack, which one bit shows together, and bit 1 is clear for BASIC; the bank
; bits are left as they are. Writes no memory, the set waiting on the stack
; while the register is worked out.
.proc portbSelectRoms
        pha
        lda PORTB
        ora #$03                        ; the OS in and BASIC out, to begin with
        tax
        pla
        pha
        and #$03                        ; neither osrom nor mathpack: the OS out
        bne @os
        txa
        and #$FE
        tax
@os
        pla
        and #$04                        ; basic: BASIC in
        beq @basic
        txa
        and #$FD
        tax
@basic
        stx PORTB
        rts
.endp

; The stream to the position in portbUnit and portbPtr. An offset past the
; unit's end carries into the units after, since the routine counts on in a
; Frame without knowing where a unit ends: a unit is $4000 bytes, so the
; offset's top two bits are units.
.proc portbOpenStream
        lda portbPtr+1
@carry
        cmp #portbUnitPages
        bcc @within
        sbc #portbUnitPages
        inc portbUnit
        jmp @carry
@within
        clc
        adc #>portbWindow
        sta portbPtr+1
        ldx portbUnit
        jsr portbBank
        rts
.endp

; A = the next byte of the stream. X and Y are not preserved.
.proc portbReadByte
        ldy #0
        lda (portbPtr),y
        inc portbPtr
        bne @done
        inc portbPtr+1
        ldy portbPtr+1
        cpy #>portbWindowEnd
        bne @done
        pha
        jsr portbNextUnit
        pla
@done
        rts
.endp

; The window's end: the next unit in, and the pointer back at its start.
.proc portbNextUnit
        inc portbUnit
        ldx portbUnit
        jsr portbBank
        lda #0
        sta portbPtr
        lda #>portbWindow
        sta portbPtr+1
        rts
.endp

;  The decoder of `copy`: X/Y = the destination, the stream at the stored
; size and then the bytes. Reads the window through the pointer rather than
; through portbReadByte, which is what a driver's own decoder is for: a run at a
; time, where a run ends at the source's page end or at the size, so that
; the inner loop is `(zp),y` down to zero — the window's end is a page end,
; so a unit is never crossed inside a run.
portbDst  .ztemp 2
portbSize .ztemp 2
portbRun  .ztemp 1                      ; bytes in the run, zero for 256

.proc portbCopy
        stx portbDst
        sty portbDst+1
        jsr portbReadByte
        sta portbSize
        jsr portbReadByte
        sta portbSize+1
@run
        lda portbSize
        ora portbSize+1
        beq @done
        lda portbPtr                    ; to the end of the source's page
        eor #$FF
        clc
        adc #1
        sta portbRun
        lda portbSize+1
        bne @copy                       ; at least a page left: the run stands
        lda portbRun
        beq @cap                        ; a whole page, and less than one left
        cmp portbSize
        bcc @copy
@cap
        lda portbSize
        sta portbRun
@copy
        ldy portbRun
@byte
        dey
        lda (portbPtr),y
        sta (portbDst),y
        tya
        bne @byte
        ldx portbRun                    ; the run, as 256 where it is zero
        bne @counted
        inc portbPtr+1
        inc portbDst+1
        dec portbSize+1
        jmp @crossed
@counted
        txa
        clc
        adc portbPtr
        sta portbPtr
        bcc @source
        inc portbPtr+1
@source
        txa
        clc
        adc portbDst
        sta portbDst
        bcc @destination
        inc portbDst+1
@destination
        sec
        lda portbSize
        stx portbRun
        sbc portbRun
        sta portbSize
        bcs @crossed
        dec portbSize+1
@crossed
        lda portbPtr+1
        cmp #>portbWindowEnd
        bne @run
        jsr portbNextUnit               ; the window's end: the next unit in
        jmp @run
@done
        rts
.endp
zx0.asm zx0
; The decoder of `zx0` over any driver's stream: Einar Saukas's ZX0, version
; 2's standard forward stream, decoded as the reference dzx0.c does, driven
; by the stream's own end marker. Written here from the format, not ported:
; nothing of the reference's text is in it, and it is licensed as everything
; under lib/ is, see lib/LICENSE. Entered with X/Y = the destination and the
; stream at the stored size, which it reads past. A match is copied a byte
; at a time, forward, from what was written, which is what makes an offset
; shorter than its length — the run — come out right. Resident, and outside
; the driver's window.
;
;   zx0Bits      the bit buffer, a sentinel one above the bits still unread
;   zx0Offset    the last offset
;   zx0Length    the length in hand, or an offset's MSB while one is read
;   zx0Invert    one while an offset's MSB is read, whose data bits the
;                stream carries complemented; zero otherwise

.transform zx0 zx0Decode

zx0Dst    .ztemp 2
zx0Src    .ztemp 2
zx0Bits   .ztemp 1
zx0Offset .ztemp 2
zx0Length .ztemp 2
zx0Invert .ztemp 1

; The next bit of the stream, in A as zero or one and in the Z flag. The
; buffer holds a sentinel above the unread bits, so shifting it to nothing is
; the signal to fetch the next byte and put the sentinel back below it.
.proc zx0Bit
        asl zx0Bits
        bne @have
        nga.read
        sec                     ; the sentinel the asl shifted out, which `read` may not keep
        rol
        sta zx0Bits
@have
        lda #0
        rol
        rts
.endp

; An interlaced Elias gamma value into zx0Length: a control bit says whether
; a data bit follows, and the value begins at one. Three Procs chained by
; `then` because the value after an offset is entered with its first control
; bit already read, at zx0EliasData: the first falls through into the
; second, and the second branches into the third, which the chain is what
; allows.
.proc zx0Elias
        lda #1
        sta zx0Length
        lda #0
        sta zx0Length+1
.endp then zx0EliasMore
.proc zx0EliasMore
        jsr zx0Bit
        beq zx0EliasData        ; zero: a data bit follows
        rts
.endp then zx0EliasData
.proc zx0EliasData
        jsr zx0Bit
        eor zx0Invert
        lsr
        rol zx0Length
        rol zx0Length+1
        jmp zx0EliasMore
.endp

; One byte written: the destination moves on and the length in hand comes
; down, leaving Z set when it reaches zero.
.proc zx0Step
        inc zx0Dst
        bne @moved
        inc zx0Dst+1
@moved
        lda zx0Length
        bne @low
        dec zx0Length+1
@low
        dec zx0Length
        lda zx0Length
        ora zx0Length+1
        rts
.endp

; The length in hand copied from zx0Dst less the last offset to zx0Dst.
.proc zx0Copy
        sec
        lda zx0Dst
        sbc zx0Offset
        sta zx0Src
        lda zx0Dst+1
        sbc zx0Offset+1
        sta zx0Src+1
@byte
        ldy #0
        lda (zx0Src),y
        sta (zx0Dst),y
        inc zx0Src
        bne @from
        inc zx0Src+1
@from
        jsr zx0Step
        bne @byte
        rts
.endp

.proc zx0Decode
        stx zx0Dst
        sty zx0Dst+1
        nga.read             ; the stored size, which the end marker makes unnecessary
        nga.read
        lda #$80
        sta zx0Bits             ; an empty buffer: the sentinel alone
        lda #1
        sta zx0Offset
        lda #0
        sta zx0Offset+1         ; the last offset begins at one
        sta zx0Invert
@literals
        jsr zx0Elias
@literal
        nga.read
        ldy #0
        sta (zx0Dst),y
        jsr zx0Step
        bne @literal
        jsr zx0Bit
        bne @offset
        jsr zx0Elias            ; a match at the last offset
        jsr zx0Copy
        jsr zx0Bit
        beq @literals
@offset
        lda #1
        sta zx0Invert
        jsr zx0Elias            ; the new offset's MSB, complemented in the stream
        lda #0
        sta zx0Invert
        lda zx0Length
        beq @done               ; 256 is the end marker, and the one value with a low byte of zero
        lsr                     ; offset = MSB * 128 - LSB / 2
        sta zx0Offset+1
        lda #0
        ror
        sta zx0Offset
        nga.read
        lsr                     ; the LSB's low bit is the length's first control bit
        php
        eor #$FF
        sec
        adc zx0Offset
        sta zx0Offset
        bcs @subtracted
        dec zx0Offset+1
@subtracted
        plp
        lda #1
        sta zx0Length
        lda #0
        sta zx0Length+1
        bcs @counted            ; a control bit of one: the value is one
        jsr zx0EliasData
@counted
        inc zx0Length           ; a match at a new offset is one longer than written
        bne @copy
        inc zx0Length+1
@copy
        jsr zx0Copy
        jsr zx0Bit
        bne @offset
        jmp @literals
@done
        rts
.endp

print.asm

; The one thing both Phases need: a line on the screen, through the character
; I/O the OS opens on channel 0 before a program starts. `PUTREC` writes a
; record, so it ends the line itself.

CIOV   = $E456
ICCOM  = $0342
ICBAL  = $0344
ICBLL  = $0348
PUTREC = 9

; Both Phases call it, so both have to see the name.
.export printLine

; Where the line stands, and how long it is. Declaring where the two arguments
; are is what lets a Module of C call this one as a function.
.proc printLine
        .declare arg xy
        .declare arg a

        stx ICBAL
        sty ICBAL+1
        sta ICBLL
        lda #0
        sta ICBLL+1
        lda #PUTREC
        sta ICCOM
        ldx #0
        jsr CIOV
        rts
.endp

run.asm

; The shape every screen has: a title, and then whatever the Phase draws under
; it. Neither is here — this Module knows only that there are two of them, and
; which Phase is running it never learns.

; tag slot
.export title, draw, showScreen

.slot title, pointer, zeropage
.slot draw, vector
; end slot

; tag screen
.proc showScreen
        ldy #0
@count  lda (title),y           ; the Phase's title, as long as it turns out
        beq @print
        iny
        bne @count
@print
        tya
        ldx title
        ldy title+1
        jsr printLine
        jsr draw
        rts
.endp
; end screen

intro.asm

; tag fills
.implements title, introTitle
.implements draw, introDraw

.section
introTitle
        .byte "INTRO", 0
.ends
; end fills

.section
introText
        .byte "THE FIRST SCREEN"
introTextEnd
.ends

.proc introDraw
        ldx #<introText
        ldy #>introText
        lda #introTextEnd - introText
        jsr printLine
        rts
.endp

.proc introStart
        jsr showScreen
        .transition level
.endp

level.asm

; The map is not here any more. What is here is what draws it, and the row
; width it walks by.

levelHero = $2A                         ; `*` in ATASCII

; tag fills
.implements title, levelTitle
.implements draw, levelDraw

.section
levelTitle
        .byte "LEVEL ONE", 0
.ends
; end fills

; tag loop
; The drawing loop, as a macro rather than a Proc: a use of one is a single
; statement, which is what `.with` covers, so the whole loop runs with the Pane
; shown and there is no call to make. The bytes it works in are the user's,
; because a macro body holds instructions and data and declares nothing.
.macro drawMap at, row, left
        lda #<levelMap
        sta at
        lda #>levelMap
        sta at+1
        lda #levelRows
        sta left
        lda #0
        sta row
@line
        ldy #levelWidth - 1
@copy
        lda (at),y
        sta levelRow,y
        dey
        bpl @copy

; tag hero
        lda row                 ; where the map said the level starts
        cmp #levelStartRow
        bne @print
        lda #levelHero
        sta levelRow + levelStartColumn
; end hero
@print
        ldx #<levelRow
        ldy #>levelRow
        lda #levelWidth
        jsr printLine

        clc
        lda at
        adc #levelWidth
        sta at
        bcc @counted
        inc at+1
@counted
        inc row
        dec left
        bne @line
.endm
; end loop

; tag use
.proc levelDraw
at      .ztemp 2
row     .ztemp 1
left    .ztemp 1

        .with level
        drawMap at, row, left
        rts
.endp
; end use

.proc levelStart
        jsr showScreen
@stop   jmp @stop
.endp
maps.asm maps
.source "tools/rows.js", 1
.section absolute, in level
levelMap
.export levelMap, levelWidth, levelRows, levelStartRow, levelStartColumn
        .base64 "IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMuLi4uLi4uLi4u"
        .base64 "Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLiMjLi4uLi4uLi4uLi4uLi4uLi4uLi4u"
        .base64 "Li4uLi4uLi4uLi4uLi4jIy4uLi4uLiMjIyMjIyMjLi4uLi4uLi4uLi4uLi4uLi4u"
        .base64 "Li4uIyMuLi4uLi4jLi4uLi4uIy4uLi4uLi4uLi4uLi4uLi4uLi4uLiMjLi4uLi4u"
        .base64 "Iy4uLi4uLiMuLi4uLi4uLi4uLi4uLi4uLi4uLi4jIy4uLi4uLiMjIyMjIyMjLi4u"
        .base64 "Li4uLi4uLi4uLi4uLi4uLi4uIyMuLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u"
        .base64 "Li4uLi4uLiMjLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4jIyMj"
        .base64 "IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIw=="
levelWidth = 37
levelRows = 10
levelStartRow = 7
levelStartColumn = 15
.ends
.section absolute, in level
levelRow
.export levelRow
        .res 37
.ends
transition.asm nga.transition
ngaFramesHeld = 0
ngaUnitBytes = 1
ngaEntrySize = 4
ngaBlockSize = 6
ngaFrameHeader = 3 + ngaSelects
; The Transition routine. Called by `jsr` from a `.transition`, with the
; statement's list right behind the call: the Phase to enter, and per Phase
; the code may be in, the unit and offset where the edge's Frame waits.
; nga.open and nga.read are the driver's roles, macros of the driver's
; Module expanded here, and nga.unit and nga.offset the cells its stream
; stands in, which open reads the position from; and ngaCurrentPhase is the
; Cell the tool generates. Everything else the edge has to say waits in the
; Frame, in storage. See docs/spec/transition.md.
;
; Its zero page is Temporaries: nothing of it is needed once the routine has
; jumped to the entered Phase's entry, and a `.transition` is a jump into the
; routine, so whatever the statement's Section had on the zero page is dead by
; then too. Two Temporaries never live at once share an address — see
; docs/decisions/0034-trace.md.

.export ngaTransition

ngaPtr .ztemp 2
ngaEntry .ztemp 2
ngaDst .ztemp 2
ngaValue .ztemp 2
ngaOffset .ztemp 2
ngaFrameAt .ztemp 2 + ngaUnitBytes ; where the Frame's stream stands: the offset, then the unit
ngaWanted .ztemp 1
ngaCount .ztemp 1
ngaUnit .ztemp ngaUnitBytes

.proc ngaTransition
        pla
        sta ngaPtr
        pla
        sta ngaPtr+1            ; the return address: one below the statement's list
        ldy #1
        lda (ngaPtr),y
        sta ngaWanted           ; the Phase to enter
        iny
        lda (ngaPtr),y
        sta ngaCount            ; entries that follow
        lda ngaPtr
        clc
        adc #3
        sta ngaPtr
        bcc @scan
        inc ngaPtr+1
@scan
        lda ngaCount
        bne @check
        brk                     ; no entry for the current Phase: unreachable while the static rule holds
@check
        ldy #0
        lda (ngaPtr),y
        cmp ngaCurrentPhase
        beq @found
        lda ngaPtr              ; the next entry
        clc
        adc #ngaEntrySize
        sta ngaPtr
        bcc @skipped
        inc ngaPtr+1
@skipped
        dec ngaCount
        jmp @scan
@found
        iny
        lda (ngaPtr),y
        sta ngaFrameAt+2        ; the unit the Frame waits in
.if ngaUnitBytes > 1
        iny
        lda (ngaPtr),y
        sta ngaFrameAt+3
.endif
        iny
        lda (ngaPtr),y
        sta ngaFrameAt
        iny
        lda (ngaPtr),y
        sta ngaFrameAt+1        ; and where in it
.endp then ngaEnter

; The rest of it, and the way in for a Container that has no current Phase to
; look one up by: ngaWanted holds the Phase to enter and ngaFrameAt where
; its Frame waits. The cold start comes here — see
; docs/decisions/0216-a-car-names-its-format-and-the-cold-start-is-an-edge.md.
.export ngaEnter
.proc ngaEnter
        jsr ngaFrameOpen
.if ngaFramesHeld
        nga.read
        sta ngaPtr
        nga.read
        sta ngaPtr+1            ; where the descriptors are to be held, or zero
.endif
        nga.read
        sta ngaEntry
        nga.read
        sta ngaEntry+1
        nga.read
        sta ngaCount            ; blocks that follow
.if ngaSelects
        nga.read                ; the ROMs the entered Phase needs, switched
        nga.select              ; before a byte of it lands
.endif
        lda #ngaFrameHeader
        jsr ngaFrameSkip
.if ngaFramesHeld
        lda ngaPtr
        ora ngaPtr+1
        beq @block              ; nowhere to hold them: one open a block

; A block's bytes, read in one pass from where the stream already stands. The
; write pointer, the counter and the index are Temporaries of the routine's own
; that nothing is keeping here: ngaValue belongs to the Cell writes, which come
; after the blocks, and ngaUnit and ngaDst to a block being loaded, which has
; not begun. Only ngaPtr is really spent, being live across the whole of the
; block loop and so no longer able to share with what a driver declares — which
; is the two bytes of zero page this way of fetching costs.
        lda ngaPtr
        sta ngaValue
        lda ngaPtr+1
        sta ngaValue+1
        lda ngaCount
        sta ngaUnit             ; blocks still to hold
@hold
        lda ngaUnit
        beq @heldBlock
        lda #0
        sta ngaDst              ; the index, which a read may take out of Y
@six
        nga.read
        ldy ngaDst
        sta (ngaValue),y
        iny
        sty ngaDst
        cpy #ngaBlockSize
        bne @six
        lda #ngaBlockSize
        jsr ngaFrameSkip        ; so the Frame stands past them at the end
        lda ngaValue
        clc
        adc #ngaBlockSize
        sta ngaValue
        bcc @counted
        inc ngaValue+1
@counted
        dec ngaUnit
        jmp @hold

; Then a block at a time out of memory, and the Frame opened once more at the
; end rather than once for every one of them.
@heldBlock
        lda ngaCount
        beq @cells
        ldy #0
        lda (ngaPtr),y
        sta nga.unit            ; straight into the driver's cells: the
        iny                     ; descriptors are in memory, and nothing
.if ngaUnitBytes > 1            ; reads the stream before it is opened
        lda (ngaPtr),y
        sta nga.unit+1
        iny
.endif
        lda (ngaPtr),y
        sta nga.offset
        iny
        lda (ngaPtr),y
        sta nga.offset+1
        iny
        lda (ngaPtr),y
        sta ngaDst
        iny
        lda (ngaPtr),y
        sta ngaDst+1
        iny
        lda (ngaPtr),y
        pha                     ; the decoder's number
        lda ngaPtr
        clc
        adc #ngaBlockSize
        sta ngaPtr
        bcc @heldLoad
        inc ngaPtr+1
@heldLoad
        nga.open
        pla
        ldx ngaDst
        ldy ngaDst+1
        jsr ngaTransform
        dec ngaCount
        jmp @heldBlock
.endif

@block
        lda ngaCount
        beq @cells
        jsr ngaFrameOpen        ; back to the Frame: a block's stream replaced it
        nga.read
        sta ngaUnit
.if ngaUnitBytes > 1
        nga.read
        sta ngaUnit+1
.endif
        nga.read
        sta ngaOffset
        nga.read
        sta ngaOffset+1
        nga.read
        sta ngaDst
        nga.read
        sta ngaDst+1
        nga.read
        pha                     ; the decoder's number
        lda #ngaBlockSize
        jsr ngaFrameSkip
        lda ngaUnit             ; only now: the driver reads the Frame through
        sta nga.unit            ; these very cells, and writing them while it
.if ngaUnitBytes > 1            ; did would move the stream
        lda ngaUnit+1
        sta nga.unit+1
.endif
        lda ngaOffset
        sta nga.offset
        lda ngaOffset+1
        sta nga.offset+1
        nga.open                ; the block's stream: its stored size, then its bytes
        pla
        ldx ngaDst
        ldy ngaDst+1
        jsr ngaTransform
        dec ngaCount
        jmp @block
@cells
        jsr ngaFrameOpen
        nga.read
        sta ngaCount            ; Cell writes that follow, read in one stream
@cell
        lda ngaCount
        beq @enter
        nga.read
        sta ngaDst
        nga.read
        sta ngaDst+1
        nga.read
        sta ngaValue
        nga.read
        sta ngaValue+1
        ldy #0
        lda ngaValue
        sta (ngaDst),y          ; a Cell stands outside the driver's window
        iny
        lda ngaValue+1
        sta (ngaDst),y
        dec ngaCount
        jmp @cell
@enter
        lda ngaWanted
        sta ngaCurrentPhase     ; the Phase the program is in from here on
        jmp (ngaEntry)
.endp

; The Frame's stream, from where the routine last left it.
.proc ngaFrameOpen
        lda ngaFrameAt
        sta nga.offset
        lda ngaFrameAt+1
        sta nga.offset+1
        lda ngaFrameAt+2
        sta nga.unit
.if ngaUnitBytes > 1
        lda ngaFrameAt+3
        sta nga.unit+1
.endif
        nga.open
        rts
.endp

; A bytes on in the Frame, which is where its stream is opened next. The
; offset carries into the unit, so that a Frame running past the last offset
; a unit's number can reach goes on into the next.
.proc ngaFrameSkip
        clc
        adc ngaFrameAt
        sta ngaFrameAt
        bcc @done
        inc ngaFrameAt+1
        bne @done
        inc ngaFrameAt+2
.if ngaUnitBytes > 1
        bne @done
        inc ngaFrameAt+3
.endif
@done
        rts
.endp
cell nga.cell
ngaCurrentPhase
transforms.asm nga.transforms
; The dispatcher over the decoders the program declared, in the order the
; tool numbered them. See docs/spec/transition.md.
.export ngaSelects
ngaSelects = 1
.export ngaLoadUnit, ngaLoadMap
.section root
ngaLoadUnit
        .res 1
.ends
.proc ngaLoadMap, root
        ldx ngaLoadUnit
        nga.showAt ext
        rts
.endp
.export ngaTransform
.proc ngaTransform
        cmp #0
        bne @not0
        jmp portbCopy
@not0
        brk
.endp
init.asm nga.init
; The driver's `init`, wrapped so that a Container has an address to call.
; See docs/spec/transition.md and docs/spec/xex.md.
.export ngaInit
.proc ngaInit, root
        nga.init
        rts
.endp
finish.asm nga.finish
; Where a program that returns ends: the driver's `finalize`, then back to
; what started it. See docs/decisions/0229-no-window-has-a-base.md.
.export ngaFinish
.proc ngaFinish, root
        nga.finalize
        rts
.endp
run.asm nga.run
; How the program is started: the ROMs its entry Phase needs selected, and
; where it ends left on the stack, so that its return lands on ngaFinish
; from whichever Phase it returns. See
; docs/decisions/0229-no-window-has-a-base.md.
.export ngaRun
.proc ngaRun, root
        lda #3
        nga.select
        .own                    ; followed by the rts the program returns with
        lda #>( ngaFinish - 1 )
        pha
        .own
        lda #<( ngaFinish - 1 )
        pha
        jmp nga.entry
.endp

Memory map

  1. intro145 zero page, 16235 bytes
  2. level145 zero page, 16262 bytes
AddressBytesSectionModuleKindPhasesWaits
$0000–$007F128osZeroosramsection0..1
$0080–$00823portbPtrportbsection0..1
$0083–$00842ngaDstnga.transitiontemporary0..1
$0083–$00842ngaPtrnga.transitiontemporary0..1
$0083–$00842portbDstportbtemporary0..1
$0085–$00862ngaOffsetnga.transitiontemporary0..1
$0085–$00862ngaValuenga.transitiontemporary0..1
$0085–$00862portbSizeportbtemporary0..1
$0087–$00871ngaUnitnga.transitiontemporary0..1
$0087–$00871portbRunportbtemporary0..1
$0088–$00892ngaEntrynga.transitiontemporary0..1
$008A–$008C3ngaFrameAtnga.transitiontemporary0..1
$008D–$008D1ngaWantednga.transitiontemporary0..1
$008E–$008E1ngaCountnga.transitiontemporary0..1
$008F–$00902titlenga.slotssection0..1
$0200–$06FF1280osRamosramsection0..1
$2000–$20001portbFoundportbsection0..1
$2001–$20055portbValuesportbsection0..1
$2006–$201112portbBankportbproc0..1
$2012–$202F30portbSelectRomsportbproc0..1
$2030–$204724portbOpenStreamportbproc0..1
$2048–$205D22portbReadByteportbproc0..1
$205E–$206D16portbNextUnitportbproc0..1
$206E–$20DF114portbCopyportbproc0..1
$20E0–$20F825printLineprintproc0..1
$20F9–$210D21showScreenrunproc0..1
$210E–$21136introTitleintrosection0
$2114–$212316introTextintrosection0
$2124–$212D10introDrawintroproc0
$212E–$213912introStartintroproc0
$213A–$214714ngaRunnga.runproc0
$2163–$21AB73ngaTransitionnga.transitionproc0..1
$21AC–$2245154ngaEnternga.transitionproc0..1
$2246–$225516ngaFrameOpennga.transitionproc0..1
$2256–$226314ngaFrameSkipnga.transitionproc0..1
$2264–$22641ngaCurrentPhasenga.cellsection0..1
$2265–$22673drawnga.slotssection0..1
$2268–$22681ngaLoadUnitnga.transformssection0..1
$2269–$226F7ngaLoadMapnga.transformsproc0..1
$2270–$22778ngaTransformnga.transformsproc0..1
$2278–$227E7ngaInitnga.initproc0..1
$227F–$22857ngaFinishnga.finishproc0..1
$4000–$4171370levelMapmapssection0..1
$C000–$CFFF4096osRomLowosromsection0..1
$D800–$DFFF2048mathPackmathpacksection0..1
$E000–$FFFF8192osRomHighosromsection0..1
$0083–$00842levelDraw.atleveltemporary1
$0085–$00851levelDraw.rowleveltemporary1
$0086–$00861levelDraw.leftleveltemporary1
$210E–$211710levelTitlelevelsection1bank 0 +$001F (copy, 12 B)
$2118–$215C69levelDrawlevelproc1bank 0 +$002B (copy, 71 B)
$215D–$21626levelStartlevelproc1bank 0 +$0072 (copy, 8 B)
$4172–$419637levelRowmapssection1

The xex

1179 bytes, 14 segments, 0 unaccounted.

02container header
$2001–$2139 313 bytes at 2
$20015portb.portbValuesportb.asm
$20063portb.portbBankportb.asm
$20092portb.portbBankportb.asm
$200B3portb.portbBankportb.asm
$200E3portb.portbBankportb.asm
$20111portb.portbBankportb.asm
$20121portb.portbSelectRomsportb.asm
$20133portb.portbSelectRomsportb.asm
$20162portb.portbSelectRomsportb.asm
$20181portb.portbSelectRomsportb.asm
$20191portb.portbSelectRomsportb.asm
$201A1portb.portbSelectRomsportb.asm
$201B2portb.portbSelectRomsportb.asm
$201D2portb.portbSelectRomsportb.asm
$201F1portb.portbSelectRomsportb.asm
$20202portb.portbSelectRomsportb.asm
$20221portb.portbSelectRomsportb.asm
$20231portb.portbSelectRomsportb.asm
$20242portb.portbSelectRomsportb.asm
$20262portb.portbSelectRomsportb.asm
$20281portb.portbSelectRomsportb.asm
$20292portb.portbSelectRomsportb.asm
$202B1portb.portbSelectRomsportb.asm
$202C3portb.portbSelectRomsportb.asm
$202F1portb.portbSelectRomsportb.asm
$20302portb.portbOpenStreamportb.asm
$20322portb.portbOpenStreamportb.asm
$20342portb.portbOpenStreamportb.asm
$20362portb.portbOpenStreamportb.asm
$20382portb.portbOpenStreamportb.asm
$203A3portb.portbOpenStreamportb.asm
$203D1portb.portbOpenStreamportb.asm
$203E2portb.portbOpenStreamportb.asm
$20402portb.portbOpenStreamportb.asm
$20422portb.portbOpenStreamportb.asm
$20443portb.portbOpenStreamportb.asm
$20471portb.portbOpenStreamportb.asm
$20482portb.portbReadByteportb.asm
$204A2portb.portbReadByteportb.asm
$204C2portb.portbReadByteportb.asm
$204E2portb.portbReadByteportb.asm
$20502portb.portbReadByteportb.asm
$20522portb.portbReadByteportb.asm
$20542portb.portbReadByteportb.asm
$20562portb.portbReadByteportb.asm
$20581portb.portbReadByteportb.asm
$20593portb.portbReadByteportb.asm
$205C1portb.portbReadByteportb.asm
$205D1portb.portbReadByteportb.asm
$205E2portb.portbNextUnitportb.asm
$20602portb.portbNextUnitportb.asm
$20623portb.portbNextUnitportb.asm
$20652portb.portbNextUnitportb.asm
$20672portb.portbNextUnitportb.asm
$20692portb.portbNextUnitportb.asm
$206B2portb.portbNextUnitportb.asm
$206D1portb.portbNextUnitportb.asm
$206E2portb.portbCopyportb.asm
$20702portb.portbCopyportb.asm
$20723portb.portbCopyportb.asm
$20752portb.portbCopyportb.asm
$20773portb.portbCopyportb.asm
$207A2portb.portbCopyportb.asm
$207C2portb.portbCopyportb.asm
$207E2portb.portbCopyportb.asm
$20802portb.portbCopyportb.asm
$20822portb.portbCopyportb.asm
$20842portb.portbCopyportb.asm
$20861portb.portbCopyportb.asm
$20872portb.portbCopyportb.asm
$20892portb.portbCopyportb.asm
$208B2portb.portbCopyportb.asm
$208D2portb.portbCopyportb.asm
$208F2portb.portbCopyportb.asm
$20912portb.portbCopyportb.asm
$20932portb.portbCopyportb.asm
$20952portb.portbCopyportb.asm
$20972portb.portbCopyportb.asm
$20992portb.portbCopyportb.asm
$209B2portb.portbCopyportb.asm
$209D1portb.portbCopyportb.asm
$209E2portb.portbCopyportb.asm
$20A02portb.portbCopyportb.asm
$20A21portb.portbCopyportb.asm
$20A32portb.portbCopyportb.asm
$20A52portb.portbCopyportb.asm
$20A72portb.portbCopyportb.asm
$20A92portb.portbCopyportb.asm
$20AB2portb.portbCopyportb.asm
$20AD2portb.portbCopyportb.asm
$20AF3portb.portbCopyportb.asm
$20B21portb.portbCopyportb.asm
$20B31portb.portbCopyportb.asm
$20B42portb.portbCopyportb.asm
$20B62portb.portbCopyportb.asm
$20B82portb.portbCopyportb.asm
$20BA2portb.portbCopyportb.asm
$20BC1portb.portbCopyportb.asm
$20BD1portb.portbCopyportb.asm
$20BE2portb.portbCopyportb.asm
$20C02portb.portbCopyportb.asm
$20C22portb.portbCopyportb.asm
$20C42portb.portbCopyportb.asm
$20C61portb.portbCopyportb.asm
$20C72portb.portbCopyportb.asm
$20C92portb.portbCopyportb.asm
$20CB2portb.portbCopyportb.asm
$20CD2portb.portbCopyportb.asm
$20CF2portb.portbCopyportb.asm
$20D12portb.portbCopyportb.asm
$20D32portb.portbCopyportb.asm
$20D52portb.portbCopyportb.asm
$20D72portb.portbCopyportb.asm
$20D93portb.portbCopyportb.asm
$20DC3portb.portbCopyportb.asm
$20DF1portb.portbCopyportb.asm
$20E03print.printLineprint.asm
$20E33print.printLineprint.asm
$20E63print.printLineprint.asm
$20E92print.printLineprint.asm
$20EB3print.printLineprint.asm
$20EE2print.printLineprint.asm
$20F03print.printLineprint.asm
$20F32print.printLineprint.asm
$20F53print.printLineprint.asm
$20F81print.printLineprint.asm
$20F92run.showScreenrun.asm
$20FB2run.showScreenrun.asm
$20FD2run.showScreenrun.asm
$20FF1run.showScreenrun.asm
$21002run.showScreenrun.asm
$21021run.showScreenrun.asm
$21032run.showScreenrun.asm
$21052run.showScreenrun.asm
$21073run.showScreenrun.asm
$210A3run.showScreenrun.asm
$210D1run.showScreenrun.asm
$210E6intro.introTitleintro.asm
$211416intro.introTextintro.asm
$21242intro.introDrawintro.asm
$21262intro.introDrawintro.asm
$21282intro.introDrawintro.asm
$212A3intro.introDrawintro.asm
$212D1intro.introDrawintro.asm
$212E3intro.introStartintro.asm
$21319intro.introStartintro.asm
$2163–$2264 258 bytes at 319
$21631nga.transition.ngaTransitiontransition.asm
$21642nga.transition.ngaTransitiontransition.asm
$21661nga.transition.ngaTransitiontransition.asm
$21672nga.transition.ngaTransitiontransition.asm
$21692nga.transition.ngaTransitiontransition.asm
$216B2nga.transition.ngaTransitiontransition.asm
$216D2nga.transition.ngaTransitiontransition.asm
$216F1nga.transition.ngaTransitiontransition.asm
$21702nga.transition.ngaTransitiontransition.asm
$21722nga.transition.ngaTransitiontransition.asm
$21742nga.transition.ngaTransitiontransition.asm
$21761nga.transition.ngaTransitiontransition.asm
$21772nga.transition.ngaTransitiontransition.asm
$21792nga.transition.ngaTransitiontransition.asm
$217B2nga.transition.ngaTransitiontransition.asm
$217D2nga.transition.ngaTransitiontransition.asm
$217F2nga.transition.ngaTransitiontransition.asm
$21812nga.transition.ngaTransitiontransition.asm
$21831nga.transition.ngaTransitiontransition.asm
$21842nga.transition.ngaTransitiontransition.asm
$21862nga.transition.ngaTransitiontransition.asm
$21883nga.transition.ngaTransitiontransition.asm
$218B2nga.transition.ngaTransitiontransition.asm
$218D2nga.transition.ngaTransitiontransition.asm
$218F1nga.transition.ngaTransitiontransition.asm
$21902nga.transition.ngaTransitiontransition.asm
$21922nga.transition.ngaTransitiontransition.asm
$21942nga.transition.ngaTransitiontransition.asm
$21962nga.transition.ngaTransitiontransition.asm
$21982nga.transition.ngaTransitiontransition.asm
$219A3nga.transition.ngaTransitiontransition.asm
$219D1nga.transition.ngaTransitiontransition.asm
$219E2nga.transition.ngaTransitiontransition.asm
$21A02nga.transition.ngaTransitiontransition.asm
$21A21nga.transition.ngaTransitiontransition.asm
$21A32nga.transition.ngaTransitiontransition.asm
$21A52nga.transition.ngaTransitiontransition.asm
$21A71nga.transition.ngaTransitiontransition.asm
$21A82nga.transition.ngaTransitiontransition.asm
$21AA2nga.transition.ngaTransitiontransition.asm
$21AC3nga.transition.ngaEntertransition.asm
$21AF3nga.transition.ngaEntertransition.asm
$21B22nga.transition.ngaEntertransition.asm
$21B43nga.transition.ngaEntertransition.asm
$21B72nga.transition.ngaEntertransition.asm
$21B93nga.transition.ngaEntertransition.asm
$21BC2nga.transition.ngaEntertransition.asm
$21BE3nga.transition.ngaEntertransition.asm
$21C13nga.transition.ngaEntertransition.asm
$21C42nga.transition.ngaEntertransition.asm
$21C63nga.transition.ngaEntertransition.asm
$21C92nga.transition.ngaEntertransition.asm
$21CB2nga.transition.ngaEntertransition.asm
$21CD3nga.transition.ngaEntertransition.asm
$21D03nga.transition.ngaEntertransition.asm
$21D32nga.transition.ngaEntertransition.asm
$21D53nga.transition.ngaEntertransition.asm
$21D82nga.transition.ngaEntertransition.asm
$21DA3nga.transition.ngaEntertransition.asm
$21DD2nga.transition.ngaEntertransition.asm
$21DF3nga.transition.ngaEntertransition.asm
$21E22nga.transition.ngaEntertransition.asm
$21E43nga.transition.ngaEntertransition.asm
$21E72nga.transition.ngaEntertransition.asm
$21E93nga.transition.ngaEntertransition.asm
$21EC1nga.transition.ngaEntertransition.asm
$21ED2nga.transition.ngaEntertransition.asm
$21EF3nga.transition.ngaEntertransition.asm
$21F22nga.transition.ngaEntertransition.asm
$21F42nga.transition.ngaEntertransition.asm
$21F62nga.transition.ngaEntertransition.asm
$21F82nga.transition.ngaEntertransition.asm
$21FA2nga.transition.ngaEntertransition.asm
$21FC2nga.transition.ngaEntertransition.asm
$21FE3nga.transition.ngaEntertransition.asm
$22011nga.transition.ngaEntertransition.asm
$22022nga.transition.ngaEntertransition.asm
$22042nga.transition.ngaEntertransition.asm
$22063nga.transition.ngaEntertransition.asm
$22092nga.transition.ngaEntertransition.asm
$220B3nga.transition.ngaEntertransition.asm
$220E3nga.transition.ngaEntertransition.asm
$22113nga.transition.ngaEntertransition.asm
$22142nga.transition.ngaEntertransition.asm
$22162nga.transition.ngaEntertransition.asm
$22182nga.transition.ngaEntertransition.asm
$221A3nga.transition.ngaEntertransition.asm
$221D2nga.transition.ngaEntertransition.asm
$221F3nga.transition.ngaEntertransition.asm
$22222nga.transition.ngaEntertransition.asm
$22243nga.transition.ngaEntertransition.asm
$22272nga.transition.ngaEntertransition.asm
$22293nga.transition.ngaEntertransition.asm
$222C2nga.transition.ngaEntertransition.asm
$222E2nga.transition.ngaEntertransition.asm
$22302nga.transition.ngaEntertransition.asm
$22322nga.transition.ngaEntertransition.asm
$22341nga.transition.ngaEntertransition.asm
$22352nga.transition.ngaEntertransition.asm
$22372nga.transition.ngaEntertransition.asm
$22392nga.transition.ngaEntertransition.asm
$223B3nga.transition.ngaEntertransition.asm
$223E2nga.transition.ngaEntertransition.asm
$22403nga.transition.ngaEntertransition.asm
$22433nga.transition.ngaEntertransition.asm
$22462nga.transition.ngaFrameOpentransition.asm
$22482nga.transition.ngaFrameOpentransition.asm
$224A2nga.transition.ngaFrameOpentransition.asm
$224C2nga.transition.ngaFrameOpentransition.asm
$224E2nga.transition.ngaFrameOpentransition.asm
$22502nga.transition.ngaFrameOpentransition.asm
$22523nga.transition.ngaFrameOpentransition.asm
$22551nga.transition.ngaFrameOpentransition.asm
$22561nga.transition.ngaFrameSkiptransition.asm
$22572nga.transition.ngaFrameSkiptransition.asm
$22592nga.transition.ngaFrameSkiptransition.asm
$225B2nga.transition.ngaFrameSkiptransition.asm
$225D2nga.transition.ngaFrameSkiptransition.asm
$225F2nga.transition.ngaFrameSkiptransition.asm
$22612nga.transition.ngaFrameSkiptransition.asm
$22631nga.transition.ngaFrameSkiptransition.asm
$22641nga.cell.ngaCurrentPhase
$008F–$0090 2 bytes at 581
$008F2nga.slots.titlerun.asm
$2265–$2267 3 bytes at 587
$22653nga.slots.drawrun.asm
$2269–$2285 29 bytes at 594
$22693nga.transforms.ngaLoadMaptransforms.asm
$226C3nga.transforms.ngaLoadMaptransforms.asm
$226F1nga.transforms.ngaLoadMaptransforms.asm
$22702nga.transforms.ngaTransformtransforms.asm
$22722nga.transforms.ngaTransformtransforms.asm
$22743nga.transforms.ngaTransformtransforms.asm
$22771nga.transforms.ngaTransformtransforms.asm
$22786nga.init.ngaInitinit.asm
$227E1nga.init.ngaInitinit.asm
$227F6nga.finish.ngaFinishfinish.asm
$22851nga.finish.ngaFinishfinish.asm
$213A–$2147 14 bytes at 627
$213A2nga.run.ngaRunrun.asm
$213C3nga.run.ngaRunrun.asm
$213F2nga.run.ngaRunrun.asm
$21411nga.run.ngaRunrun.asm
$21422nga.run.ngaRunrun.asm
$21441nga.run.ngaRunrun.asm
$21453nga.run.ngaRunrun.asm
$02E2–$02E3 2 bytes at 645
$02E22initad
$2268–$2268 1 bytes at 651
$22681nga.transforms.ngaLoadUnittransforms.asm
$02E2–$02E3 2 bytes at 656
$02E22initad
$4000–$4079 122 bytes at 662
$4000122storage image
$2268–$2268 1 bytes at 788
$22681nga.transforms.ngaLoadUnittransforms.asm
$02E2–$02E3 2 bytes at 793
$02E22initad
$4000–$4171 370 bytes at 799
$400048maps.levelMapmaps.asm
$403048maps.levelMapmaps.asm
$406048maps.levelMapmaps.asm
$409048maps.levelMapmaps.asm
$40C048maps.levelMapmaps.asm
$40F048maps.levelMapmaps.asm
$412048maps.levelMapmaps.asm
$415034maps.levelMapmaps.asm
$02E0–$02E1 2 bytes at 1173
$02E02runad