Ant Attack
Routines
Address
Label
Description
8000
PLAY
Play the game (USR 32768)
8060
READ_CONTROLS
Read the movement keys into the player's record
8090
GET_KEY
Return the key being pressed (USR 32912)
8097
WAIT_KEY
Wait for a key (USR 32919)
80A0
DRAW_SPRITE
Draw one sprite into the render buffer
80D3
MOVE_ANTS
Move the five ants
8100
COPY_TO_SCREEN
Copy the render buffer to the screen
8130
PLANE_TO_BUFFER
Convert a place in PLANES to an address in the render buffer
8160
CLEAR_PLANES
Fill PLANES with $FF (nothing)
8180
MARK_PLANE
Mark one height's blocks in PLANES
81B0
BUILD_PLANES
Sort the gathered cells into PLANES, height by height
81E4
PRINT_COUNTERS
Print the grenade count and both energies
8203
DRAW_BLOCK
Draw a block (views 0 and 2)
82A0
COPY_POSITION
Put IX where IY is, facing the same way
82C0
MOVE_PLAYER
Move the player
82E0
BLAST_FRAME
Show the explosion while the explosion countdown runs
8300
CLEAR_BUFFER_ROWS
Clear every fourth row of the render buffer
8360
RANDOM
Step the random number generator
8380
READ_MAP_CELL
Read one cell of the city map
83B0
GATHER_VIEW
Gather the cells in view into VIEW_CELLS
83E0
MOVE_GRENADE
Throw and move the grenade, and see whether it hit anything
8400
READ_VIEW_KEYS
Turn the view with 0, P, ENTER or SPACE
8460
SCROLL_VIEW
Scroll the view when the player nears its edge
84A0
DRAW_VIEW
Draw the view
84D0
SHARE_CELL
The rescued person and the player in one cell: nobody falls
8500
DRAW_SCENE
Paint PLANES and the sprites into the render buffer, back to front
852B
BLOCK_DRAWN
Where DRAW_BLOCK and DRAW_BLOCK_TURNED come back to
852F
DRAW_HERE
Draw the sprite that is due, then carry on the scan
8550
NEXT_SPRITE
Load the count to the next sprite in SPRITE_LIST
8570
SELECT_BLOCK_DRAWER
Point IY at the block picture for this view
8580
SORT_SPRITES
Sort SPRITE_LIST by place in PLANES
85D0
SPRITE_DISTANCES
Turn the sorted places into distances from one to the next
85FA
OFF_VIEW
An object out of view: a place past the end, so it is never drawn
8600
PROJECT_SPRITES
Work out where each object falls in PLANES
8681
GATHER_VIEW0
Gather the cells in view, view 0
86A1
GATHER_VIEW1
Gather the cells in view, view 1
86C1
GATHER_VIEW2
Gather the cells in view, view 2
86E1
GATHER_VIEW3
Gather the cells in view, view 3
8703
DRAW_BLOCK_TURNED
Draw a block (views 1 and 3)
87A0
BLAST_ANT
See whether an exploding grenade got an ant
87D0
SCANNER
Colour the scanner
8800
MOVE_OBJECT
Move an object one frame: fall, climb, jump, walk
8860
LANDED
Land from a fall
8880
FALL
Fall, after a frame's grace
88A0
BITTEN
Something is in this cell: a bite
88B0
STUNNED
Count down being stunned
88C0
ON_TOP
The rescued person shares the player's cell
88D0
RISE
Go up a block, if there is room
88E0
STEP_UP
Blocked: step up onto it, for things that can
8900
STEP
Move a position one cell in a direction
8920
TEST_MAP_BIT
Is there a block at a height in a cell?
8940
TOGGLE_MAP_BIT
Flip a height's bit in a map cell
895D
TEST_BELOW
Is there anything to stand on?
8980
CHOOSE_FRAME
Choose the animation frame
89D0
MOVE_OR_RESPAWN
Move an object, or count down its explosion and send it home
8A00
MOVE_ANT
Move an ant towards the player
8A5D
ANT_TURN
An ant's turn
8A80
DISTANCE
Distance between two cells, along the grid
8A91
DIRECTION_TO
The direction from one cell towards another
8AB6
FOLLOW_PLAYER
Walk the rescued person after the player
8B00
FILL_PLAY_ATTRIBUTES
Fill the play area's attributes
8B4A
NOISE
A burst of noise on the speaker
8B80
TONE
A note on the speaker
8BD1
PARALYSE_ANT
Paralyse the ant the player has landed on
8D00
THROW_GRENADE
Throw a grenade, or keep one flying
8D9A
GRENADE_BLAST
Check each ant against an exploding grenade
8DD0
COUNT_DOWN_TIME
Count the time down and print it
8E00
PLAY_SCRIPT_ONE
Run script 1, "NASTY FALL !"
8E02
PLAY_SCRIPT
Run a script, keeping IX
8E0D
RUN_SCRIPT
Run a script: text, sound and colour
8E80
GAME_FRAME
One frame of play
8EA0
CHECK_RESCUED
Have the player and the rescued person both left the city?
8ED0
CHECK_GAME_OVER
Stop the game when time or either energy runs out
8EF2
FINAL_SCRIPT
The ending (USR 36594)
8F00
HANDLE_EVENTS
React to what happened to the player and the rescued person
8F80
MOVE_RESCUEE
The person to be rescued: wait, or follow
8FD0
GRENADE_SOUNDS
Show and sound what the grenade did
9700
LOADED
Where the load finishes
9797
INTERRUPT
The interrupt routine: no BREAK
97A0
RESTART_BASIC
Type RUN and run it