Files
Basys3Terminal/games/swarm/crt0.s
T
brad ArantandClaude Opus 5.5 e1daf27891 Star Swarm: a swooping alien shooter; boardemu frame counter fix
games/swarm: an original Galaxian-style game in C for the Z-80 - a
46-alien formation sways overhead and peels off in looping, firing dives,
flagships bring escorts. With more aliens than sprites, the formation is
drawn into the graphics and swayed by the hardware X scroll; a diver is
wiped out of the graphics and becomes a sprite until it flies back.
test-swarm.py has an autopilot destroy a whole swarm.

tools/boardemu.py: the frame counter now moves on once per wait, not on
every read (it had been running two frames per wait, so anything done on
odd frames never happened in tests). The other games' tests still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:13:18 -08:00

38 lines
963 B
ArmAsm

; Start-up for a machine-code program that BASIC CALLs at 8600h: clear the
; variables, run main, and return to BASIC. The program has no initialised
; variables (gen.py's tables are const, so they stay in the code).
.module crt0
.globl _main
.globl s__DATA, l__DATA
.area _HEADER (ABS)
.org 0x8600
start:
ld hl, #s__DATA
ld bc, #l__DATA
ld a, b
or c
jr z, go
ld (hl), #0
dec bc
ld a, b
or c
jr z, go
ld d, h
ld e, l
inc de
ldir
go:
jp _main ; main's RET goes back to BASIC
.area _HOME
.area _CODE
.area _INITIALIZER
.area _GSINIT
.area _GSFINAL
.area _DATA
.area _INITIALIZED
.area _BSEG
.area _BSS
.area _HEAP