Prev: 5BAB Up: Map Next: 5CB0
5C00: The system variables
The ROM's system variables, as the BASIC loader left them. The game reads only two of them, and both were loaded from the tape rather than set by the ROM. FRAMES, from the tape's last block: the game checks its middle byte (START, the first of the three protection checks) and starts its turn counter from it at every new game (NEW_GAME); since interrupts stay off from the loader on, FRAMES never counts on, and every game starts its counter from the same value. And NMIADD (NMIADD), where the tape put the JP (HL) the game dispatches through.
SYSTEM_VARIABLES 5C00 DEFB $FF,$00,$00,$00,$FF,$00,$23,$0D KSTATE to SEED
5C08 DEFB $0D,$23,$05,$00,$00,$00,$16,$13
5C10 DEFB $01,$00,$06,$00,$0B,$00,$01,$00
5C18 DEFB $01,$00,$06,$00,$10,$00,$00,$00
5C20 DEFB $00,$00,$00,$00,$00,$00,$00,$00
5C28 DEFB $00,$00,$00,$00,$00,$00,$00,$00
5C30 DEFB $00,$00,$00,$00,$00,$00,$00,$3C
5C38 DEFB $40,$00,$FF,$CD,$00,$54,$FF,$00
5C40 DEFB $00,$00,$00,$00,$FF,$00,$00,$16
5C48 DEFB $07,$00,$00,$2E,$5E,$00,$00,$B6
5C50 DEFB $5C,$BB,$5C,$CB,$5C,$2E,$5E,$CA
5C58 DEFB $5C,$2F,$5E,$32,$5E,$2D,$5E,$EF
5C60 DEFB $5E,$34,$5E,$34,$5E,$34,$5E,$2D
5C68 DEFB $92,$5C,$00,$02,$00,$00,$00,$00
5C70 DEFB $00,$00,$00,$00,$9D,$1A,$00,$00
FRAMES 5C78 DEFB $34 FRAMES, low byte: $34 from the tape, counted on by the interrupts that ran before the loader turned them off
FRAMES_MIDDLE 5C79 DEFB $63 FRAMES, middle byte: $63 from the tape; the game's start returns to BASIC unless it still is (START)
5C7A DEFB $00,$58,$FF,$00,$00,$21,$00,$5B FRAMES' high byte to ERR_SP
5C82 DEFB $21,$17,$C0,$50,$E0,$50,$21,$02
5C8A DEFB $21,$17,$03,$40,$00,$40,$00,$00
5C92 DEFB $89,$2E,$9D,$36,$B1,$00,$00,$00
5C9A DEFB $00,$00,$00,$00,$00,$00,$00,$00
5CA2 DEFB $00,$00,$00,$00,$00,$00,$00,$00
5CAA DEFB $00,$00,$00,$00,$00,$00
Prev: 5BAB Up: Map Next: 5CB0