Mercurial > hg > Members > kono > os9 > sbc09
changeset 73:ae26a881ac7a
GAME program stored
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 06 Aug 2018 17:07:06 +0900 |
parents | 3a2fb51afc4d |
children | c29030b5e4b4 |
files | game09/game09.asm |
diffstat | 1 files changed, 42 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/game09/game09.asm Sun Aug 05 23:01:58 2018 +0900 +++ b/game09/game09.asm Mon Aug 06 17:07:06 2018 +0900 @@ -20,31 +20,36 @@ dpage rmb $96 DP00 equ $00 -DP42 equ $42 +DP42 equ $42 program copy pointer DP46 equ $46 -DP4A equ $4A +DP4A equ $4A input lineno DP4B equ $4B DP4E equ $4E DP4F equ $4F -DP50 equ $50 +DP50 equ $50 program top DP52 equ $52 -DP58 equ $58 -DP7E equ $7E +DP58 equ $58 program max +DP7E equ $7E program current end DP82 equ $82 DP83 equ $83 DP84 equ $84 -DP86 equ $86 +DP86 equ $86 input line (except lineno) DP88 equ $88 DP8A equ $8A DP8C equ $8C DP8D equ $8D DP8E equ $8E DP94 equ $94 -DPWORK rmb 2 -DPSTK rmb 2 +DPWORK rmb 2 $96 +DPSTK rmb 2 $98 -linebuf rmb 256 -program rmb 10000 +lineb0 rmb 2 $9A +linetop rmb 2 $9C +lineb9a rmb 2 $9E +lineb9b rmb 2 $A0 +lineend rmb 2 $A2 +linebuf rmb 252 +program rmb $2000 size equ . name fcs "Game09" @@ -64,6 +69,16 @@ LDA #$FF STA ,X LC014 LDU <DPWORK + LEAX linebuf-1,U + STX <lineb0 + LEAX 1,X + STX <linetop + LEAX 5,X + STX <lineb9a + LEAX 1,X + STX <lineb9b + LEAX 255-6,X + STX <lineend LEAX size,U STX <$58 LC020 LDA #$FF @@ -105,7 +120,7 @@ LDB ,X CMPB #$2F BNE LC0B1 -LC077 BSR LC09C +LC077 BSR LC09C listing LC079 LBSR LC397 TST ,X BMI LC024 @@ -155,7 +170,7 @@ LEAY +$01,Y BRA LC0CD LC0DB STY <$50 -LC0DE LDX <$86 +LC0DE LDX <$86 get program line length LDB #$03 TST ,X+ BEQ LC114 @@ -171,7 +186,7 @@ STY <$50 LEAX +$01,X LEAY +$01,Y -LC0FD LDB ,-X +LC0FD LDB ,-X make insert space STB ,-Y CMPX <$42 BNE LC0FD @@ -187,7 +202,7 @@ LEAX $8F,X TST <$8C BNE LC124 - LEAX $95,X + LDX <linetop LC124 LEAY <LC159,PCR LC127 PSHS X LDX ,Y++ @@ -815,8 +830,7 @@ LC5D5 LBSR LC397 LC5D8 LDB #$3A LBSR LC64A - LDX <DPWORK - LEAX $95,X + LDX <linetop TST <$8C BNE LC5F2 LDD <$88 @@ -834,13 +848,7 @@ CMPB #$18 BEQ LC5D5 STB ,X+ - PSHS Y,D - LDD <DPWORK - ADDD #$DF - LEAY $DF,Y - STY ,Y - CMPX ,S - PULS Y,D + CMPX <lineend BNE LC5F2 LEAX -$01,X LDB #$08 @@ -848,14 +856,9 @@ BRA LC5F2 LC611 TST <$8C BNE LC626 - LDY <DPWORK - LEAY $9B,Y - PSHS Y - CMPX ,S++ + CMPX <lineb9b BEQ LC61F - LEAY -1,Y - PSHS Y - CMPX ,S++ + CMPX <lineb9a BCC LC626 LC61F COM <$8C LBSR LC39B @@ -864,14 +867,10 @@ ADDD <$8A STD <$88 CLR ,X - LDX <DPWORK - LEAX $95,X + LDX <linetop LBRA LC39B LC634 LEAX -$01,X - LDY <DPWORK - LEAY $94,Y - PSHS Y - CMPX ,S++ + CMPX <lineb0 BNE LC5F2 STB <$8C LBRA LC5D8 @@ -988,6 +987,13 @@ LDA #0 LDB #SS.Ready OS9 i$GetStt + CMPB #$F6 Not Ready + BNE RSENSE + CLRB + BRA RNSENSE +RSENSE + ORCC #1 set carry to indicate ready +RNSENSE PULS X,Y,PC