# HG changeset patch # User Shinji KONO # Date 1546259213 -32400 # Node ID 348d062ee8de4b39215a9bc83bf282171c7a0a1d # Parent c4e909f21b2522e3fd72d43b0322f1b99cbc5759 game09 load command diff -r c4e909f21b25 -r 348d062ee8de game09/game09.asm --- a/game09/game09.asm Mon Dec 31 17:51:27 2018 +0900 +++ b/game09/game09.asm Mon Dec 31 21:26:53 2018 +0900 @@ -29,11 +29,11 @@ DP4B equ $4B DP4E equ $4E "%" DP4F equ $4F -DP50 equ $50 "&" program top +DP50 equ $50 "&" program end DP52 equ $52 DP58 equ $58 program max -DP7C equ $7C "=" program current end -DP7E equ $7E program current end +DP7C equ $7C +DP7E equ $7E "=" program top DP82 equ $82 "@" DP83 equ $83 DP84 equ $84 @@ -54,7 +54,7 @@ lineend rmb 2 $A2 ustack rmb 128 linebuf rmb 252 -program rmb $2000 +program rmb $8000 size equ . name fcs "Game09" @@ -669,7 +669,7 @@ CLR <$8C LBSR LC373 BCS LC4A0 - LDD #LC3E8 + LDD #1000 LC4A0 STD <$88 LDB ,X CMPB #$2C @@ -926,9 +926,22 @@ STX +$03,S LC6A2 BITA #$DF BEQ LC6B0 - CMPA #$2C + CMPA #$2C , BEQ LC6AE - BSR LC6C9 + CMPA #$22 " + BNE LCXXX + leax 1,x + PSHS X + LDA #$22 +LXX1 tst ,x + beq LXX2 + cmpa ,x+ + bne LXX1 + clr -1,x + leax 1,x +LXX2 PULS D + BRA LC6B3 +LCXXX BSR LC6C9 BRA LC6B3 LC6AE LEAX +$01,X LC6B0 LDD #$FFFF @@ -1009,6 +1022,8 @@ FDB CAUTO-* FCB 'R','N',3 RENUM first line no,inc,renum start FDB RENUM-* + FCB 'L','D',1 load file-name + FDB pload-* * FCB 'R','D',3 DISK READ address,track,sector * FDB GETDK-* * FCB 'W','R',3 DISK WRITE @@ -1030,7 +1045,7 @@ LDD #$00A LC770 LDY ,U++ BPL LC779 - LDY #LC3E8 + LDY #1000 LC779 STY ,X++ LBSR LC173 LEAY D,Y @@ -1047,7 +1062,7 @@ LDD ,U BEQ LC79E BPL LC79C - LDD #LC3E8 + LDD #1000 LC79C STD <$88 LC79E CLR <$8C RTS @@ -1068,6 +1083,47 @@ SYSTEM clrb os9 F$Exit rts + +pload pshs a,x,y + ldx ,u + lda #1 + os9 I$Open + bcs ploaderr + sta ,s +ploadloop + lda ,s + ldx