Mercurial > hg > Members > kono > os9 > sbc09
changeset 68:ec9ef70bf6e4
add game09
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 05 Aug 2018 10:34:37 +0900 |
parents | 02d742bf52e5 |
children | b6aabbe1a027 |
files | game09/asm09.game game09/disasm09.game game09/game09.asm |
diffstat | 3 files changed, 1983 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/game09/asm09.game Sun Aug 05 10:34:37 2018 +0900 @@ -0,0 +1,332 @@ +1 BX3A0DDC9909DDD305ND1C03SL080BSR070B--- +2 /CC240CCS250CEQ270CGE2C0CGT2E0CHI220C--- +3 HS240CIT9509LE2F0CLO250CLS230CLT2D0C--- +4 MI2B0CNE260CPL2A0CRA200CRN210CSR8D0C--- +5 VC280CVS290C/LR0F0BMP9C07OM030BWA3C04--- +6 /AA190DEC0A0B/ND0612OR9809QU0012XG1E10--- +7 /CB0112CC0212DB0312///NC0C0B/MP0E02SR9D02--- +8 //DA960ADBD60ADDDC08DS7E08DUDE08DX9E08--- +9 DY3E08EA3001SL080BSR040B/UL3D0D--- +10 /EG000BOP120D/RA9A0ARBDA0ARC1A04RG0512--- +11 /SH340FUL350F//MB0412OL090BOR060B--- +12 TI3B0DTS390D/BC9209ET0712EX1D0DTA9702TBD702TDDD02TS7F02--- +13 TUDF02TX9F02TY3F02UB9306WI3F0EYN130DYS3F04--- +14 /FR1F10ST0D0B/////// +100 .=5 "MC-6809 ASSEMBLER 1.6"/ +110 M=&+1 C=M+8 S=C+14 I=S+52 K=I+52 +120 A=0 O=0 B=0,3 M:B)=0 @=B+1 +121 /"MODE P/S/O/2/T"/ +122 D=$ ;=D="P" M:0)=1 +126 ;=D="2" /"PASS 2 OK?" D=$ #=270 +128 ;=D="T" !=9900 !=3000 !=9990 +130 ;=D="S" M:1)=1 +135 ;=D="O" M:2)=1 /"OBJECT set address=" O=? +140 ;=D<>13 #=122 +147 /"TEXT=" T=? L=T M(2)=O +150 J=0,25 I(J)=J+K K:J)=-1 @=J+1 H=K+J +160 G==+2 S(0)=G J=1,25 @ G=G+1 @=(G:0)="/") S(J)=G+1 @=J+1 +180 E=0 P=1 /"PASS 1"/ C(6)=-1 .=6 +190 @ !=700 L=L+2 !=900 X=0 ;=L:0)="*" #=250 +200 ;=L:X)<>" " !=1000 ;=#L:X) #=250 +210 !=1500 !=W*100+6900 +215 ;=W=$12 A=A+H:0) #=250 +220 A=A+(C(0)>0)+(C(1)>=0)+(C(2)>=0)+(C(3)>0) +230 A=A+(C(3)=2)+(C(3)=4) +250 !=500 ;=L(0)<0 E=1 !=10000 +260 @=(E) +270 /"PASS 2"/ L=T A=0 O=M(2) E=0 C(6)=-1 !=9900 +275 P=2 ;=M:0)=0 .=6 +280 @ !=700 C(5)=A X=0 L=L+2 ;=L:0)="*" #=307 +290 !=850 ;=L:X)=0 #=305 +300 !=1500 !=W*100+6900 ;=C(3)>0 !=100*C(3)+3500 +303 !=460 +307 ;=M:0) !=520 #=420 +400 !=900 !=500 +420 ;=L(0)<0 E=1 !=10000 +430 @=(E) // +435 ;=M:3)=0.(M:0)<>0) !=3000 +440 /"Total error=" ?=M:3) " END=" ??=A ///// +450 !=9990 #=-1 +460 ;=W=$12 #=480 +470 B=0,4 ;=C(B)>=0 O=O+1 A=A+1 ;=M:1)=1 O:-1)=C(B) +475 @=B+1 ] +480 ;=H:0)=0 ] +485 A=A+H:0) ;=M:1)<>1 O=O+H:0) ] +490 B=1,H:0) O:0)=H:B) O=O+1 @=B+1 ] +500 L=L+X ;=L:0) @ L=L+1 @=(#L:0)) +510 L=L+1 ] +520 ;=L:0)="*" .=21 #=600 +530 ??=C(5) " " ;=W<>$12 #=570 +540 ;=H:0)=0 .=16 #=600 +550 Z=1 !=750 !=600 ;=H:0)<7 ] +560 B=7,H:0) .=5 !=750 / @=B+6 ] +570 B=0,4 ;=C(B)>=0 ?$=C(B) #=580 +575 .=2 +580 ;=B<>3 " " +590 @=B+1 .=2 +600 X=0 ?(5)=L(-1) " " ;=L:X)=" " .=7 #=625 +610 ;=L:X)="*" #=630 +620 J=6 !=800 ;=#L:X) #=640 +625 X=X+1 J=4 !=800 +630 ;=L:X)<>0 @ $=L:X) X=X+1 @=(L:X)=0) +640 / #=500 +700 M:6)=0 J=0,4 C(J)=-1 @=J+1 ] +750 " " Z=Z,Z+5 ;=Z>H:0) .=2 #=770 +760 ?$=H:Z) +770 ;=Z&1=0 " " +780 @=Z+1 ] +800 J=0,J ;=L:X)&$DF=0 " " #=820 +810 $=L:X) X=X+1 +820 @=J+1 ] +850 ;=L:X)<>" " @ X=X+1 @=(L:X)&$DF=0) ] +860 ] +900 Z=0,5 $=8 @=Z+1 ?(5)=L(-1) " " ] +1000 K=L:X)-"A" X=X+1 +1010 ;=K>26+(K<0) "MISS LABEL" X=X-1 @ X=X+1 @=(L:X)&$DF=0) #=20000 +1020 Y=I(K) +1025 J=-1 @ J=J+1 D=L:X+J) @=(D<"0").(D>"Z").(J=5) ;=#J V=0 #=1040 +1030 ;=L:X)>Y:0) @ Y=Y+7 @=(L:X)<=Y:0)) +1035 V=-1 @ V=V+1 @=(L:X+V)<>Y:V)).(V=J) ;=L:X+V)>Y:V)&(V<J) Y=Y+7 #=1035 +1040 ;=V>4+(Y:V)=" ") "multi defnition" #=20000 +1050 ;=K<25 J=K+1,25 I(J)=I(J)+7 @=J+1 +1060 G=H H=H+7 V=Y-G/2 J=0 @ J=J-1 H(J)=G(J) @=(J<V) +1070 J=0,4 ;=L:X)>"/" Y:J)=L:X) X=X+1 #=1090 +1080 Y:J)=" " +1090 @=J+1 Y=Y+J Y(0)=A ] +1510 F=L+X+1 X=X+4 +1520 ;=F(0)=$4C42 #=1700 +1525 ;=F:0)<"A"+(F:0)>"Z") #=1595 +1530 G=F:0)-"A" K=S(G) G=S(G+1) F=F+1 +1540 ;=K(0)<>F(0) @ K=K+6 @=(K>=G+(K(0)=F(0))) ;=K>=G #=1595 +1568 J=K:2)-"0" G=K:3)-"0" W=K:5)-"0" +1570 G=G>9*-7+G J=J>9*-7+J W=W>9*-7+W +1584 ;=K:4)="1" W=W+16 +1590 C(1)=J*16+G ] +1595 "OPCODE?" X=X-3 W=13 +1600 Z=0,2 C(Z)=$12 @=Z+1 #=20000 +1700 F=F+1 !=1530 X=X+1 ;=W<>12 ] +1710 W=17 ] +2000 K=L:X)-"A" ;=K<0+(K>26) "label?" #=20000 +2010 Y=I(K) X=X+1 +2015 J=-1 @ J=J+1 K=L:X+J) @=(K<"0").(K>"Z").(J=5) ;=#J U=0 #=2060 +2020 ;=L:X)>Y:0) @ Y=Y+7 @=(L:X)<=Y:0)) +2025 U=-1 @ U=U+1 @=(L:X+U)<>Y:U)).(U=J) ;=L:X+U)>Y:U)&(U<J) Y=Y+7 #=2025 +2030 X=X+U +2040 K=L:X) ;=K>"0" ;=K<"[" X=X+1 #=2040 +2060 ;=U=5.(Y:U)=" ") Y=Y+5 D=Y(0) U=1 ] +2070 U=0 D=0 ;=P=2 "Undifined lable" #=20000 +2080 ] +3000 J=0,25 K=I(J) +3005 ;=K:0)=$FF #=3020 +3007 @ $=J+"A" Z=0,4 $=K:Z) @=Z+1 +3010 .=2 K=K+7 ??=K(-1) .=4 @=(K:0)=$FF +3020 @=J+1 / ] +3500 ] +3600 !=6000 C(3)=D&$FF ] +3700 !=6000 C(4)=D C(3)=C:8) C:8)=0 ] +3800 !=3950 !=6000 D=D-A-Z +3810 ;=(D<-$80)+(D>$7F) "S/branch too long." #=20000 +3820 C(3)=D&$FF ] +3900 !=3950 !=6000 D=D-A-1-Z +3910 C(4)=D C(3)=C:8) C:8)=0 ] +3950 Z=2 +3960 ;=C(0)>0 Z=Z+1 +3970 ;=C(2)>0 Z=Z+1 +3980 ] +4000 Q=0 R=$10 J=0 M:7)=0 +4010 X=X+1 +4020 K=L:X) ;=K=0 "missing operand." #=20000 +4030 ;=K<>"#" #=4070 +4040 X=X+1 R=-$10 ;=(W=9)+(W=10) C(3)=1 ] +4050 ;=(W>4)&(W<9) C(3)=2 ] +4060 "can't immediate." #=20000 +4070 ;=K="[" X=X+1 K=L:X) M:7)=1 +4080 ;=K="," V=X+1 #=4520 +4090 ;=L:X+1)="," ;=(K="A")+(K="B")+(K="D") V=X+2 #=4500 +4100 ;=K="<" Q=Q+1 X=X+1 K=L:X) #=4100 +4105 ;=K=">" Q=3 X=X+1 K=L:X) +4110 V=X +4120 @ V=V+1 K=L:V) @=(K=",")+#(K&$DF) +4130 ;=K="," V=V+1 #=5000 +4140 ;=M:7)=1 C(2)=$9F C(3)=2 ] +4150 ;=W=1 "Nonindex LEA" #=20000 +4155 ;=Q=3 #=4170 +4160 ;=Q R=0 C(3)=1 ] +4162 ;=C(6)<0 #=4170 +4164 Z=X !=6000 X=Z ;=#U "DP undef can't pass 2" #=20000 +4166 ;=C:13)*$100=(D&$FF00) R=0 C(3)=1 ] +4170 R=$20 C(3)=2 ] +4500 C(2)=$80+"B"+5-K ;=K="D" C(2)=$8B +4510 !=5500 #=5200 +4520 Z=4 C(2)=$80 +4530 ;=L:V)="-" V=V+1 Z=2 ;=L:V)="-" V=V+1 Z=3 +4540 !=5500 V=V+1 ;=Z<>4 #=4560 +4550 ;=L:V)="+" V=V+1 Z=0 ;=L:V)="+" V=V+1 Z=1 +4560 ;=#M:7) C(2)=C(2)+Z ] +4570 ;=(Z=0)+(Z=2) "[can't -/+]" #=20000 +4580 C(2)=C(2)+$10+Z ] +5000 ;=L:V)<>"P" #=5030 +5005 ;=Q=3 #=5020 +5010 ;=Q C(2)=$8C C(3)=3 #=5200 +5020 C(2)=$8D C(3)=4 #=5200 +5030 ;=Q=1 #=5090 +5033 ;=Q=3 #=5100 +5035 Z=X !=6000 X=Z ;=Q=2 D=D&$1F #=5055 +5040 ;=F ;=#U "Offset undifined Can't pass2" #=20000 +5045 ;=D=0 C(2)=$84 !=5500 #=5200 +5050 ;=(D<-$10)+(D>$F) #=5080 +5055 ;=M:7) #=5080 +5060 ;=D<0 D=D+$20 +5070 C(2)=D !=5500 ] +5080 ;=(D<-$80)+(D>$7F) #=5100 +5090 C(2)=$88 !=5500 C(3)=1 #=5200 +5100 C(2)=$89 !=5500 C(3)=2 +5200 ;=M:7) C(2)=C(2)+$10 +5210 ] +5500 J=L:V) ;=J="X" ] +5520 ;=J="Y" C(2)=C(2)+$20 ] +5530 ;=J="U" C(2)=C(2)+$40 ] +5540 ;=J="S" C(2)=C(2)+$60 ] +5550 "Index.Regista?" #=20000 +6000 F=0 ;=L:X)=" " X=X+1 +6005 ;=W<>$12 ;=M:6)=$FF ] +6006 M:6)=-1 +6010 B=L:X) D=0 ;=B="."+(B="*") D=A X=X+1 B=L:X) #=6100 +6015 ;=B&$DF=0 #=6140 +6020 ;=(B>="A")&(B<="Z") F=F+1 !=2000 B=L:X) #=6100 +6030 ;=B<>"$" #=6060 +6040 X=X+1 B=L:X) ;=(B>"9")&(B<"A")+(B<"0")+(B>"F") #=6100 +6050 @ D=D*16+B-"0" ;=B>"9" D=D-7 +6055 X=X+1 B=L:X) @=(B>"9")&(B<"A")+(B<"0")+(B>"F") +6060 ;=B=""" D=L:X+1) X=X+3 B=L:X) #=6100 +6070 ;=(B<"0")+(B>"9") #=6100 +6080 @ D=D*10+B-"0" X=X+1 B=L:X) @=(B<"0")+(B>"9") +6100 ;=B="+" X=X+1 G=D !=6010 D=G+D #=6120 +6101 ;=B="*" X=X+1 G=D !=6010 D=G*D #=6120 +6102 ;=B<>"/" #=6110 +6104 X=X++1 G=D !=6010 ;=#U ] +6106 ;=D<>0 D=G/D #=6120 +6108 ;=P=2 "ZERO DIV" #=20000 +6109 D=0 #=6120 +6110 ;=B="-" X=X+1 G=D !=6010 D=G-D +6130 ;=B=","+(B="]")+(B&$DF=0) ] +6140 "ileagal operand" D=0 #=20000 +7000 K=L:X) X=X+1 !=7010 #=4000 +7010 ;=K="X" C(1)=$30 ] +7020 ;=K="Y" C(1)=$31 ] +7030 ;=K="S" C(1)=$32 ] +7040 ;=K="U" C(1)=$33 ] +7050 "LEA regista?" #=20000 +7100 !=4000 ;=C(1)<>$E #=7110 +7105 ;=R C(1)=$5E+R ] +7106 ] +7110 ;=C(1)<$80 C(0)=$10 C(1)=C(1)+$60+R ] +7120 C(1)=C(1)+R ] +7200 ;=L:X)<>"C" W=9 C(1)=$94 #=7800 +7210 W=4 +7300 !=850 ;=L:X)=0 #=4020 +7302 ;=L:X+1)="#" X=X+2 C(3)=1 ] +7303 ;=C(1)=$3F "Immediate only" #=20000 +7304 G=0 @ X=X+1 K=L:X) X=X+1 !=7350 @=(L:X)<>",") ;=C(1)=$1A C(2)=G ] +7306 C(2)=G!$FF ] +7350 ;=K="C" G=G.1 ] +7351 ;=K="V" G=G.2 ] +7352 ;=K="Z" G=G.4 ] +7353 ;=K="N" G=G.8 ] +7354 ;=K="I" G=G.$10 ] +7355 ;=K="H" G=G.$20 ] +7356 ;=K="F" G=G.$40 ] +7357 ;=K="E" G=G.$80 ] +7358 "Not cc frg." #=20000 +7400 ;=L:X)<>"D" W=9 C(1)=$9B #=7800 +7450 #=7850 +7500 ;=L:X)<>"D" W=9 C(1)=$90 #=7800 +7510 #=7850 +7600 K=L:X) +7610 ;=K="D" C(1)=$93 C(0)=$10 #=7850 +7620 ;=K="U" C(1)=$93 C(0)=$11 #=7850 +7630 ;=K="Y" C(0)=$10 #=7850 +7640 ;=K="S" C(0)=$11 #=7850 +7650 ;=K<>"X" W=9 C(1)=$91 #=7800 +7660 #=7850 +7700 ;=C(1)<$80 C(0)=$10 C(1)=C(1)+$60 +7710 #=7900 +7800 ;=L:X)="B" C(1)=C(1)+$40 #=7850 +7810 ;=L:X)<>"A" "Not A,B Regista." #=20000 +7850 X=X+1 +7900 !=4000 C(1)=C(1)+R ] +8000 ;=L:X)="B" C(1)=C(1)+$50 ] +8010 ;=L:X)="A" C(1)=C(1)+$40 ] +8015 ;=L:X)="D"&(C(1)=$F) C(1)=$4F C(2)=$5F ] +8020 !=4000 +8030 ;=R C(1)=R+$50+C(1) ] +8040 ] +8100 C(3)=3 ] +8200 ] +8300 ;=L:X)="2" C(0)=$10 ] +8310 ;=L:X)="3" C(0)=$11 ] +8320 ] +8400 ;=L:X)="U" C(1)=C(1)+2 #=8410 +8405 ;=L:X)<>"S" "Not STACK Regista." #=20000 +8412 G=0 X=X+1 @ X=X+1 K=L:X) !=8415 @ X=X+1 K=L:X) @=(K<"/") +8413 @=(K<>",") C(2)=G ] +8415 ;=K="A" G=G.2 ] +8420 ;=K="B" G=G.4 ] +8425 ;=K="C" G=G.1 ] +8430 ;=K="X" G=G.$10 ] +8435 ;=K="Y" G=G.$20 ] +8440 ;=K="U".(K="S") G=G.$40 ] +8445 ;=K="P" G=G.$80 ] +8450 ;=K<>"D" "REG? PSH/PUL" #=20000 +8455 ;=L:X+1)="P" G=G.8 ] +8460 G=G.6 ] +8500 ;=L:X)=0 K=0 #=8565 +8502 X=X+1 !=8510 @ K=L:X) X=X+1 @=(K=",")+(K=0) +8504 ;=#K #=8565 +8505 Y=G !=8510 ;=Y<8<>(G<8) "tfr 16<>8" #=20000 +8508 C(2)=Y*16+G ] +8510 K=L:X) +8515 ;=K="A" G=8 ] +8520 ;=K="B" G=9 ] +8525 ;=K="C" G=10 ] +8530 ;=K<>"D" #=8545 +8535 ;=L:X+1)="P" G=$B ] +8540 G=0 ] +8545 ;=K="X" G=1 ] +8550 ;=K="Y" G=2 ] +8555 ;=K="U" G=3 ] +8560 ;=K="S" G=4 ] +8565 ;=K<>"P" "REG? TFR" #=20000 +8570 G=5 ] +8600 C(3)=4 +8610 ;=C(1)=$20 C(1)=$16 ] +8620 ;=C(1)=$8D C(1)=$17 ] +8630 C(0)=$10 ] +8700 K=C(1) C(1)=-1 Z=0 !=K*100+8800 H:0)=Z ] +8800 ;=P=2 C(5)=X X=0 !=2000 X=C(5) +8810 C(5)=Y !=6000 Y=C(5) Y(0)=D C(5)=D ] +8900 @ X=X+1 !=6000 !=9800 +8910 @=(L:X)<>",") ] +9000 X=X+1 +9010 ;=L:X)<>""" "chr?" #=20000 +9015 X=X+1 @ D=L:X) !=9800 +9020 X=X+1 @=(L:X)="""+(L:X)=0)) +9030 K=L+X ;=K(0)=$2222 #=9015 +9040 ;=K(0)=$222C X=X+1 #=8900 +9050 ] +9100 @ X=X+1 !=6000 !=9700 +9110 @=(L:X)<>",") ] +9200 !=6000 A=A+D O=O+D ] +9300 !=6000 ;=#M:2) O=D +9310 A=D C(5)=D ] +9471 E=1 ] +9500 !=850 +9510 !=6000 ;=#U "DP undef" C(5)=-1 C(6)=-1 #=20000 +9520 C(6)=D C(5)=D ] +9700 Z=Z+1 H:Z)=D&$FF00/$100 +9800 Z=Z+1 H:Z)=D ] +9910 ] +10000 ] +20000 M:3)=M:3)+1 / ;=M:0)<>0&(P=2) ] +20005 ?(5)=L(-1) +20100 Z=0 @ $=L:Z) Z=Z+1 @=(#L:Z)) / .=6 ]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/game09/disasm09.game Sun Aug 05 10:34:37 2018 +0900 @@ -0,0 +1,242 @@ +100 "ADDRESS=" A=? +110 "TO =" D=? @ !=900 +120 @=(A>D) #=-1 +900 / ??=A .=20 E=A !=1000 +910 $=$D .=5 B=0,5 ;=E+B>=A .=3 #=930 +920 ?$=E:B) " " +930 @=B+1 .=30 B=0,5 ;=E+B>=A #=970 +950 ;=E:B)>" " $=E:B) #=970 +960 " " +970 @=B+1 +990 ] +1000 ;=(A:0)>$7F) #=1200 +1010 ;=(A:0)=$10) #=1400 +1020 ;=(A:0)=$11) #=1600 +1030 ;=(A:0)=$12) "NOP" #=1800 +1040 ;=(A:0)=$13) "SYNC" #=1800 +1050 ;=(A:0)=$16) "LBRA" #=2000 +1060 ;=(A:0)=$17) "LBSR" #=2000 +1070 ;=(A:0)=$19) "DAA" #=1800 +1080 ;=(A:0)=$1A) "ORCC" #=2200 +1090 ;=(A:0)=$1C) "ANDCC" #=2400 +1100 ;=(A:0)=$1D) "SEX" #=1800 +1110 ;=(A:0)=$1E) "EXG" #=2600 +1120 ;=(A:0)=$1F) "TFR" #=2600 +1130 ;=((A:0)/16)=1) #=3200 +1140 ;=((A:0)/16)=2) #=2800 +1150 ;=((A:0)/16)=3) #=3000 +1160 ;=(A:0)=$4E) #=3200 +1170 ;=(A:0)=$5E) #=3200 +1180 #=3400 +1200 ;=(A:0)=$8D) "BSR" #=3600 +1210 ;=(%(A:0)/16)=3) #=3800 +1220 ;=(%(A:0)/16)=7) #=4000 +1230 ;=(%(A:0)/16)=13) #=4000 +1240 ;=(%(A:0)/16)=15) #=4000 +1250 ;=(%(A:0)/16)>11) #=4200 +1260 B=%(A:0)/16) !=4400 +1270 ;=(A:0)>$BF) #=4600 +1275 "A" +1280 !=7200 +1290 ;=(B=0) #=7000 +1300 ;=(B=1) A=A+2 " $" ?$=A:-1) ] +1310 ;=(B=2) #=4800 +1320 " $" A=A+3 ??=A(-1) ] +1400 ;=(A:1)=$20) #=5000 +1410 ;=(A:1)=$3F) A=A+2 "SWI2" ] +1420 ;=((A:1)/16)=2 A=A+1 #=5200 +1430 ;=(A:1)=$8F) #=5000 +1440 ;=(A:1)=$CF) #=5000 +1450 ;=(A:1)>$BF) #=5400 +1455 ;=(A:1)<$80) #=5000 +1460 !=7400 +1470 A=A+1 +1480 ;=(B=3) "CMPD" #=1280 +1490 ;=(B=12) "CMPY" #=1280 +1500 ;=(B=14) "LDY" #=1280 +1510 ;=(B=15) "STY" #=1280 +1520 #=5000 +1600 ;=(A:1)=$3F) A=A+2 "SWI3" ] +1610 ;=(A:1)<$80) #=5000 +1620 ;=(A:1)>$BF) #=5000 +1630 A=A+1 !=7600 +1640 ;=(B=3) "CMPU" #=1280 +1650 ;=(B=12) "CMPS" #=1280 +1660 #=3200 +1800 A=A+1 ] +2000 A=A+1 C=A+2+A(0) +2010 " $" ??=C A=A+2 ] +2200 B=A:1) +2210 ;=(B>$7F) ",E" B=B-$80 +2220 ;=(B>$3F) ",F" B=B-$40 +2230 ;=(B>$1F) ",H" B=B-$20 +2240 ;=(B>$F) ",I" B=B-$10 +2250 ;=(B>7) ",N" B=B-8 +2260 ;=(B>3) ",Z" B=B-4 +2270 ;=(B>1) ",V" B=B-2 +2280 ;=(B>0) ",C" +2290 A=A+2 ] +2400 B=$FF-A:1) #=2210 +2600 .=1 B=A:1)/16 !=5600 +2610 "," !=7400 !=5600 +2620 A=A+2 ] +2800 !=5800 B=A:1) +2810 ;=(B>$7F) B=B+$FF00 +2820 B=B+A+2 " $" ??=B A=A+2 ] +3000 +3010 ;=A:0)=$3F "SYS" #=7030 +3020 ;=(A:0)=$3D) "MUL" #=1800 +3030 ;=(A:0)=$3C) "CWAI" #=2400 +3040 ;=(A:0)=$3B) "RTI" #=1800 +3050 ;=(A:0)=$3A) "ABX" #=1800 +3060 ;=(A:0)=$39) "RTS" #=1800 +3070 ;=(A:0)>$37) #=3200 +3080 ;=(A:0)<$34) #=6000 +3090 B=%(A:0)/2) +3100 ;=(B=0) "PSH" #=3120 +3110 "PUL" +3120 ;=(A:0)>$35) "U" #=3140 +3130 "S" +3140 #=6200 +3200 A=A+1 "UNDF" #=1800 +3400 !=7600 +3410 ;=(B=0) "NEG" #=6400 +3420 ;=(B=3) "COM" #=6400 +3430 ;=(B=4) "LSR" #=6400 +3440 ;=(B=6) "ROR" #=6400 +3450 ;=(B=7) "ASR" #=6400 +3460 ;=(B=8) "ASL" #=6400 +3470 ;=(B=9) "ROL" #=6400 +3480 ;=(B=10) "DEC" #=6400 +3490 ;=(B=12) "INC" #=6400 +3500 ;=(B=13) "TST" #=6400 +3510 ;=(B=14) "JMP" #=6400 +3520 ;=(B=15) "CLR" #=6400 +3530 #=3200 +3600 B=A:1) #=2810 +3800 !=7200 +3810 ;=(A:0)>$BF) "ADDD" #=1280 +3820 "SUBD" #=1280 +4000 !=7200 +4010 ;=(B=0) #=3200 +4020 #=1250 +4200 !=7600 +4210 ;=(A:0)>$BF) #=6600 +4220 ;=(B=12) "CMPX" #=1280 +4230 ;=(B=13) "JSR" #=1280 +4240 ;=(B=14) "LDX" #=1280 +4250 "STX" #=1280 +4400 +4410 ;=(B=0) "SUB" ] +4420 ;=(B=1) "CMP" ] +4430 ;=(B=2) "SBC" ] +4440 ;=(B=4) "AND" ] +4450 ;=(B=5) "BIT" ] +4460 ;=(B=6) "LD" ] +4470 ;=(B=7) "ST" ] +4480 ;=(B=8) "EOR" ] +4490 ;=(B=9) "ADC" ] +4500 ;=(B=10) "OR" ] +4510 "ADD" ] +4600 "B" #=1280 +4800 B=%(A:1)/32) +4810 ;=(A:1)>$7F) #=6800 +4820 ;=(B>15) B=B+$FFE0 +4830 " " ?=B #=8000 +5000 A=A+2 "UNDF" ] +5200 "L" !=5800 +5210 #=2000 +5400 !=7400 +5410 ;=(B=14) "LDS" A=A+1 #=1280 +5420 "STS" A=A+1 #=1280 +5600 ;=(B=0) "D" ] +5610 ;=(B=1) "X" ] +5620 ;=(B=2) "Y" ] +5630 ;=(B=3) "U" ] +5640 ;=(B=4) "S" ] +5650 ;=(B=5) "PC" ] +5660 ;=(B=8) "A" ] +5670 ;=(B=9) "B" ] +5680 ;=(B=10) "CC" ] +5690 "DPR" ] +5800 "B" !=7600 +5810 ;=(B=0) "RA" ] +5820 ;=(B=1) "RN" ] +5830 ;=(B=2) "HI" ] +5840 ;=(B=3) "LS" ] +5850 ;=(B=4) "HS" ] +5860 ;=(B=5) "LO" ] +5870 ;=(B=6) "NE" ] +5880 ;=(B=7) "EQ" ] +5890 ;=(B=8) "VC" ] +5900 ;=(B=9) "VS" ] +5910 ;=(B=10) "PL" ] +5920 ;=(B=11) "MI" ] +5930 ;=(B=12) "GE" ] +5940 ;=(B=13) "LT" ] +5950 ;=(B=14) "GT" ] +5960 "LE" ] +6000 "LEA" !=7600 +6010 ;=(B=0) "X" #=4800 +6020 ;=(B=1) "Y" #=4800 +6030 ;=(B=2) "S" #=4800 +6040 "U" #=4800 +6200 B=A:1) +6210 ;=(B>$7F) ",PC" B=B-$80 +6220 ;=(B>$3F) ",U" B=B-$40 +6230 ;=(B>$1F) ",Y" B=B-$20 +6240 ;=(B>15) ",X" B=B-16 +6250 ;=(B>7) "DPR" B=B-8 +6260 ;=(B>3) ",B" B=B-4 +6270 ;=(B>1) ",A" B=B-2 +6280 ;=(B>0) ",C" +6290 A=A+2 ] +6400 B=A:0)/16 +6410 ;=(B=4) "A" #=1800 +6420 ;=(B=5) "B" #=1800 +6430 ;=(B=0) B=1 #=1290 +6440 B=B-4 #=1290 +6600 ;=(B=12) "LDD" #=1280 +6610 ;=(B=13) "STD" #=1280 +6620 ;=(B=14) "LDU" #=1280 +6630 "STU" #=1280 +6800 ;=(B>15) #=8200 +6810 .=1 #=8400 +6820 ;=(B=12) A=A+3 ??=A(-1) ] +6830 ;=(B=9) ?$=A:1) A=A+4 ??=A(-1) ] +6840 ;=(B=13) ?$=A:1) A=A+4 ??=A(-1) ] +6850 ?$=A:1) A=A+2 ] +7000 !=7600 +7010 ;=(B=3) #=7800 +7020 ;=(B>11) #=7800 +7030 " # $" ?$=A:1) +7040 ;=A:1)>" "*(A:1<$80) "=" $=A:1) +7050 #=2620 +7200 B=%((A:0)/16)/4) ] +7400 B=%(A:1)/16) ] +7600 B=%(A:0)/16) ] +7800 " # $" A=A+3 ??=A(-1) ] +8000 B=%((A:1)/32)/4) "," A=A+2 +8010 ;=(B=0) "X" ] +8020 ;=(B=1) "Y" ] +8030 ;=(B=2) "U" ] +8040 "S" ] +8200 B=B-16 +8210 ;=((B=0)+(B=2)) #=5000 +8220 ;=(B=15) A=A+4 " [$" ??=A(-1) "]" ] +8230 " [" !=8400 "]" ] +8400 ;=(B=4) #=8000 +8410 ;=(B=0) !=8000 "+" ] +8420 ;=(B=1) !=8000 "++" ] +8430 ;=(B=2) !=8000 "-" ] +8440 ;=(B=3) !=8000 "--" ] +8450 ;=(B=8) "$" ??=A:2) !=8000 A=A+1 ] +8460 ;=(B=9) "$" ??=A(1) !=8000 A=A+2 ] +8470 ;=(B=6) "A" #=8000 +8480 ;=(B=5) "B" #=8000 +8490 ;=(B=11) "D" #=8000 +8500 ;=(B=12) B=A:2) A=A+3 #=8600 +8510 ;=(B=13) A=A+4 B=A(-1) #=8610 +8520 #=5000 +8600 ;=(B>$7F) B=B+$FF00 +8610 "$" ??=B+A ",PC" ]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/game09/game09.asm Sun Aug 05 10:34:37 2018 +0900 @@ -0,0 +1,1409 @@ +LC000 BRA LC005 +LC002 NOP +LC003 BRA LC014 +LC005 LDA #$FB + TFR A,DP + LDX #LE000 + STX <$7E + STX <$50 + LDA #$FF + STA ,X +LC014 LBSR LCD00 + LDA #$FB + TFR A,DP + LDX #LEFFF + STX <$58 +LC020 LDA #$FF + STA <$8C +LC024 LDS #LFE00 + LDU #LFD80 + LEAX >LC63F,PCR + LBSR LC165 +LC032 LBSR LC370 + BCS LC06D + STX <$42 + LBSR LC1D3 + BEQ LC024 +LC03E BSR LC09C +LC040 BMI LC024 + STX <$42 +LC044 LEAX +$02,X + LDA ,X+ + CMPA #$20 + BNE LC05B + LBSR LC1D3 + BNE LC05F + LEAX +$01,X + TST ,X + BRA LC040 +LC057 LDS #LFE00 +LC05B BSR LC0A8 + BRA LC040 +LC05F LDX <$42 + STX <$84 + BSR LC0A0 + BMI LC024 + CMPX <$84 + BEQ LC03E + BRA LC044 +LC06D STX <$86 + STD <$4A + LDB ,X + CMPB #$2F + BNE LC0B1 +LC077 BSR LC09C +LC079 LBSR LC397 + TST ,X + BMI LC024 + BSR LC087 + LBSR LC173 + BRA LC079 +LC087 LDD ,X++ + PSHS X + LBSR LC443 + PULS X + LBRA LC165 +LC093 LDX <$42 + LEAX +$02,X +LC097 TST ,X+ + BNE LC097 + RTS +LC09C LDX <$7E +LC09E STX <$42 +LC0A0 LDD ,X + BMI LC0B0 + SUBD <$4A + BCC LC0AF +LC0A8 LBSR LC173 + BSR LC093 + BRA LC09E +LC0AF CLRA +LC0B0 RTS +LC0B1 LDX <$4A + BEQ LC077 + BMI LC117 + LDX <$50 + LDA ,X + INCA + BNE LC117 + BSR LC09C + BMI LC0DE + LDX ,X + CMPX <$4A + BNE LC0DE + BSR LC093 + LDY <$42 +LC0CD LDA ,X + STA ,Y + CMPX <$50 + BEQ LC0DB + LEAX +$01,X + LEAY +$01,Y + BRA LC0CD +LC0DB STY <$50 +LC0DE LDX <$86 + LDB #$03 + TST ,X+ + BEQ LC114 +LC0E6 INCB + TST ,X+ + BNE LC0E6 + CLRA + ADDD <$50 + TFR D,Y + SUBD <$58 + BCC LC117 + LDX <$50 + STY <$50 + LEAX +$01,X + LEAY +$01,Y +LC0FD LDB ,-X + STB ,-Y + CMPX <$42 + BNE LC0FD + LDY <$4A + STY ,X++ + LDY <$86 +LC10E LDB ,Y+ + STB ,X+ + BNE LC10E +LC114 LBRA LC032 +LC117 LBRA LC024 +LC11A LDX #LFB8F + TST <$8C + BNE LC124 + LDX #LFB95 +LC124 LEAY <LC159,PCR +LC127 PSHS X + LDX ,Y++ + PSHU X + LBSR LC335 + PULU X + PULS X + PSHS A + LDA <$83 + ADDA #$30 + STA ,X+ + PULS A + TST +$01,Y + BNE LC127 + CLR ,X + COM ,-X + PSHS X + LEAX -$05,X + CLRA +LC14B LEAX +$01,X + INCA + LDB ,X + CMPB #$30 + BEQ LC14B + COM [,S++] + SUBA #$06 +LC158 RTS +LC159 BEQ LC16B + COM <$E8 + NEG <$64 + NEG <$0A + NEG <$01 + NEG <$00 +LC165 CLRA +LC166 STA <$94 +LC168 LDB ,X+ + CMPB <$94 + BEQ LC158 + LBSR LC412 + BRA LC168 +LC173 LBSR LC650 + LBCS LC024 + RTS +LC17B CMPA #$20 + BEQ LC1D1 + CLR <$4A + CLR <$4B + LDB +$01,X + BITB #$DF + BNE LC1A6 + CMPA #$5D + BNE LC195 + PULU X,B,A + STD <$46 + STX <$42 + BRA LC1C6 +LC195 CMPA #$40 + BNE LC1A6 + LEAX +$01,X + STX <$46 + CLRA + CLRB + LDY <$42 + PSHU Y,X,B,A + BRA LC1D3 +LC1A6 CMPA #$22 + BNE LC1CA + LEAX +$01,X + BSR LC166 + BRA LC1D3 +LC1B0 CMPA #$5C + BNE LC1B9 + LBSR LC676 + BRA LC1D3 +LC1B9 STX <$84 + BSR LC1EC + LBSR LC39F + BSR LC173 + LDX <$4A + BNE LC1D7 +LC1C6 LDX <$46 + BRA LC1D3 +LC1CA CMPA #$2F + BNE LC1B0 + LBSR LC397 +LC1D1 LEAX +$01,X +LC1D3 LDA ,X + BNE LC17B +LC1D7 RTS +LC1D8 PSHS A + LEAX +$01,X + BSR LC1F6 + LDX <$46 +LC1E0 LDY <$42 + PSHU Y,X,B,A + PULS PC,B,A +LC1E7 LDA #$3D + LBRA LC4F9 +LC1EC LDA ,X+ + BITA #$DF + BEQ LC1E7 + CMPA #$3D + BNE LC1EC +LC1F6 LBSR LC521 +LC1F9 PSHS B + LDB ,X + BITB #$DF + BEQ LC210 + CMPB #$29 + BEQ LC214 + CMPB #$2C + BEQ LC1D8 + PULS B + LBSR LC29C + BRA LC1F9 +LC210 STX <$46 + PULS PC,B +LC214 LEAX +$01,X + PULS PC,B +LC218 CMPB #$3F + BNE LC22E + PSHS X + STB <$8C + LBSR LC5D8 + BSR LC1F6 + PULS X + LEAX +$01,X + RTS + LEAX +$01,X + BRA LC1F6 +LC22E BSR LC287 + CMPA #$3A + BEQ LC239 + BSR LC26E +LC236 LDD ,Y + RTS +LC239 BSR LC269 + CLRA +LC23C LDB ,Y +LC23E RTS +LC23F CMPB #$22 + BCS LC218 + CMPB #$2D + BHI LC218 + SUBB #$22 + LSLB + LEAY <LC251,PCR + LDD B,Y + JMP D,Y + +LC251 fdb LC6EC-* 049b + fdb LC535-* 02e2 + fdb LC5A1-* 034c + fdb LC545-* 02ee + fdb LC236-* ffdd + fdb LC54E-* 02f3 + fdb LC236-* ffd9 + fdb LC23C-* ffdd + fdb LC23E-* ffdd + fdb LC53F-* 02dc + fdb LC242-* ffdd + fdb LC53F-* 02d8 + +LC269 BSR LC279 + LEAY D,Y + RTS +LC26E CMPA #$28 + BNE LC292 + BSR LC279 + LSLB + ROLA + LEAY D,Y + RTS +LC279 BSR LC292 + LDY ,Y + PSHS Y + LEAX +$01,X + LBSR LC1F6 + PULS PC,Y +LC287 LDB ,X+ +LC289 LDA ,X+ + CMPA #$41 + BPL LC289 + LEAX -$01,X + RTS + +LC292 ANDB #$3F + CLRA + LSLB + ADDD #LFB04 + TFR D,Y + RTS +LC29C PSHU B,A + LDD ,X+ + PSHS B,A + SUBB #$3D + BEQ LC2A9 + DECB + BNE LC2AB +LC2A9 LEAX +$01,X +LC2AB LBSR LC521 + PULU Y + EXG D,Y + PSHU Y,B,A + PULS B,A + CMPA #$3D + BNE LC2C4 + PULU B,A + SUBD ,U++ + BNE LC2E4 +LC2C0 CLRA + LDB #$01 + RTS +LC2C4 CMPA #$3C + BNE LC2E7 + CMPB #$3D + BEQ LC2D7 + CMPB #$3E + PULU B,A + BNE LC2E0 + SUBD ,U++ + BNE LC2C0 + RTS +LC2D7 PULU B,A + SUBD ,U++ + BLE LC2C0 + CLRA + CLRB + RTS +LC2E0 SUBD ,U++ + BLT LC2C0 +LC2E4 CLRA + CLRB + RTS +LC2E7 CMPA #$3E + BNE LC2FF + CMPB #$3D + PULU B,A + BNE LC2F8 + SUBD ,U++ + BGE LC2C0 + CLRA + CLRB + RTS +LC2F8 SUBD ,U++ + BGT LC2C0 + CLRA + CLRB + RTS +LC2FF CMPA #$2B + BNE LC308 + PULU B,A + ADDD ,U++ + RTS +LC308 CMPA #$2D + BNE LC311 + PULU B,A + SUBD ,U++ + RTS +LC311 CMPA #$2A + LBNE LC653 + PULU B,A +LC319 EXG A,B + PSHU B,A + LDB +$03,U + MUL + STD <$82 + BSR LC32B + BSR LC32B + LDD <$82 + LEAU +$02,U + RTS +LC32B PULU A + LDB +$01,U + MUL + ADDB <$82 + STB <$82 + RTS +LC335 CLR ,-S +LC337 INC ,S + LSL +$01,U + ROL ,U + BCC LC337 + ROR ,U + ROR +$01,U + CLR <$82 + CLR <$83 +LC347 SUBD ,U + BCC LC351 + ADDD ,U + ANDCC #$FE + BRA LC353 +LC351 ORCC #$01 +LC353 ROR <$83 + ROR <$82 + DEC ,S + BEQ LC361 + LSR ,U + ROR +$01,U + BRA LC347 +LC361 LEAS +$01,S + RTS +LC364 LDB ,X + CMPB #$30 + BCS LC36D + CMPB #$3A + RTS +LC36D ANDCC #$FE + RTS +LC370 LBSR LC5D8 +LC373 BSR LC364 + BCC LC396 + CLRA + CLRB +LC379 ADDB ,X+ + ADCA #$00 + SUBD #LC030 + PSHU B,A + BSR LC364 + LDD ,U + BCC LC392 + LSLB + ROLA + LSLB + ROLA + ADDD ,U++ + LSLB + ROLA + BRA LC379 +LC392 PULU B,A + ORCC #$01 +LC396 RTS +LC397 LDB #$0D + BSR LC39D +LC39B LDB #$0A +LC39D BRA LC412 +LC39F PSHS B,A + LDA #$01 + STA <$8C + LDX <$84 + LDB ,X + CMPB #$2E + BNE LC3BA + PULS A + LDA ,S+ +LC3B1 BEQ LC3C4 + LDB #$20 + BSR LC412 + DECA + BRA LC3B1 +LC3BA CMPB #$3B + BNE LC3C5 + LDD ,S++ + LBEQ LC057 +LC3C4 RTS +LC3C5 CMPB #$40 + BNE LC3E4 + LDB +$02,X + LBSR LC292 + PULS B,A + STD ,Y + PULU B,A + SUBD ,Y + BLT LC3E1 + PULU X,B,A + STD <$46 + STX <$42 + LEAU -$06,U + RTS +LC3E1 LEAU +$04,U + RTS +LC3E4 CMPB #$26 + BNE LC3FA +LC3E8 LDB +$01,X + CMPB #$3D + BNE LC3FA + LDD ,S++ + BNE LC3F9 + LDX <$7E + STX <$50 + DECA + STA ,X +LC3F9 RTS +LC3FA CMPB #$21 + BNE LC40C + PULS B,A + STD <$4A + BEQ LC40B + LDY <$42 + LDX <$46 + PSHU Y,X +LC40B RTS +LC40C CMPB #$24 + BNE LC415 + PULS B,A +LC412 LBRA LC64A +LC415 CMPB #$3F + BNE LC449 + LDB +$01,X + CMPB #$28 + LBNE LC56E + LBSR LC51F +LC424 STB <$8E + PULS B,A + BSR LC433 + ADDA <$8E + BMI LC430 + BSR LC3B1 +LC430 LBRA LC165 +LC433 TSTA + LBPL LC11A + LBSR LC4F3 + LBSR LC11A + LDB #$2D + STB ,-X + RTS +LC443 PSHS B,A + LDB #$05 + BRA LC424 +LC449 CMPB #$3D + BNE LC460 + PULS B,A + STD <$7E + LDX #LFFFF + STX <$4A + LBSR LC09C + STX <$50 + LBRA LC024 +LC45E PULS PC,B,A +LC460 CMPB #$3E + BNE LC46C + LDD ,S + BEQ LC45E + JSR [,S++] + PSHS B,A +LC46C LDX <$84 + LBSR LC287 + CMPA #$3A + BNE LC47D + LBSR LC269 + PULS B,A + STB ,Y + RTS +LC47D LBSR LC26E + PULS B,A + STD ,Y + RTS + LDA +$01,X + CMPA #$4E + BEQ LC48E + LBRA LC7D7 +LC48E TST +$02,X + BNE LC494 + CLR +$03,X +LC494 LEAX +$03,X + CLR <$8C + LBSR LC373 + BCS LC4A0 + LDD #LC3E8 +LC4A0 STD <$88 + LDB ,X + CMPB #$2C + BNE LC4AF + LEAX +$01,X + LBSR LC373 + BCS LC4B2 +LC4AF LDD #LC00A +LC4B2 STD <$8A + RTS +LC4B5 CMPA #$2F + BNE LC4F9 + CLR <$8D + LDD +$02,U + BEQ LC4F9 + BMI LC4D4 + CMPD #LC002 + BNE LC4DE + PULU B,A + CLR <$4E + CLR <$4F + ASRA + RORB + ROR <$4F + LEAU +$02,U + RTS +LC4D4 INC <$8D + NEG +$03,U + BNE LC4DC + DEC +$02,U +LC4DC COM +$02,U +LC4DE LDD ,U++ + BPL LC4E6 + DEC <$8D + BSR LC4F3 +LC4E6 LBSR LC335 + LEAU +$02,U + STD <$4E + LDD <$82 + TST <$8D + BEQ LC4F8 +LC4F3 NEGB + BNE LC4F7 + DECA +LC4F7 COMA +LC4F8 RTS +LC4F9 LBSR LC397 + LDB #$3F + STB <$8C + LBSR LC412 + TFR A,B + LBSR LC412 + LDB #$20 + LBSR LC412 + LDX <$42 + CMPX #LFB95 + BNE LC519 + LBSR LC165 + BRA LC51C +LC519 LBSR LC087 +LC51C LBRA LC024 +LC51F LEAX +$01,X +LC521 LBSR LC373 + BCS LC532 + LBRA LC23F + BSR LC51F + BRA LC4F3 + BSR LC51F + TSTA + BMI LC4F3 +LC532 RTS + BSR LC51F +LC535 PSHS B,A + LDD ,S++ + LBNE LC2E4 + INCB + RTS +LC53F BSR LC51F + LDD <$4E + RTS + BSR LC51F + PSHU B,A + LDD <$52 + PSHU B,A + LDD #L3D09 + LBSR LC319 + ADDD #LC001 + STD <$52 + TFR A,B + CLRA + LBSR LC319 + TFR A,B + CLRA + ADDD #LC001 + RTS + NEG <$00 + NEG <$00 + CLRA + LDB +$01,X + LEAX +$03,X + RTS +LC56E CMPB #$3F + BEQ LC57E + CMPB #$24 + BEQ LC582 + PULS B,A + LBSR LC433 + LBRA LC165 +LC57E LDB ,S + BSR LC584 +LC582 PULS B,A +LC584 TFR B,A + BSR LC58E + TFR A,B + ANDB #$0F + BRA LC592 +LC58E LSRB + LSRB + LSRB + LSRB +LC592 CMPB #$0A + BMI LC598 + ADDB #$07 +LC598 ADDB #$30 + LBRA LC412 + CLRA + BSR LC5BD + LBCC LC64D +LC5A4 PSHS B + BSR LC5BD + PSHU B + PULS B + BCC LC5BA + LSLB + ROLA + LSLB + ROLA + LSLB + ROLA + LSLB + ROLA + ADDB ,U+ + BRA LC5A4 +LC5BA LEAU +$01,U + RTS +LC5BD LEAX +$01,X + LDB ,X + SUBB #$30 + BCS LC5D2 + CMPB #$0A + BCS LC5D1 + SUBB #$07 + CMPB #$0A + BCS LC5D2 + CMPB #$10 +LC5D1 RTS +LC5D2 ANDCC #$FE + RTS +LC5D5 LBSR LC397 +LC5D8 LDB #$3A + BSR LC64A + LDX #LFB95 + TST <$8C + BNE LC5F2 + LDD <$88 + LBMI LC020 + LBSR LC443 + LDB #$20 + STB -$01,X + BSR LC64A +LC5F2 BSR LC64D + CMPB #$08 + BEQ LC634 + CMPB #$0D + BCS LC5F2 + BEQ LC611 + CMPB #$18 + BEQ LC5D5 + STB ,X+ + CMPX #LFBDF + BNE LC5F2 + LEAX -$01,X + LDB #$08 + BSR LC64A + BRA LC5F2 +LC611 TST <$8C + BNE LC626 + CMPX #LFB9B + BEQ LC61F + CMPX #LFB9A + BCC LC626 +LC61F COM <$8C + LBSR LC39B + BRA LC5D8 +LC626 LDD <$88 + ADDD <$8A + STD <$88 + CLR ,X + LDX #LFB95 + LBRA LC39B +LC634 LEAX -$01,X + CMPX #LFB94 + BNE LC5F2 + STB <$8C + BRA LC5D8 + + FCB $D,$A + FCS "*READY" + FCB $D,$A,0 + +LC64A LBRA LC6FE OUTCH +LC64D LBRA LC6FC GETCH +LC650 LBRA LC720 SENSE +LC653 CMPA #$2E EXBOP + BNE LC65E + PULU B,A + ORA ,U+ + ORB ,U+ + RTS +LC65E CMPA #$26 + BNE LC669 + PULU B,A + ANDA ,U+ + ANDB ,U+ + RTS +LC669 CMPA #$21 + LBNE LC4B5 + PULU B,A + EORA ,U+ + EORB ,U+ + RTS +LC676 LDD +$01,X EXTEND + LEAX +$03,X + PSHS U,X,B,A + LEAY >LC737,PCR +LC680 LDX ,Y + BMI LC6E7 + CMPX ,S + BEQ LC68C + LEAY +$05,Y + BRA LC680 +LC68C LEAY +$03,Y + LEAS +$02,S + LDX ,S + LDA -$01,Y + BEQ LC6C3 + PSHS Y,A + LDA #$20 +LC69A CMPA ,X+ + BEQ LC69A + LDA ,-X + STX +$03,S +LC6A2 BITA #$DF + BEQ LC6B0 + CMPA #$2C + BEQ LC6AE + BSR LC6C9 + BRA LC6B3 +LC6AE LEAX +$01,X +LC6B0 LDD #LFFFF +LC6B3 PSHU B,A + LDA ,X + DEC ,S + BNE LC6A2 + LDD +$03,S + STX +$03,S + TFR D,X + PULS Y,A +LC6C3 LDD ,Y + JSR D,Y + PULS PC,U,X +LC6C9 LBSR LC521 +LC6CC PSHS B + LDB ,X + BITB #$DF + BEQ LC6E5 + CMPB #$2C + BEQ LC6E3 + CMPB #$29 + BEQ LC6E3 + PULS B + LBSR LC29C + BRA LC6CC +LC6E3 LEAX +$01,X +LC6E5 PULS PC,B +LC6E7 PULS U,X,B,A + LBRA LC4F9 +LC6EC LEAX +$01,X + LDB ,X+ +LC6F0 LDA ,X+ + BEQ LC6F8 + CMPA #$22 + BNE LC6F0 +LC6F8 CLRA + RTS +LC6FA STB LFC8D + CLR <$34 + LBRA L758E + STB LA602 + STB +$02,X +LC707 LDA +$03,X + BPL LC707 + PULS PC,X,B,A + PSHS X + LDX <LC6FA,PCR +LC712 LDB +$01,X + BPL LC712 + LDB ,X + CMPB #$18 + LBEQ LC003 + PULS PC,X +LC720 PSHS X,A + LDX <LC6FA,PCR + LDA +$01,X + BPL LC731 + BSR LC6FC + CMPB #$18 + BEQ LC734 + BSR LC6FC +LC731 CLRA + PULS PC,X,A + + * COMMAND TABLE CONSIST.... + * COMMAND NAME (2 BYTE) + * PARAMETER COUNT (1 BYTE) + * OFSET TO SUBROUTIE FROM HERE (1 WORD) + ************************** + OPCMD FCC "AT",2 START LINE,STEP + FDB CAUTO-* + FCC "RN",3 RENUM first line no,inc,renum start + FDB RENUM-* + FCC "RD",3 DISK READ address,track,sector + FDB GETDK-* + FCC "WR",3 DISK WRITE + FDB PUTDK-* + FCC "SY",0 TO SYSTEM + FDB SYSTEM-* + FDB -1,-1,-1,-1,-1,-1 + ************************* + + LDD ,U++ + BPL LC762 + CLRA + CLRB +LC762 STD <$4A + LBSR LC09C + BMI LC789 + LDD ,U++ + BPL LC770 + LDD #LC00A +LC770 LDY ,U++ + BPL LC779 + LDY #LC3E8 +LC779 STY ,X++ + LBSR LC173 + LEAY D,Y +LC781 TST ,X+ + BNE LC781 + TST ,X + BPL LC779 +LC789 RTS + LDD ,U++ + BPL LC791 + LDD #LC00A +LC791 STD <$8A + LDD ,U + BEQ LC79E + BPL LC79C + LDD #LC3E8 +LC79C STD <$88 +LC79E CLR <$8C + RTS + BSR LC7B6 + LBSR LCD09 + BNE LC7B1 + RTS + BSR LC7B6 + LBSR LCD0C + BNE LC7B1 + RTS +LC7B1 LDA #$44 + LBRA LC4F9 +LC7B6 LDX +$04,U + LDA +$03,U + LDB +$01,U + RTS + SWI + DEC <$02 + LDA LD7FC + CMPA #$18 + BEQ LC7D3 +LC7C7 TST LD7FD + BPL LC7C7 + LDA LD7FC + ANDCC #$FE + PULS PC,A +LC7D3 ORCC #$01 + PULS PC,A + + org $c800 + LBRA LCA96 + LBRA LC8CA + LBRA LC9F2 +LC809 STB <$FC +LC80B STB <$FD +LC80D STB <$FE +LC80F STB <$FF + SUBB +$00,X +LC813 SUBA #$0E +LC815 LDA [<LC80B,PCR] + BPL LC815 + LDA [<LC809,PCR] + BRA LC831 +LC81F LSRA + LSRA + LSRA + LSRA +LC823 ANDA #$0F + CMPA #$0A + BCS LC82B + ADDA #$07 +LC82B ADDA #$30 + BRA LC831 +LC82F LDA #$20 +LC831 LDB [<LC80D,PCR] + STA [<LC80D,PCR] +LC837 LDB [<LC80F,PCR] + BPL LC837 + JMP ,U +LC83E CMPA #$30 + BCS LC856 + CMPA #$3A + BCC LC84A + SUBA #$30 + BRA LC858 +LC84A CMPA #$41 + BCS LC856 + CMPA #$47 + BCC LC856 + SUBA #$37 + BRA LC858 +LC856 ORCC #$01 +LC858 JMP ,U +LC85A EXG D,X + LSLB + ROLA + LSLB + ROLA + LSLB + ROLA + LSLB + ROLA + EXG D,X + LEAX A,X + JMP ,U +LC86A TFR U,Y + LDA #$0D + LEAU <LC874,PCR + LBRA LC831 +LC874 LDA #$0A + LEAU <LC87C,PCR + LBRA LC831 +LC87C JMP ,Y +LC87E TFR U,Y + LDA ,X + LEAU <LC888,PCR + LBRA LC81F +LC888 LDA ,X + LEAU <LC890,PCR + LBRA LC823 +LC890 JMP ,Y +LC892 TFR U,Y +LC894 TFR X,D + LEAU <LC89C,PCR + LBRA LC81F +LC89C TFR X,D + LEAU <LC8A4,PCR + LBRA LC823 +LC8A4 TFR X,D + TFR B,A + LEAU <LC8AE,PCR + LBRA LC81F +LC8AE TFR X,D + TFR B,A + LEAU <LC8B8,PCR + LBRA LC823 +LC8B8 JMP ,Y + TFR U,Y +LC8BC LDA ,X+ +LC8BE BEQ LC8C8 + LEAU <LC8C6,PCR + LBRA LC831 +LC8C6 BRA LC8BC +LC8C8 JMP ,Y +LC8CA LEAU <LC8D0,PCR + LBRA LC86A +LC8D0 LEAU <LC8D6,PCR + LBRA LC86A +LC8D6 LDA #$2A + LEAU <LC8DE,PCR + LBRA LC831 +LC8DE LDY #LC000 +LC8E2 LEAU <LC8E8,PCR + LBRA LC815 +LC8E8 CMPA #$47 +LC8EA LBEQ LC915 + CMPA #$4D + LBEQ LC931 + CMPA #$53 + LBEQ LC96B + LEAU <LC900,PCR + LBRA LC83E +LC900 BCS LC8CA + LEAY ,Y + BNE LC90D + LDY #LC001 + LDX #LC000 +LC90D LEAU <LC913,PCR + LBRA LC85A +LC913 BRA LC8E2 +LC915 LEAU <LC91B,PCR + LBRA LC86A +LC91B LEAU <LC921,PCR + LBRA LC892 +LC921 LEAU <LC927,PCR + LBRA LC82F +LC927 LDA #$47 + LEAU <LC92F,PCR + LBRA LC831 +LC92F JMP ,X +LC931 LDB >LC814,PCR +LC935 ORB >LC813,PCR + TFR B,DP + LEAU <LC941,PCR + LBRA LC86A +LC941 LEAU <LC947,PCR + LBRA LC892 +LC947 LEAU <LC94D,PCR +LC94A LBRA LC82F +LC94D LEAU <LC953,PCR + LBRA LC82F +LC953 LEAU <LC959,PCR + LBRA LC87E +LC959 LEAX +$01,X + TFR DP,B + SUBB #$10 + TFR B,DP + BITB #$F0 + BNE LC94D + DECB + BNE LC935 + LBRA LC8CA +LC96B LEAU <LC971,PCR + LBRA LC86A +LC971 LEAU <LC977,PCR + LBRA LC892 +LC977 LEAU <LC97D,PCR + LBRA LC82F +LC97D LEAU <LC983,PCR + BCS LC94A + LEAY ,Y + BNE LC98D + LDY #LC001 + LDX #LC000 +LC98D LEAU <LC993,PCR + LBRA LC8DA +LC993 BRA LC962 + LEAU <LC99B,PCR + LBRA LC8EA +LC99B LEAU <LC9A1,PCR + LBRA LC912 +LC9A1 LEAU <LC9A7,PCR + LBRA LC8AF +LC9A7 LDA #$47 + LEAU <LC9AF,PCR + LBRA LC8B1 +LC9AF JMP ,X + LDB >LC894,PCR +LC9B5 ORB >LC893,PCR + TFR B,DP + LEAU <LC9C1,PCR + LBRA LC8EA +LC9C1 LEAU <LC9C7,PCR + LBRA LC912 +LC9C7 LEAU <LC9CD,PCR + LBRA LC8AF +LC9CD LEAU <LC9D3,PCR + LBRA LC8AF +LC9D3 LEAU <LC9D9,PCR + LBRA LC8FE +LC9D9 LEAX +$01,X + TFR DP,B + SUBB #$10 + TFR B,DP + BITB #$F0 + BNE LC9CD + DECB + BNE LC9B5 + LBRA LC94A +LC9EB LEAU <LC9F1,PCR + LBRA LC8EA +LC9F1 LEAU <LC9F7,PCR + LBRA LC912 +LC9F7 LEAU <LC9FD,PCR + LBRA LC8AF +LC9FD LEAU <LCA03,PCR + LBRA LC8FE +LCA03 LDA #$2D + LEAU <LCA0B,PCR + LBRA LC8B1 +LCA0B LDY #LC000 + CLRB + TFR B,DP +LCA12 LEAU <LCA18,PCR + LBRA LC895 +LCA18 LEAU <LCA1E,PCR + LBRA LC8BE +LCA1E BCS LCA39 + LDY #LC001 + TFR DP,B + LSLB + LSLB + LSLB + LSLB + TFR A,DP + EXG D,X + EXG DP,B + ABX + EXG B,DP + EXG X,D + TFR B,DP + BRA LCA12 +LCA39 CMPA #$0D + BNE LCA47 + LDA #$0A + LEAU <LCA45,PCR + LBRA LC8B1 +LCA45 LDA #$0D +LCA47 EXG A,DP + LEAY ,Y + BEQ LCA4F + STA ,X +LCA4F LDA #$2D + LEAU <LCA57,PCR + LBRA LC8B1 +LCA57 LEAU <LCA5D,PCR + LBRA LC8FE +LCA5D TFR DP,A + CMPA #$0D + LBEQ LC94A + LEAX -$01,X + CMPA #$5E + LBEQ LC9EB + LEAX +$02,X + LBRA LC9EB + LEAX <LCAE5,PCR + LEAU <LCA7B,PCR + LBRA LC93A +LCA7B LDA #$04 +LCA7D TFR A,DP + LEAX ,S+ + LEAU <LCA87,PCR + LBRA LC8FE +LCA87 LEAU <LCA8D,PCR + LBRA LC8AF +LCA8D LEAU <LCA93,PCR + LBRA LC8AF +LCA93 LEAU <LCA99,PCR +LCA96 TFR DP,A + DECA +LCA99 BNE LCA7D + LEAX <LCAF8,PCR + LEAU <LCAA4,PCR + LBRA LC93A +LCAA4 LDA #$04 +LCAA6 TFR A,DP + LDX ,S++ + LEAU <LCAB0,PCR + LBRA LC912 +LCAB0 LEAU <LCAB6,PCR + LBRA LC8AF +LCAB6 LEAU <LCABC,PCR + LBRA LC8AF +LCABC TFR DP,A + DECA + BNE LCAA6 + LEAX ,S + LEAU <LCAC9,PCR + LBRA LC912 +LCAC9 LBRA LC94A +LCACC INC <$09 + + fcs "RALPH09 DEBUGGER 2.0" + fcb $d,$a,0 + fcb $d,$a + fcs "CC A B DP" + fcb $d,$a,0 + fcb $d,$a + fcs "X Y U PC S" + fcb $d,$a,0 + + LDX #LFF48 + LDA #$07 +LCB1B STA ,-X + DECA + BNE LCB1B + CLR LFF4A + LDX #LFF00 + LDD #LC1E0 +LCB29 STD ,X++ + INCB + BNE LCB29 + CLR LFF40 + LDU >LC889,PCR + CLRA + STA +$01,U + STA +$03,U + DECA + STA +$02,U + LDA #$24 + STA +$01,U + STA +$03,U + LDA ,U + LDA +$02,U + LDS >LC891,PCR + LEAX >LCACC,PCR + LEAU <LCB56,PCR + LBRA LC93A +LCB56 LBRA LC94A + + org $cb80 + LDA #$01 + STA LFF4A + STA LFF4B + LDX #LFF40 + LDD #LC01F +LCB8E STD ,--X + DECB + BNE LCB8E + STD ,--X + LDD #LC1FE + STD LFF38 + INCB + STD LFF3A + LDD #LC1FA + STD LFF3C + LDA #$04 + STA LFF49 + JMP LE000 + + org $cc80 + LDB #$00 + BRA LCCC0 + LDB #$01 + BRA LCCC0 + LDB #$02 + BRA LCCC0 + LDB #$03 + BRA LCCC0 + LDB #$04 + BRA LCCC0 + LDB #$05 + BRA LCCC0 + LDB #$06 + BRA LCCC0 + LDB #$07 + BRA LCCC0 + LDB #$08 + BRA LCCC0 + LDB #$09 + BRA LCCC0 + LDB #$0A + BRA LCCC0 + LDB #$0B + BRA LCCC0 + LDB #$0C + BRA LCCC0 + LDB #$0D + BRA LCCC0 + LDB #$0E + BRA LCCC0 + LDB #$0F + BRA LCCC0 +LCCC0 STS LDF82 + LDS #LDF80 + CMPB #$09 + BLE LCCDB + BSR LCD01 + PSHS B + LDB #$01 + BSR LCCF7 + PULS B + BSR LCCF7 + BRA LCCDF + RTI + +LCCDB BSR LCD01 + BSR LCCF7 +LCCDF BSR LCD14 + LDS LDF82 + LDA #$01 + STA LFF49 + RTI + + LDA LD7FE + STB LD7FE +LCCF1 LDA LD7FF + BPL LCCF1 + RTS + +LCCF7 CMPB #$0A + BCS LCCFD + SUBB #$0A +LCCFD ADDB #$30 + BRA LCD01