Uploaded the binary disk and the assembly file

This commit is contained in:
Alon Fliess 2018-09-04 04:17:39 +03:00 committed by GitHub
parent 2855045e8c
commit 7eab312519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 972 additions and 0 deletions

BIN
snake.dsk Normal file

Binary file not shown.

972
snake_asm.txt Normal file
View File

@ -0,0 +1,972 @@
1010 .TF GAME
1020 *--------------------------------
1030 * CONSTANT
1040 *--------------------------------
1050 GETKEY .EQ $C000
1060 CLRKEY .EQ $C010
1070 PRTHEX .EQ $FDDA
1080 PRTCHR .EQ $FDED
1090 *--------------------------------
1100 * START PROGRAM
1110 *--------------------------------
1120 SET LDA #$00
1130 TAX
1140 .1 STA SROW,X
1150 INX
1160 BNE .1
1170 LDA #$31
1180 STA ROMNUM
1190 LDA #$03
1200 STA LIFE
1210 LDA #$C0
1220 STA SOUND+13
1230 LDX #3
1240 .2 LDA KEYSTR,X
1250 STA KEYDAT,X
1260 DEX
1270 BPL .2
1280 *--------------------------------
1290 * PRINT SCREEN
1300 *--------------------------------
1310 LDA $C051
1320 LDA $C052
1330 JSR PRINT
1340 .HS 80800D04
1350 .AS "BLOAD HIGH SCORE"
1360 .HS 8D
1370 JSR PRINT
1380 .HS FF0A00
1390 .AS "THE ANNOYING SNAKE"
1400 .HS 0D
1410 .AS "MADE BY ALON FLIESS 1987 WHITEFISH BAY"
1420 .HS 0D0D
1430 .AS " HIGH SCORE TABLE"
1440 .HS 0D
1450 .AS " NAME ROOM LEVEL SCORE"
1460 .HS 0D
1470 .AS " ---- ---- ----- -----"
1480 .HS 8D
1490 LDA #10
1500 STA NCOUNT
1510 PTBLE LDX #00
1520 .2 LDY #14
1530 .1 LDA $2000,X
1540 JSR PRTCHR
1550 INX
1560 DEY
1570 BNE .1
1580 LDA #$A0
1590 JSR PRTCHR
1600 JSR PRTCHR
1610 LDA $2000,X
1620 JSR PRTCHR
1630 LDA #$A0
1640 LDY #9
1650 .3 JSR PRTCHR
1660 DEY
1670 BNE .3
1680 INX
1690 LDA $2000,X
1700 JSR PRTCHR
1710 INX
1720 LDA #$A0
1730 LDY #7
1740 .4 JSR PRTCHR
1750 DEY
1760 BNE .4
1770 LDA $2000,X
1780 JSR PRTHEX
1790 INX
1800 LDA $2000,X
1810 JSR PRTHEX
1820 INX
1830 LDA #$8D
1840 JSR PRTCHR
1850 DEC NCOUNT
1860 BNE .2
1870 JSR PRINT
1880 .HS 80800D0D
1890 .AS "MOVE-"
1900 .HS 0D
1910 .AS " I"
1920 .HS 0D
1930 .AS " J L"
1940 .HS 0D
1950 .AS " M"
1960 .HS 0D0D
1970 .AS "LEVEL (1-5)"
1972 .AS -"?"
1980 *--------------------------------
1990 * GET LEVEL
2000 *--------------------------------
2010 GET.LEVEL
2020 .2 LDA GETKEY
2030 BPL .2
2040 STA CLRKEY
2050 CMP #$B6
2060 BCS .2
2070 CMP #$B1
2080 BCC .2
2090 STA SLEVEL
2100 JSR PRTCHR
2110 AND #$07
2120 TAX
2130 DEX
2140 LDA LEVELT,X
2150 STA LEVEL
2160
2170 *--------------------------------
2180 * GET NEW KEYS
2190 *--------------------------------
2200 DEFKEY JSR PRINT
2210 .HS FF8080
2220 .AS "DO YOU WANT TO CHANGE KEYS"
2225 .AS -"?"
2230 .1 LDA GETKEY
2240 BPL .1
2250 STA CLRKEY
2260 JSR PRTCHR
2270 CMP #$D9
2280 BEQ .2
2290 JMP STRTGM
2300 .2 JSR PRINT
2310 .HS 80800D0D
2320 .AS "DOWN"
2325 .AS -"?"
2330 .3 LDA GETKEY
2340 BPL.3
2350 STA CLRKEY
2360 STA KEYDAT
2370 JSR PRTCHR
2380 JSR PRINT
2390 .HS 80800D
2400 .AS "RIGHT"
2405 .AS -"?"
2410 .4 LDA GETKEY
2420 BPL .4
2430 STA CLRKEY
2440 STA KEYDAT+1
2450 JSR PRTCHR
2460 JSR PRINT
2470 .HS 80800D
2480 .AS "UP"
2485 .AS -"?"
2490 .5 LDA GETKEY
2500 BPL .5
2510 STA CLRKEY
2520 STA KEYDAT+2
2530 JSR PRTCHR
2540 JSR PRINT
2550 .HS 80800D
2560 .AS "LEFT"
2565 .AS -"?"
2570 .6 LDA GETKEY
2580 BPL .6
2590 STA CLRKEY
2600 STA KEYDAT+3
2610 JSR PRTCHR
2620 JSR PRINT
2630 .HS 80800D0D0D0D0D
2640 .AS "PRESS SPACE BAR TO CONTINU"
2645 .AS -"E"
2650 .7 LDA GETKEY
2660 BPL .7
2670 STA CLRKEY
2680 CMP #$A0
2690 BNE .7
2700 *--------------------------------
2710 * START GAME
2720 *--------------------------------
2730 STRTGM LDA $C050
2740 LDA $C053
2750 LDA $C054
2760 LDA $C056
2770 START JSR SETSCR
2780 LDA ROMNUM
2790 AND #$0F
2800 ASL
2810 STA LENGTH
2820 *--------------------------------
2830 * MAIN LOOP
2840 *--------------------------------
2850 LOOP LDA TAIL
2860 CLC
2870 ADC LENGTH
2880 CMP HEAD
2890 BNE .1
2900 LDX TAIL
2910 LDA ARRAYX,X
2920 STA COLOMN
2930 LDA ARRAYY,X
2940 STA SROW
2950 LDA #$00
2960 STA SCOLOR
2970 SEC
2980 JSR SPLOT
2990 INC TAIL
3000 .1 LDX HEAD
3010 DEX
3020 LDA ARRAYX,X
3030 STA COLOMN
3040 LDA ARRAYY,X
3050 STA SROW
3060 LDA #$0F
3070 STA SCOLOR
3080 SEC
3090 JSR SPLOT
3100 LDX HEAD
3110 LDA ARRAYX,X
3120 STA COLOMN
3130 LDA ARRAYY,X
3140 STA SROW
3150 LDA #$01
3160 STA SCOLOR
3170 SEC
3180 JSR SPLOT
3190 BCC .3
3200 CMP #$03
3210 BNE .4
3220 JMP NXTSCR
3230 .4 CMP #$02
3240 BEQ .5
3250 CMP #$0F
3260 BNE .6
3270 .5 JMP CRASH
3280 .6 JSR EATBOX
3290 .3 LDA ROMNUM
3300 AND #$0F
3310 ASL
3320 ASL
3330 ASL
3340 ADC LEVEL
3350 EOR #$FF
3360 CLC
3370 ADC #$01
3380 STA DUR
3390 LDX SCOUNT
3400 LDA MUSICT,X
3410 STA FREQ
3420 INC SCOUNT
3430 LDA SCOUNT
3440 CMP #41
3450 BNE .8
3460 LDA #$00
3470 STA SCOUNT
3480 .8 JSR SOUND
3490 LDA GETKEY
3500 BPL .7
3510 JSR GETDIR
3520 .7 STA CLRKEY
3530 LDX HEAD
3540 LDA ARRAYX,X
3550 CLC
3560 ADC DX
3570 INX
3580 STA ARRAYX,X
3590 DEX
3600 LDA ARRAYY,X
3610 CLC
3620 ADC DY
3630 INX
3640 STA ARRAYY,X
3650 STX HEAD
3660 JMP LOOP
3670 *--------------------------------
3680 * GET DIRECTION
3690 *--------------------------------
3700 GETDIR LDX #$03
3710 .2 CMP KEYDAT,X
3720 BEQ .1
3730 DEX
3740 BPL .2
3750 CMP #147
3760 BNE .3
3770 LDA #$FF
3780 EOR SOUND+13
3790 STA SOUND+13
3800 .3 RTS
3810 .1 LDA DIRX,X
3820 STA DX
3830 LDA DIRY,X
3840 STA DY
3850 RTS
3860 KEYDAT .HS CDCCC9CA
3870 DIRX .HS 000100FF
3880 DIRY .HS 0100FF00
3890 *--------------------------------
3900 * SET SCREEN
3910 *--------------------------------
3920 SETSCR JSR PRINT
3930 .HS FF80800D04
3940 .AS "BLOAD ROOM "
3950 ROMNUM .HS 008D
3960 SETBOX JSR HOME
3970 LDA ROMNUM
3980 AND #$0F
3990 CLC
4000 ADC #$02
4010 STA COUNT
4020 STA BOXNUM
4030 .2 LDY #$01
4040 .1 JSR RANDOM
4050 LSR
4060 LSR
4070 CMP #40
4080 BCS .1
4090 STA SROW,Y
4100 DEY
4110 BPL .1
4120 CLC
4130 JSR SPLOT
4140 BCS .2
4150 LDA COUNT
4160 ADC #$04
4170 STA SCOLOR
4180 SEC
4190 JSR SPLOT
4200 DEC COUNT
4210 BNE .2
4220 JSR SCOREP
4230 JSR BOXP
4240 JSR LIFEP
4250 JSR ROOMP
4260 LDA #38
4270 STA ARRAYX+1
4280 STA ARRAYX
4290 STA ARRAYY
4300 LDA #37
4310 STA ARRAYY+1
4320 LDA #$FF
4330 STA DY
4340 LDA #$00
4350 STA DX
4360 STA TAIL
4370 LDA #$01
4380 STA HEAD
4390 STA CLRKEY
4400 RTS
4410 *--------------------------------
4420 * HOME/CLEAR TEXT SCREEN
4430 *--------------------------------
4440 HOME LDX #20
4450 .2 LDA TBLELO,X
4460 STA $F9
4470 LDA TBLEHI,X
4480 STA $FA
4490 LDY #39
4500 LDA #$A0
4510 .1 STA ($F9),Y
4520 DEY
4530 BPL .1
4540 INX
4550 CPX #24
4560 BNE .2
4570 RTS
4580 *-------------------------------
4590 * PRINT THE SCORE
4600 *-------------------------------
4610 SCOREP JSR PRINT
4620 .HS 0015
4630 .AS "SCORE"
4635 .AS -":"
4640 LDA SCORE+1
4650 JSR PRTHEX
4660 LDA SCORE
4670 JSR PRTHEX
4680 RTS
4690 *-------------------------------
4700 * PRINT NUMBER OF BOX
4710 *-------------------------------
4720 BOXP JSR PRINT
4730 .HS 1E17
4740 .AS "BOX"
4745 .AS -":"
4750 SED
4760 LDA BOXNUM
4770 CLC
4780 ADC #$00
4790 CLD
4800 JSR PRTHEX
4810 RTS
4820 *-------------------------------
4830 * PRINT NUMBER OF LIFE
4840 *-------------------------------
4850 LIFEP JSR PRINT
4860 .HS 0C17
4870 .AS "LIFE"
4875 .AS -":"
4880 LDA LIFE
4890 ORA #$B0
4900 JSR PRTCHR
4910 RTS
4920 *-------------------------------
4930 * PRINT ROOM NUMBER
4940 *-------------------------------
4950 ROOMP JSR PRINT
4960 .HS 1517
4970 .AS "ROOM"
4975 .AS -":"
4980 LDA ROMNUM
4990 ORA #$80
5000 JSR PRTCHR
5010 RTS
5020 *-------------------------------
5030 * COLLISION
5040 *-------------------------------
5050 CRASH LDX #$04
5060 LDA #200
5070 STA FREQ
5080 .1 LDA #$02
5090 STA DUR
5100 JSR SOUND
5110 INC FREQ
5120 LDA FREQ
5130 CMP #230
5140 BNE .1
5150 .2 LDA #$02
5160 STA DUR
5170 JSR SOUND
5180 DEC FREQ
5190 LDA FREQ
5200 CMP #200
5210 BNE .2
5220 DEX
5230 BNE .1
5240 JSR ERASES
5250 DEC LIFE
5260 LDA LIFE
5270 CMP #$FF
5280 BNE .3
5310 JMP GMOVER
5320 .3 JMP START
5330 *-------------------------------
5340 * ERASE THE SNAKE
5350 *-------------------------------
5360 ERASES LDX TAIL
5370 LDA #230
5380 STA FREQ
5390 LDA #$00
5400 STA SCOLOR
5410 .1 LDA ARRAYX,X
5420 STA COLOMN
5430 LDA ARRAYY,X
5440 STA SROW
5450 STX TEMP2
5460 SEC
5470 JSR SPLOT
5480 LDX TEMP2
5490 LDA #$08
5500 STA DUR
5510 JSR SOUND
5520 DEC FREQ
5530 INX
5540 CPX HEAD
5550 BNE .1
5560 RTS
5570 *-------------------------------
5580 * NEXT SCREEN
5590 *-------------------------------
5600 NXTSCR JSR ERASES
5610 INC ROMNUM
5620 LDA ROMNUM
5630 CMP #$39
5640 BNE .2
5650 DEC ROMNUM
5680 JMP END
5690 .2 LDA SLEVEL
5700 AND #$07
5710 CMP LIFE
5720 BCC .3
5730 INC LIFE
5740 .3 JMP START
5750 *-------------------------------
5760 * COLLISION IN BOX
5770 *-------------------------------
5780 EATBOX LDX #50
5790 STX FREQ
5800 .1 LDX #$02
5810 STX DUR
5820 JSR SOUND
5830 DEC FREQ
5840 LDX FREQ
5850 CPX #$20
5860 BNE .1
5870 .2 LDX #$02
5880 STX DUR
5890 JSR SOUND
5900 INC FREQ
5910 LDX FREQ
5920 CPX #50
5930 BNE .2
5940 PHA
5950 SED
5960 CLC
5970 ADC #$00
5980 ADC SCORE
5990 STA SCORE
6000 LDA #$00
6010 ADC SCORE+1
6020 STA SCORE+1
6030 CLD
6040 JSR SCOREP
6050 PLA
6060 CLC
6070 ADC LENGTH
6080 STA LENGTH
6090 DEC BOXNUM
6100 BNE .3
6110 JSR BOXP
6120 LDA #$F5
6130 STA FREQ
6140 LDA #$D0
6150 STA DUR
6160 JSR SOUND
6170 LDA #$03
6180 STA SCOLOR
6190 LDX #$03
6200 .4 LDA OPENX,X
6210 STA COLOMN
6220 LDA OPENY,X
6230 STA SROW
6240 SEC
6250 STX TEMP2
6260 JSR SPLOT
6270 LDX TEMP2
6280 DEX
6290 BPL .4
6300 LDA #$05
6310 STA FREQ
6320 STA DUR
6330 JSR SOUND
6340 RTS
6350 .3 JSR BOXP
6360 RTS
6370 OPENX .HS 18271000
6380 OPENY .HS 00182710
6390 *------------------------------
6400 * GAME OVER
6410 *------------------------------
6420 GMOVER LDA $C051
6430 LDA $C052
6440 JSR PRINT
6450 .HS FF0000
6460 .AS " ***********"
6470 .HS 0D
6480 .AS " *GAME OVER*"
6490 .HS 0D
6500 .AS " ***********"
6510 .HS 0D0D0D
6520 .AS "YOU DIDN'T FINISH, MAYBE NEXT TIME."
6530 .HS 0D
6540 .AS "TRY AGAIN!!!"
6550 .HS 0D0D80
6560 JSR ROOMP
6570 JSR SCOREP
6580 JMP HSCORE
6590 *-------------------------------
6600 * END OF GAME
6610 *-------------------------------
6620 END LDA $C051
6630 LDA $C052
6635 JSR HOME
6640 JSR PRINT
6650 .HS FF0000
6660 .AS " ************"
6670 .HS 0D
6680 .AS " *YOU DID IT*"
6690 .HS 0D
6700 .AS " ************"
6710 .HS 0D0D
6720 .AS "LEVEL"
6725 .AS -" "
6730 LDA SLEVEL
6740 JSR PRTCHR
6750 CMP #$B5
6760 BEQ .1
6770 JSR PRINT
6780 .HS 80800D0D
6790 .AS "TRY NOW LEVEL"
6795 .AS -" "
6800 LDX SLEVEL
6810 INX
6820 TXA
6830 JSR PRTCHR
6840 .1 JSR SCOREP
6850 JSR ROOMP
6860 HSCORE LDA SCORE+1
6870 STA CLRKEY
6880 CMP $20B2
6890 BCS .2
6900 .4 JMP .12
6910 .2 BNE .3
6920 LDA SCORE
6930 CMP $20B3
6940 BCC .4
6950 BEQ .4
6960 .3 JSR PRINT
6970 .HS 000B0D
6980 .AS "NEW HIGH SCORE!!"
6985 .AS -"!"
6990 LDX #162
7000 .7 LDA SCORE+1
7010 CMP $2000+16,X
7020 BCC .6
7030 BNE .5
7040 LDA SCORE
7050 CMP $2000+17,X
7060 BCC .6
7070 .5 STX TEMP
7080 LDY #18
7090 .14 LDA $2000,X
7100 STA $2000+18,X
7110 INX
7120 DEY
7130 BNE .14
7140 LDA TEMP
7150 SEC
7160 SBC #18
7170 TAX
7180 BCS .7
7190 LDX #$00
7200 JMP VERYFH
7210 .6 JSR PRINT
7220 .HS 80800D0D
7230 .AS "INPUT YOUR NAME. (UP TO 14 LETTERS)."
7240 .HS 0D
7250 .AS -"?"
7260 LDY #14
7270 .8 LDA GETKEY
7280 BPL .8
7290 STA CLRKEY
7300 CMP #$8D
7310 BEQ .9
7320 STA $2000+18,X
7330 JSR PRTCHR
7340 INX
7350 DEY
7360 BNE .8
7370 .9 CPY #$00
7380 BEQ .10
7390 LDA #$A0
7400 .11 STA $2000+18,X
7410 INX
7420 DEY
7430 BNE .11
7440 .10 LDA ROMNUM
7450 ORA #$80
7460 STA $2000+18,X
7470 INX
7480 LDA SLEVEL
7490 STA $2000+18,X
7500 INX
7510 LDA SCORE+1
7520 STA $2000+18,X
7530 INX
7540 LDA SCORE
7550 STA $2000+18,X
7560 JSR PRINT
7570 .HS 80800D04
7580 .AS "BSAVE HIGH SCORE,A$2000,L$B4"
7590 .HS 8D
7600 .12 JSR PRINT
7610 .HS 0012
7620 .AS "PRESS SPACE BAR TO CONTINU"
7625 .AS -"E"
7630 L13 LDA GETKEY
7640 BPL L13
7650 STA CLRKEY
7660 CMP #$A0
7670 BNE L13
7680 JMP SET
7690 *-------------------------------
7700 * WRITE THE FIRST HIGH SCORE
7710 *-------------------------------
7720 VERYFH JSR PRINT
7730 .HS 80800D0D
7740 .AS "INPUT YOUR NAME. (UP TO 14 LETTERS)."
7750 .HS 0D
7760 .AS -"?"
7770 LDY #14
7780 .8 LDA GETKEY
7790 BPL .8
7800 STA CLRKEY
7810 CMP #$8D
7820 BEQ .9
7830 STA $2000,X
7840 JSR PRTCHR
7850 INX
7860 DEY
7870 BNE .8
7880 .9 CPY #$00
7890 BEQ .10
7900 LDA #$A0
7910 .11 STA $2000,X
7920 INX
7930 DEY
7940 BNE .11
7950 .10 LDA ROMNUM
7960 ORA #$80
7970 STA $2000,X
7980 INX
7990 LDA SLEVEL
8000 STA $2000,X
8010 INX
8020 LDA SCORE+1
8030 STA $2000,X
8040 INX
8050 LDA SCORE
8060 STA $2000,X
8070 JSR PRINT
8080 .HS 80800D04
8090 .AS "BSAVE HIGH SCORE,A$2000,L$B4"
8100 .HS 8D
8110 .12 JSR PRINT
8120 .HS 0012
8130 .AS "PRESS SPACE BAR TO CONTINU"
8135 .AS -"E"
8140 V13 LDA GETKEY
8150 BPL V13
8160 STA CLRKEY
8170 CMP #$A0
8180 BNE V13
8190 JMP SET
8200 *--------------------------------
8210 * RANDOM
8220 *--------------------------------
8230 RANDOM STX TEMP
8240 SEC
8250 LDA R
8260 ADC R+3
8270 ADC R+4
8280 STA R
8290 LDX #3
8300 .1 LDA R,X
8310 STA R+1,X
8320 DEX
8330 BPL .1
8340 LDX TEMP
8350 RTS
8360 R .BS 5
8370 *--------------------------------
8380 * SOUND ROUTINE
8390 *--------------------------------
8400 SOUND PHP
8410 PHA
8420 TXA
8430 PHA
8440 TYA
8450 PHA
8460 LDY #$00
8470 .1 LDX FREQ
8480 LDA BEEP
8490 .2 NOP
8500 DEX
8510 BEQ .1
8520 DEY
8530 BNE .2
8540 DEC DUR
8550 BNE .2
8560 PLA
8570 TAY
8580 PLA
8590 TAX
8600 PLA
8610 PLP
8620 RTS
8630 BEEP .EQ $C030
8640 FREQ .HS 00
8650 DUR .HS 00
8660 *-------------------------------
8670 * PLOT/GET COLOR ROUTINE
8680 *-------------------------------
8690 SPLOT PHP
8700 LDA SROW
8710 LSR
8720 TAX
8730 LDA TBLELO,X
8740 STA $F9
8750 LDA TBLEHI,X
8760 STA $FA
8770 LDY COLOMN
8780 LDA ($F9),Y
8790 BCC .1
8800 AND #$F0
8810 STA TEMP
8820 LDA ($F9),Y
8830 AND #$0F
8840 STA TEMP3
8850 LDA SCOLOR
8860 ASL
8870 ASL
8880 ASL
8890 ASL
8900 PLP
8910 BCC .2
8920 ORA TEMP3
8930 STA ($F9),Y
8940 .2 CLC
8950 LDA TEMP
8960 LSR
8970 LSR
8980 LSR
8990 LSR
9000 BEQ .3
9010 SEC
9020 .3 RTS
9040 .1 AND #$0F
9050 STA TEMP
9060 LDA ($F9),Y
9070 AND #$F0
9080 STA TEMP3
9090 LDA SCOLOR
9100 PLP
9110 BCC .4
9120 ORA TEMP3
9130 STA ($F9),Y
9140 CLC
9150 .4 LDA TEMP
9160 BEQ .5
9170 SEC
9180 .5 RTS
9190 *-------------------------------
9200 * PRINT SUBROUTINE
9210 *-------------------------------
9220 *
9230 * GET RETURN ADDRESS FROM THE STACK
9240 * AND USE IT AS A POINTER TO THE DATA
9250 *
9260 PRINT PLA
9270 STA $CE
9280 PLA
9290 STA $CF
9300 *
9310 * CHECK FIRST NUMBER FOR HOME
9320 *
9330 LDY #$01 ;INDEX TO DATA
9340 .1 LDA ($CE),Y ;GET CHARACTER
9350 CMP #$FF ;$FF IS CODE FOR HOME
9360 BNE .2
9370 JSR $FC58 ;HOME
9380 LDY #2 ;HOME SETS Y = 0
9390 BNE .1 ;ALWAYS!
9400 *
9410 * NEXT TWO BYTES ARE X,Y POSITION OF CURSOR
9420 *
9430 .2 BMI .10
9440 STA $24 ;CURRENT HORIZONTAL POSITION
9450 .10 INY ;NEXT CHARACTER
9460 LDA ($CE),Y ;VERTICAL POSITION
9470 BMI .11
9480 JSR $FB58 ;VERTICAL TAB
9490 .11 INY ;NEXT CHARACTER
9500 *
9510 * PRINT DATA
9520 *
9530 .3 LDA ($CE),Y ;GET CHARACTER
9540 ORA #$80 ;SET HIGH BIT
9550 JSR $FDED ;COUT
9560 LDA ($CE),Y ;GET CHARACTER AGAIN
9570 BMI .5 ;NEGATIVE = DONE
9580 INC $CE ;NEXT CHARACTER
9590 BNE .3
9600 INC $CF
9610 .4 BNE .3 ;ALWAYS!
9620 *
9630 * STORE RETURN ADDRESS ON STACK
9640 *
9650 .5 TYA ;ADD Y TO $CE
9660 CLC
9670 ADC $CE
9680 STA $CE
9690 BCC .6
9700 INC $CF
9710 .6 LDA $CF ;RESTORE STACK
9720 PHA
9730 LDA $CE
9740 PHA
9750 RTS
9760 *-------------------------------
9770 * LO-RES GRAPHIC ADDRESS TABLE
9780 *-------------------------------
9790 TBLEHI .DA #$04
9792 .DA #$04
9794 .DA #$05
9796 .DA #$05
9800 .DA #$06
9802 .DA #$06
9804 .DA #$07
9806 .DA #$07
9810 .DA #$04
9812 .DA #$04
9814 .DA #$05
9816 .DA #$05
9820 .DA #$06
9822 .DA #$06
9824 .DA #$07
9826 .DA #$07
9830 .DA #$04
9832 .DA #$04
9834 .DA #$05
9836 .DA #$05
9840 .DA #$06
9842 .DA #$06
9844 .DA #$07
9846 .DA #$07
9850 TBLELO .DA #$00
9852 .DA #$80
9854 .DA #$00
9856 .DA #$80
9860 .DA #$00
9862 .DA #$80
9864 .DA #$00
9866 .DA #$80
9870 .DA #$28
9872 .DA #$A8
9874 .DA #$28
9876 .DA #$A8
9880 .DA #$28
9882 .DA #$A8
9884 .DA #$28
9886 .DA #$A8
9890 .DA #$50
9892 .DA #$D0
9894 .DA #$50
9896 .DA #$D0
9900 .DA #$50
9902 .DA #$D0
9904 .DA #$50
9906 .DA #$D0
9910 *-------------------------------
9912 * DATA
9914 *-------------------------------
9916 SROW .HS 00
9918 COLOMN .HS 00
9920 SCOLOR .HS 00
9922 DOTE .HS 00
9924 COLDOT .HS 00
9926 LIFE .HS 00
9928 LEVEL .HS 00
9930 LENGTH .HS 00
9932 TAIL .HS 00
9934 HEAD .HS 00
9936 DX .HS 00
9938 DY .HS 00
9940 COUNT .HS 00
9942 BOXNUM .HS 00
9944 SCORE .HS 0000
9946 TEMP .HS 00
9948 TEMP2 .HS 00
9950 SCOUNT .HS 00
9952 SLEVEL .HS 00
9954 NCOUNT .HS 00
9956 TEMP3 .HS 00
9958 ARRAYX .BS 256
9960 ARRAYY .BS 256
9962 MUSICT .HS 161617171A1A1D
9964 .HS 1A1A1D1A1A1D16
9966 .HS 1617171A1A1D1A
9968 .HS 1A171716161617
9970 .HS 1A1D1A1D1A1D16
9972 .HS 171A1D1A1716
9974 KEYSTR .HS CDCCC9CA
9976 LEVELT .HS 78828C96BE