Mercurial > hg > Members > kono > os9 > sbc09
changeset 70:a200fa7d5b70
game09 fix for os9
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 05 Aug 2018 16:12:30 +0900 |
parents | b6aabbe1a027 |
children | eb9be32c701c |
files | game09/defsfile game09/game09.asm |
diffstat | 2 files changed, 297 insertions(+), 733 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/game09/defsfile Sun Aug 05 16:12:30 2018 +0900 @@ -0,0 +1,19 @@ +* Main defsfile for OS-9 Level One V1 +* +* +* OS-9 Level and Version equates +Level equ 2 +OS9Vrsn equ 2 +OS9Major equ 0 +OS9Minor equ 1 +CHECK_FOR_VALID_RAM equ 1 force ram check for non standard arch + +NOS9VER equ OS9Vrsn +NOS9MAJ equ OS9Major +NOS9MIN equ OS9Minor + + + use ../src/os9/nitros9-code/defs/os9.d + use ../src/os9/nitros9-code/defs/scf.d + use ../src/os9/nitros9-code/defs/rbf.d +
--- a/game09/game09.asm Sun Aug 05 15:15:12 2018 +0900 +++ b/game09/game09.asm Sun Aug 05 16:12:30 2018 +0900 @@ -2,99 +2,86 @@ * GAME09 interpreter * - -L3D09 equ $3D09 -L758E equ $758E -LA602 equ $A602 + ifp1 + use defsfile + endc -LC1FA equ $C1FA -LC1FE equ $C1FE -LC889 equ $C889 -LC891 equ $C891 -LC893 equ $C893 -LC895 equ $C895 -LC8AF equ $C8AF -LC8B1 equ $C8B1 -LC8DA equ $C8DA -LC8FE equ $C8FE -LC912 equ $C912 -LC93A equ $C93A -LC962 equ $C962 -LC983 equ $C983 -LC9F2 equ $C9F2 -LCAE5 equ $CAE5 -LCAF8 equ $CAF8 -LCD00 equ $CD00 -LCD01 equ $CD01 -LCD09 equ $CD09 -LCD0C equ $CD0C -LCD14 equ $CD14 + nam Game09 + ttl Game09 +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 5 -LC814 equ $C814 -LC813 equ $C813 + mod eom,name,tylg,atrv,start,size +name fcs "Game09" + fcb edition + + org 0 +dpage rmb $96 -LD7FC equ $D7FC -LD7FD equ $D7FD -LD7FE equ $D7FE -LD7FF equ $D7FF -LDF80 equ $DF80 -LDF82 equ $DF82 +DP00 equ $00 +DP42 equ $42 +DP46 equ $46 +DP4A equ $4A +DP4B equ $4B +DP4E equ $4E +DP4F equ $4F +DP50 equ $50 +DP52 equ $52 +DP58 equ $58 +DP7E equ $7E +DP82 equ $82 +DP83 equ $83 +DP84 equ $84 +DP86 equ $86 +DP88 equ $88 +DP8A equ $8A +DP8C equ $8C +DP8D equ $8D +DP8E equ $8E +DP94 equ $94 +DPWORK rmb 2 +DPSTK rmb 2 -LE000 equ $E000 -LEFFF equ $EFFF -LFB04 equ $FB04 -LFB8F equ $FB8F -LFB94 equ $FB94 -LFB95 equ $FB95 -LFB9A equ $FB9A -LFB9B equ $FB9B -LFBDF equ $FBDF -LFC8D equ $FC8D -LFD80 equ $FD80 -LFE00 equ $FE00 -LFF00 equ $FF00 -LFF38 equ $FF38 -LFF3A equ $FF3A -LFF3C equ $FF3C -LFF40 equ $FF40 -LFF48 equ $FF48 -LFF49 equ $FF49 -LFF4A equ $FF4A -LFF4B equ $FF4B -LFFFF equ $FFFF +linebuf rmb 256 +program rmb 20000 +size equ . - -LC000 BRA LC005 -LC002 NOP -LC003 BRA LC014 -LC005 LDA #$FB +start +LC000 BRA LC005 +LC002 NOP +LC003 BRA LC014 +LC005 TFR U,D TFR A,DP - LDX #LE000 + STU <DPWORK + STS <DPSTK + LEAX program,U STX <$7E STX <$50 LDA #$FF STA ,X -LC014 LBSR LCD00 - LDA #$FB - TFR A,DP - LDX #LEFFF +LC014 LBSR LCD00 + LDU <DPWORK + LEAX size,U STX <$58 -LC020 LDA #$FF +LC020 LDA #$FF STA <$8C -LC024 LDS #LFE00 - LDU #LFD80 +LC024 LDS <DPSTK + LDU <DPWORK + LEAU linebuf,U LEAX >LC63F,PCR LBSR LC165 -LC032 LBSR LC370 +LC032 LBSR LC370 BCS LC06D STX <$42 LBSR LC1D3 BEQ LC024 -LC03E BSR LC09C -LC040 BMI LC024 +LC03E BSR LC09C +LC040 BMI LC024 STX <$42 -LC044 LEAX +$02,X +LC044 LEAX +$02,X LDA ,X+ CMPA #$20 BNE LC05B @@ -103,50 +90,50 @@ LEAX +$01,X TST ,X BRA LC040 -LC057 LDS #LFE00 -LC05B BSR LC0A8 +LC057 LDS <DPSTK +LC05B BSR LC0A8 BRA LC040 -LC05F LDX <$42 +LC05F LDX <$42 STX <$84 BSR LC0A0 BMI LC024 CMPX <$84 BEQ LC03E BRA LC044 -LC06D STX <$86 +LC06D STX <$86 STD <$4A LDB ,X CMPB #$2F BNE LC0B1 -LC077 BSR LC09C -LC079 LBSR LC397 +LC077 BSR LC09C +LC079 LBSR LC397 TST ,X BMI LC024 BSR LC087 LBSR LC173 BRA LC079 -LC087 LDD ,X++ +LC087 LDD ,X++ PSHS X LBSR LC443 PULS X LBRA LC165 -LC093 LDX <$42 +LC093 LDX <$42 LEAX +$02,X -LC097 TST ,X+ +LC097 TST ,X+ BNE LC097 RTS -LC09C LDX <$7E -LC09E STX <$42 -LC0A0 LDD ,X +LC09C LDX <$7E +LC09E STX <$42 +LC0A0 LDD ,X BMI LC0B0 SUBD <$4A BCC LC0AF -LC0A8 LBSR LC173 +LC0A8 LBSR LC173 BSR LC093 BRA LC09E -LC0AF CLRA -LC0B0 RTS -LC0B1 LDX <$4A +LC0AF CLRA +LC0B0 RTS +LC0B1 LDX <$4A BEQ LC077 BMI LC117 LDX <$50 @@ -160,19 +147,19 @@ BNE LC0DE BSR LC093 LDY <$42 -LC0CD LDA ,X +LC0CD LDA ,X STA ,Y CMPX <$50 BEQ LC0DB LEAX +$01,X LEAY +$01,Y BRA LC0CD -LC0DB STY <$50 -LC0DE LDX <$86 +LC0DB STY <$50 +LC0DE LDX <$86 LDB #$03 TST ,X+ BEQ LC114 -LC0E6 INCB +LC0E6 INCB TST ,X+ BNE LC0E6 CLRA @@ -184,24 +171,24 @@ STY <$50 LEAX +$01,X LEAY +$01,Y -LC0FD LDB ,-X +LC0FD LDB ,-X STB ,-Y CMPX <$42 BNE LC0FD LDY <$4A STY ,X++ LDY <$86 -LC10E LDB ,Y+ +LC10E LDB ,Y+ STB ,X+ BNE LC10E -LC114 LBRA LC032 -LC117 LBRA LC024 -LC11A LDX #LFB8F +LC114 LBRA LC032 +LC117 LBRA LC024 +LC11A LDX #LFB8F TST <$8C BNE LC124 LDX #LFB95 -LC124 LEAY <LC159,PCR -LC127 PSHS X +LC124 LEAY <LC159,PCR +LC127 PSHS X LDX ,Y++ PSHU X LBSR LC335 @@ -219,31 +206,31 @@ PSHS X LEAX -$05,X CLRA -LC14B LEAX +$01,X +LC14B LEAX +$01,X INCA LDB ,X CMPB #$30 BEQ LC14B COM [,S++] SUBA #$06 -LC158 RTS -LC159 FDB 10000 +LC158 RTS +LC159 FDB 10000 FDB 1000 FDB 100 FDB 10 FDB 1 FDB 0 -LC165 CLRA -LC166 STA <$94 -LC168 LDB ,X+ +LC165 CLRA +LC166 STA <$94 +LC168 LDB ,X+ CMPB <$94 BEQ LC158 LBSR LC412 BRA LC168 -LC173 LBSR LC650 +LC173 LBSR LC650 LBCS LC024 RTS -LC17B CMPA #$20 +LC17B CMPA #$20 BEQ LC1D1 CLR <$4A CLR <$4B @@ -256,7 +243,7 @@ STD <$46 STX <$42 BRA LC1C6 -LC195 CMPA #$40 +LC195 CMPA #$40 BNE LC1A6 LEAX +$01,X STX <$46 @@ -265,46 +252,46 @@ LDY <$42 PSHU Y,X,B,A BRA LC1D3 -LC1A6 CMPA #$22 +LC1A6 CMPA #$22 BNE LC1CA LEAX +$01,X BSR LC166 BRA LC1D3 -LC1B0 CMPA #$5C +LC1B0 CMPA #$5C BNE LC1B9 LBSR LC676 BRA LC1D3 -LC1B9 STX <$84 +LC1B9 STX <$84 BSR LC1EC LBSR LC39F BSR LC173 LDX <$4A BNE LC1D7 -LC1C6 LDX <$46 +LC1C6 LDX <$46 BRA LC1D3 -LC1CA CMPA #$2F +LC1CA CMPA #$2F BNE LC1B0 LBSR LC397 -LC1D1 LEAX +$01,X -LC1D3 LDA ,X +LC1D1 LEAX +$01,X +LC1D3 LDA ,X BNE LC17B -LC1D7 RTS -LC1D8 PSHS A +LC1D7 RTS +LC1D8 PSHS A LEAX +$01,X BSR LC1F6 LDX <$46 -LC1E0 LDY <$42 +LC1E0 LDY <$42 PSHU Y,X,B,A PULS PC,B,A -LC1E7 LDA #$3D +LC1E7 LDA #$3D LBRA LC4F9 -LC1EC LDA ,X+ +LC1EC LDA ,X+ BITA #$DF BEQ LC1E7 CMPA #$3D BNE LC1EC -LC1F6 LBSR LC521 -LC1F9 PSHS B +LC1F6 LBSR LC521 +LC1F9 PSHS B LDB ,X BITB #$DF BEQ LC210 @@ -315,11 +302,11 @@ PULS B LBSR LC29C BRA LC1F9 -LC210 STX <$46 +LC210 STX <$46 PULS PC,B -LC214 LEAX +$01,X +LC214 LEAX +$01,X PULS PC,B -LC218 CMPB #$3F +LC218 CMPB #$3F BNE LC22E PSHS X STB <$8C @@ -330,17 +317,17 @@ RTS LEAX +$01,X BRA LC1F6 -LC22E BSR LC287 +LC22E BSR LC287 CMPA #$3A BEQ LC239 BSR LC26E -LC236 LDD ,Y +LC236 LDD ,Y RTS -LC239 BSR LC269 +LC239 BSR LC269 CLRA -LC23C LDB ,Y -LC23E RTS -LC23F CMPB #$22 +LC23C LDB ,Y +LC23E RTS +LC23F CMPB #$22 BCS LC218 CMPB #$2D BHI LC218 @@ -350,7 +337,7 @@ LDD B,Y JMP D,Y -LC251 fdb LC6EC-* 049b +LC251 fdb LC6EC-* 049b fdb LC535-* 02e2 fdb LC5A1-* 034c fdb LC545-* 02ee @@ -363,44 +350,44 @@ fdb LC23F-* ffdd fdb LC53F-* 02d8 -LC269 BSR LC279 +LC269 BSR LC279 LEAY D,Y RTS -LC26E CMPA #$28 +LC26E CMPA #$28 BNE LC292 BSR LC279 LSLB ROLA LEAY D,Y RTS -LC279 BSR LC292 +LC279 BSR LC292 LDY ,Y PSHS Y LEAX +$01,X LBSR LC1F6 PULS PC,Y -LC287 LDB ,X+ -LC289 LDA ,X+ +LC287 LDB ,X+ +LC289 LDA ,X+ CMPA #$41 BPL LC289 LEAX -$01,X RTS -LC292 ANDB #$3F +LC292 ANDB #$3F CLRA LSLB ADDD #LFB04 TFR D,Y RTS -LC29C PSHU B,A +LC29C PSHU B,A LDD ,X+ PSHS B,A SUBB #$3D BEQ LC2A9 DECB BNE LC2AB -LC2A9 LEAX +$01,X -LC2AB LBSR LC521 +LC2A9 LEAX +$01,X +LC2AB LBSR LC521 PULU Y EXG D,Y PSHU Y,B,A @@ -410,10 +397,10 @@ PULU B,A SUBD ,U++ BNE LC2E4 -LC2C0 CLRA +LC2C0 CLRA LDB #$01 RTS -LC2C4 CMPA #$3C +LC2C4 CMPA #$3C BNE LC2E7 CMPB #$3D BEQ LC2D7 @@ -423,18 +410,18 @@ SUBD ,U++ BNE LC2C0 RTS -LC2D7 PULU B,A +LC2D7 PULU B,A SUBD ,U++ BLE LC2C0 CLRA CLRB RTS -LC2E0 SUBD ,U++ +LC2E0 SUBD ,U++ BLT LC2C0 -LC2E4 CLRA +LC2E4 CLRA CLRB RTS -LC2E7 CMPA #$3E +LC2E7 CMPA #$3E BNE LC2FF CMPB #$3D PULU B,A @@ -444,25 +431,25 @@ CLRA CLRB RTS -LC2F8 SUBD ,U++ +LC2F8 SUBD ,U++ BGT LC2C0 CLRA CLRB RTS -LC2FF CMPA #$2B +LC2FF CMPA #$2B BNE LC308 PULU B,A ADDD ,U++ RTS -LC308 CMPA #$2D +LC308 CMPA #$2D BNE LC311 PULU B,A SUBD ,U++ RTS -LC311 CMPA #$2A +LC311 CMPA #$2A LBNE LC653 PULU B,A -LC319 EXG A,B +LC319 EXG A,B PSHU B,A LDB +$03,U MUL @@ -472,14 +459,14 @@ LDD <$82 LEAU +$02,U RTS -LC32B PULU A +LC32B PULU A LDB +$01,U MUL ADDB <$82 STB <$82 RTS -LC335 CLR ,-S -LC337 INC ,S +LC335 CLR ,-S +LC337 INC ,S LSL +$01,U ROL ,U BCC LC337 @@ -487,34 +474,34 @@ ROR +$01,U CLR <$82 CLR <$83 -LC347 SUBD ,U +LC347 SUBD ,U BCC LC351 ADDD ,U ANDCC #$FE BRA LC353 -LC351 ORCC #$01 -LC353 ROR <$83 +LC351 ORCC #$01 +LC353 ROR <$83 ROR <$82 DEC ,S BEQ LC361 LSR ,U ROR +$01,U BRA LC347 -LC361 LEAS +$01,S +LC361 LEAS +$01,S RTS -LC364 LDB ,X +LC364 LDB ,X CMPB #$30 BCS LC36D CMPB #$3A RTS -LC36D ANDCC #$FE +LC36D ANDCC #$FE RTS -LC370 LBSR LC5D8 -LC373 BSR LC364 +LC370 LBSR LC5D8 +LC373 BSR LC364 BCC LC396 CLRA CLRB -LC379 ADDB ,X+ +LC379 ADDB ,X+ ADCA #$00 SUBD #$030 PSHU B,A @@ -529,14 +516,14 @@ LSLB ROLA BRA LC379 -LC392 PULU B,A +LC392 PULU B,A ORCC #$01 -LC396 RTS -LC397 LDB #$0D +LC396 RTS +LC397 LDB #$0D BSR LC39D -LC39B LDB #$0A -LC39D BRA LC412 -LC39F PSHS B,A +LC39B LDB #$0A +LC39D BRA LC412 +LC39F PSHS B,A LDA #$01 STA <$8C LDX <$84 @@ -545,17 +532,17 @@ BNE LC3BA PULS A LDA ,S+ -LC3B1 BEQ LC3C4 +LC3B1 BEQ LC3C4 LDB #$20 BSR LC412 DECA BRA LC3B1 -LC3BA CMPB #$3B +LC3BA CMPB #$3B BNE LC3C5 LDD ,S++ LBEQ LC057 -LC3C4 RTS -LC3C5 CMPB #$40 +LC3C4 RTS +LC3C5 CMPB #$40 BNE LC3E4 LDB +$02,X LBSR LC292 @@ -569,11 +556,11 @@ STX <$42 LEAU -$06,U RTS -LC3E1 LEAU +$04,U +LC3E1 LEAU +$04,U RTS -LC3E4 CMPB #$26 +LC3E4 CMPB #$26 BNE LC3FA -LC3E8 LDB +$01,X +LC3E8 LDB +$01,X CMPB #$3D BNE LC3FA LDD ,S++ @@ -582,8 +569,8 @@ STX <$50 DECA STA ,X -LC3F9 RTS -LC3FA CMPB #$21 +LC3F9 RTS +LC3FA CMPB #$21 BNE LC40C PULS B,A STD <$4A @@ -591,35 +578,35 @@ LDY <$42 LDX <$46 PSHU Y,X -LC40B RTS -LC40C CMPB #$24 +LC40B RTS +LC40C CMPB #$24 BNE LC415 PULS B,A -LC412 LBRA LC64A -LC415 CMPB #$3F +LC412 LBRA LC64A +LC415 CMPB #$3F BNE LC449 LDB +$01,X CMPB #$28 LBNE LC56E LBSR LC51F -LC424 STB <$8E +LC424 STB <$8E PULS B,A BSR LC433 ADDA <$8E BMI LC430 BSR LC3B1 -LC430 LBRA LC165 -LC433 TSTA +LC430 LBRA LC165 +LC433 TSTA LBPL LC11A LBSR LC4F3 LBSR LC11A LDB #$2D STB ,-X RTS -LC443 PSHS B,A +LC443 PSHS B,A LDB #$05 BRA LC424 -LC449 CMPB #$3D +LC449 CMPB #$3D BNE LC460 PULS B,A STD <$7E @@ -628,14 +615,14 @@ LBSR LC09C STX <$50 LBRA LC024 -LC45E PULS PC,B,A -LC460 CMPB #$3E +LC45E PULS PC,B,A +LC460 CMPB #$3E BNE LC46C LDD ,S BEQ LC45E JSR [,S++] PSHS B,A -LC46C LDX <$84 +LC46C LDX <$84 LBSR LC287 CMPA #$3A BNE LC47D @@ -643,7 +630,7 @@ PULS B,A STB ,Y RTS -LC47D LBSR LC26E +LC47D LBSR LC26E PULS B,A STD ,Y RTS @@ -651,25 +638,25 @@ CMPA #$4E BEQ LC48E LBRA LC7D7 -LC48E TST +$02,X +LC48E TST +$02,X BNE LC494 CLR +$03,X -LC494 LEAX +$03,X +LC494 LEAX +$03,X CLR <$8C LBSR LC373 BCS LC4A0 LDD #LC3E8 -LC4A0 STD <$88 +LC4A0 STD <$88 LDB ,X CMPB #$2C BNE LC4AF LEAX +$01,X LBSR LC373 BCS LC4B2 -LC4AF LDD #$00A -LC4B2 STD <$8A +LC4AF LDD #$00A +LC4B2 STD <$8A RTS -LC4B5 CMPA #$2F +LC4B5 CMPA #$2F BNE LC4F9 CLR <$8D LDD +$02,U @@ -685,27 +672,27 @@ ROR <$4F LEAU +$02,U RTS -LC4D4 INC <$8D +LC4D4 INC <$8D NEG +$03,U BNE LC4DC DEC +$02,U -LC4DC COM +$02,U -LC4DE LDD ,U++ +LC4DC COM +$02,U +LC4DE LDD ,U++ BPL LC4E6 DEC <$8D BSR LC4F3 -LC4E6 LBSR LC335 +LC4E6 LBSR LC335 LEAU +$02,U STD <$4E LDD <$82 TST <$8D BEQ LC4F8 -LC4F3 NEGB +LC4F3 NEGB BNE LC4F7 DECA -LC4F7 COMA -LC4F8 RTS -LC4F9 LBSR LC397 +LC4F7 COMA +LC4F8 RTS +LC4F9 LBSR LC397 LDB #$3F STB <$8C LBSR LC412 @@ -718,10 +705,10 @@ BNE LC519 LBSR LC165 BRA LC51C -LC519 LBSR LC087 -LC51C LBRA LC024 -LC51F LEAX +$01,X -LC521 LBSR LC373 +LC519 LBSR LC087 +LC51C LBRA LC024 +LC51F LEAX +$01,X +LC521 LBSR LC373 BCS LC532 LBRA LC23F BSR LC51F @@ -729,14 +716,14 @@ BSR LC51F TSTA BMI LC4F3 -LC532 RTS +LC532 RTS BSR LC51F -LC535 PSHS B,A +LC535 PSHS B,A LDD ,S++ LBNE LC2E4 INCB RTS -LC53F BSR LC51F +LC53F BSR LC51F LDD <$4E RTS LC545 @@ -764,35 +751,35 @@ LDB +$01,X LEAX +$03,X RTS -LC56E CMPB #$3F +LC56E CMPB #$3F BEQ LC57E CMPB #$24 BEQ LC582 PULS B,A LBSR LC433 LBRA LC165 -LC57E LDB ,S +LC57E LDB ,S BSR LC584 -LC582 PULS B,A -LC584 TFR B,A +LC582 PULS B,A +LC584 TFR B,A BSR LC58E TFR A,B ANDB #$0F BRA LC592 -LC58E LSRB +LC58E LSRB LSRB LSRB LSRB -LC592 CMPB #$0A +LC592 CMPB #$0A BMI LC598 ADDB #$07 -LC598 ADDB #$30 +LC598 ADDB #$30 LBRA LC412 CLRA BSR LC5BD LC5A1 LBCC LC64D -LC5A4 PSHS B +LC5A4 PSHS B BSR LC5BD PSHU B PULS B @@ -807,9 +794,9 @@ ROLA ADDB ,U+ BRA LC5A4 -LC5BA LEAU +$01,U +LC5BA LEAU +$01,U RTS -LC5BD LEAX +$01,X +LC5BD LEAX +$01,X LDB ,X SUBB #$30 BCS LC5D2 @@ -819,11 +806,11 @@ CMPB #$0A BCS LC5D2 CMPB #$10 -LC5D1 RTS -LC5D2 ANDCC #$FE +LC5D1 RTS +LC5D2 ANDCC #$FE RTS -LC5D5 LBSR LC397 -LC5D8 LDB #$3A +LC5D5 LBSR LC397 +LC5D8 LDB #$3A BSR LC64A LDX #LFB95 TST <$8C @@ -834,7 +821,7 @@ LDB #$20 STB -$01,X BSR LC64A -LC5F2 BSR LC64D +LC5F2 BSR LC64D CMPB #$08 BEQ LC634 CMPB #$0D @@ -849,22 +836,22 @@ LDB #$08 BSR LC64A BRA LC5F2 -LC611 TST <$8C +LC611 TST <$8C BNE LC626 CMPX #LFB9B BEQ LC61F CMPX #LFB9A BCC LC626 -LC61F COM <$8C +LC61F COM <$8C LBSR LC39B BRA LC5D8 -LC626 LDD <$88 +LC626 LDD <$88 ADDD <$8A STD <$88 CLR ,X LDX #LFB95 LBRA LC39B -LC634 LEAX -$01,X +LC634 LEAX -$01,X CMPX #LFB94 BNE LC5F2 STB <$8C @@ -874,57 +861,58 @@ FCS "*READY" FCB $D,$A,0 -LC64A LBRA OUTCH -LC64D LBRA LC6FC GETCH -LC650 LBRA LC720 SENSE -LC653 CMPA #$2E EXBOP +LC64A LBRA 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 +LC65E CMPA #$26 BNE LC669 PULU B,A ANDA ,U+ ANDB ,U+ RTS -LC669 CMPA #$21 +LC669 CMPA #$21 LBNE LC4B5 PULU B,A EORA ,U+ EORB ,U+ RTS -LC676 LDD +$01,X EXTEND +LC676 LDD +$01,X EXTEND LEAX +$03,X PSHS U,X,B,A LEAY >OPCMD,PCR -LC680 LDX ,Y +LC680 LDX ,Y BMI LC6E7 CMPX ,S BEQ LC68C LEAY +$05,Y BRA LC680 -LC68C LEAY +$03,Y +LC68C LEAY +$03,Y LEAS +$02,S LDX ,S LDA -$01,Y BEQ LC6C3 PSHS Y,A LDA #$20 -LC69A CMPA ,X+ +LC69A CMPA ,X+ BEQ LC69A LDA ,-X STX +$03,S -LC6A2 BITA #$DF +LC6A2 BITA #$DF BEQ LC6B0 CMPA #$2C BEQ LC6AE BSR LC6C9 BRA LC6B3 -LC6AE LEAX +$01,X -LC6B0 LDD #LFFFF -LC6B3 PSHU B,A +LC6AE LEAX +$01,X +LC6B0 LDD #LFFFF +LC6B3 PSHU B,A LDA ,X DEC ,S BNE LC6A2 @@ -932,11 +920,11 @@ STX +$03,S TFR D,X PULS Y,A -LC6C3 LDD ,Y +LC6C3 LDD ,Y JSR D,Y PULS PC,U,X -LC6C9 LBSR LC521 -LC6CC PSHS B +LC6C9 LBSR LC521 +LC6CC PSHS B LDB ,X BITB #$DF BEQ LC6E5 @@ -947,52 +935,37 @@ PULS B LBSR LC29C BRA LC6CC -LC6E3 LEAX +$01,X -LC6E5 PULS PC,B -LC6E7 PULS U,X,B,A +LC6E3 LEAX +$01,X +LC6E5 PULS PC,B +LC6E7 PULS U,X,B,A LBRA LC4F9 -LC6EC LEAX +$01,X +LC6EC LEAX +$01,X LDB ,X+ -LC6F0 LDA ,X+ +LC6F0 LDA ,X+ BEQ LC6F8 CMPA #$22 BNE LC6F0 -LC6F8 CLRA +LC6F8 CLRA RTS -LC6FA FDB $FCFD -GETCH -LC6FC BSR LC70D -OUTCH - PSHS X,B,A - LDX <LC6FA,PCR - LDA +$02,X - STB +$02,X -LC707 LDA +$03,X - BPL LC707 - PULS PC,X,B,A -LC70D - PSHS X - LDX <LC6FA,PCR -LC712 LDB +$01,X - BPL LC712 - LDB ,X - CMPB #$18 - LBEQ LC003 - PULS PC,X -SENSE -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 -LC734 COMA - PULS PC,X,A +GETCH LDA #0 + PSHS A + LEAX ,S + LDY #1 + OS9 I$Read + PULS A + BCS GETCH +OUTCH PSHS A + LEAX ,S + LDA #1 + LDY #1 + OS9 I$Write + PULS A,PC +SENSE LDA #0 + LDB #SS.Ready + OS9 i$GetStt + RTS + * COMMAND TABLE CONSIST.... @@ -1017,34 +990,34 @@ BPL LC762 CLRA CLRB -LC762 STD <$4A +LC762 STD <$4A LBSR LC09C BMI LC789 LDD ,U++ BPL LC770 LDD #$00A -LC770 LDY ,U++ +LC770 LDY ,U++ BPL LC779 LDY #LC3E8 -LC779 STY ,X++ +LC779 STY ,X++ LBSR LC173 LEAY D,Y -LC781 TST ,X+ +LC781 TST ,X+ BNE LC781 TST ,X BPL LC779 -LC789 RTS +LC789 RTS CAUTO LDD ,U++ BPL LC791 LDD #$00A -LC791 STD <$8A +LC791 STD <$8A LDD ,U BEQ LC79E BPL LC79C LDD #LC3E8 -LC79C STD <$88 -LC79E CLR <$8C +LC79C STD <$88 +LC79E CLR <$8C RTS BSR LC7B6 LBSR LCD09 @@ -1054,443 +1027,15 @@ LBSR LCD0C BNE LC7B1 RTS -LC7B1 LDA #$44 +LC7B1 LDA #$44 LBRA LC4F9 -LC7B6 LDX +$04,U +LC7B6 LDX +$04,U LDA +$03,U LDB +$01,U RTS -SYSTEM - 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 -LC7D7 LBRA LCA96 - - org $c800 - LBRA LCA96 - LBRA LC8CA - LBRA LC9F2 - -LC809 FDB $D7FC -LC80B FDB $D7FD -LC80D FDB $D7FE -LC80F FDB $D7FF - FDB $E000 - FDB $800E - - -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 #0 -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 #1 - LDX #0 -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 #1 - LDX #0 -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 #0 - CLRB - TFR B,DP -LCA12 LEAU <LCA18,PCR - LBRA LC895 -LCA18 LEAU <LCA1E,PCR - LBRA LC8BE -LCA1E BCS LCA39 - LDY #1 - 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 #$01F -LCB8E STD ,--X - DECB - BNE LCB8E - STD ,--X - LDD #$1FE - 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 +SYSTEM clrb + os9 F$Exit + rts +eom + emod + end