þþ›$nX;x$X; Game Interrupt Service Routine‚$X; ------------------------------ŒX;–„GISR5;;save Acc  …SMASH;;test collisionsª …ROTOR;;animate ships´#…CLOCK;;increment clock¾,;;clear carryÈQ…UNIVS;;universe soundÒO>0;;change soundÜP…UNIVS;;replace soundæP…AUDF2;;make soundðQ†ENDGAM;;game end flagúHƒGI7;;game over? No.!„GI99;;end it now!X;X; Ship Noise Generation"X; ---------------------,X;6ƒGI7Q>;;medium grey@P†COLPF1;;set colorJA;;move X to AccT 5;;save X^$>;;neutral stickhQ„DEAD;;player 0 statusrH„GI70;;dead? No.|&…STICK;;stick to center†"„GI70Q„DEAD;;player 1 statusH„GI71;;dead? No.š&…STICK;;stick to center¤ „GI71Q…STICK;;check if either®M…STICK;;stick pushed by¸R>;;comparing w/15ÂQ>;;rumble noiseÌE„GI03;;both 15? Yes.ÖQ…TRIGN;;trigger opt 0àL…TRIGN;;trigger opt 1êR>;;warp speed testôQ>ˆ;;loud warp soundþE„GI03;;warp? Yes.Q>„;;med engine roar „GI03P…AUDC4;;make engine sndQ>;;warp frequency&E„GI30;;warp? Yes.0Q> ;;normal rockets:„GI30P…AUDF4;;set frequencyD$>;;init value forN&„VDEL;;vertical delayX2;;make X = 1bQ„M0PL;;missile 0 tolP…M0PLS;;PL collisionsvQ„M0PL;;missile 1 to€P…M0PLS;;PL collisionsŠQ…TRIGN;;trigger opt 0”L…TRIGN;;trigger opt 1žR>;;check shields¨H…MOVE2;;shields on? No.²Q†RANDOM;;random number¼M>;;only 0..31ÆL> ;;only 32..63ÐP…AUDF4;;shield soundÚQ>¦;;value foräP…AUDC4;;shield volumeî…MOVE2 …TRIGR;;read triggerøQ„DEAD9;;player statusF…MOVEX;;dead? Yes. Q…TRIGN9;;trigger valueR>;;shields in use? F…MOVEX;;Yes. skip next* †MISFLY;;move missile4Q…CLOCK;;get clock value>W?;;bit 0 to carryHD†MOVE2X;;even? Yes.RQ…TRIGN9;;trigger value\R>;;warp drive?fH…MOVEX;;No. skip nextpX;zX; Joystick Handler„X; ----------------ŽX;˜"†MOVE2XV…STICK9;;check joystick¢E…MOVED;;stick up? No.¬"„YPLR9;;move ship up¶!…MOVEDV…STICK9;;check joystickÀE…MOVEL;;stick down? No.Ê#„YPLR9;;move ship downÔ…MOVELQ„SHIP;;get ship typeÞF…MOVEX;;U/D rocket? Yes.èV…STICK9;;check joystickòE…MOVER;;stick left? No.ü"„XPLR9;;move ship left!…MOVERV…STICK9;;check joystickE…MOVEX;;stick right? No.#„XPLR9;;move ship right$…MOVEXQ„XPLR9;;ship X coord.R>0;;past left8E†MOVEX3;;border? No.BQ>0;;set to borderL†MOVEX3R>È;;past rightVD†MOVEX4;;border? No.`Q>Ç;;set to borderj†MOVEX4P„XPLR9;;save X coordtP†HPOSP09;;position ship~'„TEMP;;save YˆQ„DEAD9;;ship status’G…MOVX4;;alive? Yes.œQ…CLOCK;;get clock value¦W?;;test bit 0°E„MOV4;;clock odd? Yes.ºT?;;restore clockÄM>ö;;max 7 brightnessÎP†PCOLR09;;make ship colorØQ†SCLOCK;;score snd countâH„MOV4;;sound on? Yes.ìQ…CLOCK;;get clock valueöM>;;make 0..7L>È;;make $C8..$CF P…AUDC3;;sound volumeQ†RANDOM;;random numberM>;;make 0..31(L> ;;make 32..632P…AUDF3;;weird sound<„MOV4#„YPLR9;;move ship downF…MOVX4Q„YPLR9;;ship Y coordPH†MOVEX6;;screen top? No.Z …SCORE;;increment scored†MOVEX6R>À;;screen bottom?nD†MOVEX5;;No. skip nextxQ„DEAD9;;ship status‚H…MOVX6;;ship dead? No.ŒQ„XPLR9;;ship X coord–R…XSTRT9;;compare w/start F†MOVX6A;;equal? Yes.ª#„XPLR9;;move ship right´D…MOVX6;;ok? Yes. else¾"„XPLR9;;move ship leftÈ"„XPLR9;;move ship leftÒH…MOVX6;;skip next܆MOVX6AQ>ÿ;;value foræP„DEAD9;;working shipðP†HITCLR;;clr collisionsúQ†PCOLRS9;;value forP†PCOLR09;;ship colorQ†SCLOCK;;score snd clockH…MOVX6;;sound on? Yes."P…AUDC3;;zero sound,…MOVX6Q>¿;;value for6†MOVEX5P„YPLR9;;init Y coord@(>;;ship 1?JW?;;carry=1 if Yes.TP„GRPX;;PM graphic pntr^D†MOVEX7;;coord even? Yes.hQ„VDEL;;vertical delayrL…VDMSK9;;delay mask|P„VDEL;;new V.delay††MOVEX7A;;move X to Acc 5;;save Xš,;;clear carry¤Q„DEAD9;;ship status®F†MOVX7A;;ship dead? Yes.¸Q†RANDOM;;random numberÂM>;;make 0..15ÌL†PCOLRS9;;add ship colorÖP†PCOLR09;;new ship coloràQ…TRIGN9;;check triggerêR>;;for shieldsô;;;set carryþF†MOVX7A;;shields? Yes.,;;clear carryQ†PCOLRS9;;ship colorP†PCOLR09;;set color&†MOVX7A%> ;;do 10 bytes0$> ;;rocket offset:Q„SHIP;;get ship typeDF†MOVEXD;;rocket? Yes.N$>;;saucer offsetX †MOVEXDQ…SHIPS9;;ship graphicbD„MVXD;;shields on? No.lM†RANDOM;;shield effectv„MVXDP@„GRPX7;;put ship€0;;graphic indexŠ1;;PM index”I†MOVEXD;;done? No.ž 7;;pull X¨>;;move Acc to X²Q†MISSLE9;;missile status¼F…MVXDM;;active? No.Æ%>;;missile launcherÐQ>;;no shot graphicÚP@„GRPX7;;put shipä#…MVXDM%„TEMP;;restore Y indexî0;;next shipøG†MOVEX0;;done? Yes.!…MOVE2;;No. continue  †MOVEX0Q„VDEL;;V.delay shadowP†VDELAY;;vertical delay Q†ENDGAM;;game status*F†MOVXE2;;game over? Yes.4 …TIMER;;decrement time>IƒGI9;;time up? No.HQ>ƒN7CÀ;;zero graphicRP„TRAM;;minutes display\P„TRAM ;;10 sec displayfP„TRAM ;;seconds displaypP„TRAM ;;.1 sec displayz†MOVXE2Q>y;;goto attract„P†ATRACT;;in 30 secondsŽQ>;;get zero˜P†ENDGAM;;end game¢P…AUDC3;;sound off¬P…AUDC4;;sound off¶X;ÀX; Comet Mover RoutineÊX; -------------------ÔX;ÞƒGI97;;pull Xè>;;move Acc to Xò„GI99Q„HINC;;comet H speedüM…CLOCK;;mask with clock F„GI91;;move comet? Yes. „GI907;;restore Acc 9;;return$ „GI91Q†COMETF;;comet status. F„GI90;;active? No.8 C;;move Y to AccB 5;;save YL A;;move X to AccV 5;;save X` Q„HPOS;;comet H coordj M„VINC;;and w/V speedt HƒGI5;;move vert? No.~ Q„VPOS;;comet V coordˆ ,;;clear carry’ O„VDIR;;add V directionœ M>;;make 0..127 only¦ P„VPOS;;replace V coord° X;º X; Draw Comet GraphicsÄ X; -------------------Î X;Ø ƒGI5%> ;;do 14 bytesâ $„VPOS;;comet V coordì ƒGI0Q†RANDOM;;random numberö M†COMETM8;;mask w/comet PƒPM29;;put player 2 Q†RANDOM;;random number M†COMETM8;;do same thing PƒPM39;;put player 3( 2;;inc player addr2 A;;move X to Acc< M>;;make 0..127F >;;replace XP 1;;dec byte countZ IƒGI0;;pic done? No.d Q†RANDOM;;random numbern M>ð;;color onlyx L>;;brightness 4‚ P†PCOLR2;;player 2 colorŒ Q†RANDOM;;random number– M>ð;;color only  L>;;brightness 8ª P†PCOLR3;;player 3 color´ ,;;clear carry¾ Q„HPOS;;comet H coordÈ O„HDIR;;add H directionÒ P„HPOS;;new H coordÜ P†HPOSP2;;player 2 H posæ P†HPOSP3;;player 3 H posð P†COMETF;;non 0 = enabledú X; X; Generate Comet Sound X; -------------------- X;" #†CSOUND;;comet snd freq, Q†ENDGAM;;game status6 FƒGIS;;game over? Yes.@ Q†CSOUND;;comet snd freqJ R>};;value < 125T EƒGI2;;No. skip next^ V?;;freq/2h V?;;freq/4r P…AUDF1;;set frequency| R>;;past peak?† DƒGI2;;No. skip next N>Ÿ;;reverse volumeš ƒGISP…AUDC1;;set volume¤ ƒGI27;;pull X® >;;move Acc to X¸ 7;;pull Y ?;;move Acc to YÌ 7;;pull AccÖ 9;;returnà X;ê X; Joystick Trigger Processorô X; --------------------------þ X; …TRIGRQ…STRIG9;;get trigger V?;;move to carry E…TRIGX;;pressed? No.& Q„TRIG;;trigger option0 …TRIGXM„DEAD9;;ship status: R…TRIGN9;;same as last?D F…TRIG2;;Yes. skip nextN P†HITCLR;;clr collisionsX …TRIG2P…TRIGN9;;trig optionb X;l X; Missile Mover Routinev X; ---------------------€ X;Š Q†MISSLE9;;missile status” FƒMMX;;fired? No.ž Q†ROWCRS9;;missile Y coord¨ HƒMM0;;zero? No.² P†MISSLE9;;disable missile¼ ƒMMX:;;returnÆ X;Ð ƒMM0,;;clear carryÚ Q†DELTAR9;;add delta Yä O…ROWAC9;;to Y Accî P…ROWAC9;;new Y Accø R…ENDPT9;;cmp w/endpoint DƒMM1;;change Y? No. S…ENDPT9;;sub endpoint P…ROWAC9;;new Y Acc value ,;;clear carry* Q†ROWINC9;;add shot Y inc4 O†ROWCRS9;;to Y coord> P†ROWCRS9;;new Y coordH ƒMM1,;;clear carryR Q†DELTAC9;;add delta X\ O…COLAC9;;to X Accf P…COLAC9;;new X Accp R…ENDPT9;;cmp w/endpointz DƒMMP;;change X? No.„ S…ENDPT9;;sub endpointŽ P…COLAC9;;new X Acc value˜ ,;;clear carry¢ Q†COLINC9;;add shot X inc¬ O†COLCRS9;;to X coord¶ P†COLCRS9;;new X coordÀ ƒMMPQ†COUNTR9;;iteration cntÊ F„MMP1;;cnt done? Yes.Ô V?;;cnt div 2Þ L>ˆ;;weird soundè P…AUDC3;;make sound FXò Q†COUNTR9;;get cnt againü N>;;very weird FXT?;;times 2T?;;times 4T?;;times 8$P…AUDF3;;set frequency."†COUNTR9;;decrement cnt8„MMP1Q†COLCRS9;;shot X coordBP†HPOSM09;;PM horiz posLQ†ROWCRS9;;shot Y coordVV?;;2 line res`D„MM00;;even line? Yes.j5;;save PM Y coordtQ„VDEL;;VDELAY shadow~L…VDMSK9;;odd scan lineˆP„VDEL;;new shadow val’7;;restore Y coordœ„MM00L>4ƒPMM;;missiles start¦P„GRPM;;set pointer lo°Q…M0PLS9;;test if shot hitºM…MCMSK9;;comet or otherÄHƒMME;;ship? Yes.ÎQ†COLCRS9;;shot Y coordØFƒMME;;off scrn? Yes.âC;;move Y to Accì 5;;save Yö%>;;4 pic bytes„MM01Q@„GRPM7;;current pic M†MISMSK9;;erase old picP…TEMPM;;save tempQ†MIMAGE8;;new pic data((>;;player 1 shot?2H„MM03;;No. skip next<T?;;shift byte twoFT?;;bits to leftP„MM03L…TEMPM;;add saved dataZP@„GRPM7;;new shot picd1;;dec pic indexnI„MM01;;pic done? No.x7;;restore Y‚?;;move Acc to YŒ :;;return–X; X; Erase Current ShotªX; ------------------´X;¾ƒMMEQ>;;get zero valueÈP†MISSLE9;;kill shotÒC;;move Y to AccÜ 5;;save Yæ%>;;do 4 bytesð„MME2Q@„GRPM7;;old shot picúM†MISMSK9;;erase shotP@„GRPM7;;replace pic1;;next byteI„MME2;;done? No."Q…M0PLS9;;cmp collisions,M…MCMSK9;;w/all but own6F„MME3;;score point? No.@ †SCOREM;;inc scoreJ„MME37;;pull YT?;;move Acc to Y^ :;;return