Enemy ships have been spotted off your shore, and your mission is to blow them out of the water. From the control panel of the Guardian, an Ohio-class heavy cruiser, you move a missile sight over the enemy ships and fire conventional or nuclear missiles; nuclear missiles have a wider margin but close counts with both. A countdown timer limits the game, and each hit adds time. The enemy’s laser grid can set your ship on fire, and you must press W to water the fire until it is out. Shooting down the enemy smart missile scores a 100-point bonus and resets the clock to 100. If you run out of missiles while time remains, you can buy more: conventional rounds cost one time unit each and nuclear rounds five.
The keys are Q, A, O and P to move the sight, I to fire, C and N to select the missile type, W to put out fires, and S and R to stop and resume; a joystick can be used instead. The game ends with your score, the number of ships sunk and a high score entry for your initials. The title screen reads “© TIMEX 1983”.
Program Analysis
Structure
guard: loader (lines 10–50) that loads the screen, the machine code and the main program.ship$: loading screen, 6,912 bytes at 16384.to: 22,000 bytes of machine code at 40000.arms: the BASIC game, auto-running at line 4999.
The BASIC Program
- Lines 5000–5162: the title, drawn letter by letter with
PLOTandDRAWfromDATAlists with aBEEPper stroke, and the high score. - Lines 6000–6320: sound effects using
SOUNDto program the sound chip. - Lines 7000–7060: buying more ammunition.
- Lines 7200–7232: game over, score and high score.
- Lines 7500–7699: the rules, shown over the real control panel drawn by the machine code.
- Lines 8005–8099: six user-defined graphics set from
BINdata. - Lines 9000–9098: the main loop, which calls machine code routines at 47000, 53730, 55800, 56080, 56200, 57040, 58220, 58400 and 58700 and passes values through a block of variables at 50016–50096 (ammunition counts, time left, score, ships sunk).
Notable Techniques
- The game is a hybrid: BASIC handles the menus, rules and scoring, while the machine code draws the control panel and runs the action. Time and score are kept as two-byte values that BASIC reads with
PEEK 50070+256*PEEK 50071. - Line 4999 sets
ON ERR GO TO 9900; the handler at 9900–9930 pauses, resets the error trap withON ERR RESETand continues withON ERR CONTINUE. - The keyboard repeat delay and rate (system variables 23561 and 23562) are shortened during play and restored afterwards.
Potential Issues
- The rules screens at lines 7570 and 7630 contain
COPY, which sends the screen to the printer each time the rules are shown. - Several
GO SUBandGO TOtargets (8000, 6000, 6100, 6200, 7000, 7200, 7500, 7698) do not exist; execution falls through to the next line, which works but appears to be a leftover of renumbering. - Line 9096 is a disabled
REM LET c1=USR 58850.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.