Mercurial > hg > Members > kono > os9 > sbc09
changeset 82:82d03e816deb
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 11 Aug 2018 14:04:54 +0900 |
parents | 92b729506212 |
children | 2e3d4b54ec2d |
files | game09/game09.asm src/a09.c src/os9/level1/cmds/Makefile src/os9/level2/cmds/Makefile src/v09.c |
diffstat | 5 files changed, 66 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/game09/game09.asm Tue Aug 07 12:31:52 2018 +0900 +++ b/game09/game09.asm Sat Aug 11 14:04:54 2018 +0900 @@ -20,18 +20,21 @@ dpage rmb $96 DP00 equ $00 -DP04 equ $04 variabble base A-Z (until DP36) +VAROFS equ $04 variabble base 'A'-'Z' until $36 +DP38 equ $38 variable end DP42 equ $42 program copy pointer -DP46 equ $46 -DP4A equ $4A input lineno +DP44 equ $44 variable 'a'-'z' until $76 +DP48 equ $48 """ +DP4A equ $4A "#" next line no DP4B equ $4B -DP4E equ $4E +DP4E equ $4E "%" DP4F equ $4F -DP50 equ $50 program top +DP50 equ $50 "&" program top DP52 equ $52 DP58 equ $58 program max +DP7C equ $7C "=" program current end DP7E equ $7E program current end -DP82 equ $82 +DP82 equ $82 "@" DP83 equ $83 DP84 equ $84 DP86 equ $86 input line (except lineno) @@ -56,11 +59,12 @@ name fcs "Game09" fcb edition +coldstart start * clrb * os9 F$Exit LC000 BRA LC005 LC002 NOP -LC003 BRA LC014 +LC003 BRA warmst LC005 TFR U,D TFR A,DP STU <DPWORK @@ -70,9 +74,9 @@ STX <$50 LDA #$FF STA ,X -LC014 LDU <DPWORK - LEAX DP04,U - STX <DP04 +warmst LDU <DPWORK + LEAX VAROFS,U + STX <VAROFS LEAX linebuf-1,U STX <lineb0 LEAX 1,X @@ -87,18 +91,18 @@ STX <$58 LC020 LDA #$FF STA <$8C -LC024 LDS <DPSTK +GAMETP LDS <DPSTK LDU <DPWORK LEAU linebuf,U user stack - LEAX >LC63F,PCR - LBSR LC165 -LC032 LBSR LC370 + LEAX >PRMPT,PCR + LBSR LPRNT +LC032 LBSR GETCLN BCS LC06D STX <$42 LBSR LC1D3 - BEQ LC024 + BEQ GAMETP LC03E BSR LC09C -LC040 BMI LC024 +LC040 BMI GAMETP STX <$42 LC044 LEAX +$02,X LDA ,X+ @@ -115,7 +119,7 @@ LC05F LDX <$42 STX <$84 BSR LC0A0 - BMI LC024 + BMI GAMETP CMPX <$84 BEQ LC03E BRA LC044 @@ -127,7 +131,7 @@ LC077 BSR LC09C listing LC079 LBSR LC397 TST ,X - BMI LC024 + BMI GAMETP BSR LC087 LBSR LC173 BRA LC079 @@ -135,7 +139,7 @@ PSHS X LBSR LC443 PULS X - LBRA LC165 + LBRA LPRNT LC093 LDX <$42 LEAX +$02,X LC097 TST ,X+ @@ -201,7 +205,7 @@ STB ,X+ BNE LC10E LC114 LBRA LC032 -LC117 LBRA LC024 +LC117 LBRA GAMETP LC11A LDX <DPWORK LEAX $8F,X TST <$8C @@ -240,7 +244,7 @@ FDB 10 FDB 1 FDB 0 -LC165 CLRA +LPRNT CLRA LC166 STA <$94 LC168 LDB ,X+ CMPB <$94 @@ -248,7 +252,7 @@ LBSR LC412 BRA LC168 LC173 LBSR LC650 - LBCS LC024 + LBCS GAMETP RTS LC17B CMPA #$20 BEQ LC1D1 @@ -310,7 +314,7 @@ BEQ LC1E7 CMPA #$3D BNE LC1EC -LC1F6 LBSR LC521 +LC1F6 LBSR EXPR LC1F9 PSHS B LDB ,X BITB #$DF @@ -330,7 +334,7 @@ BNE LC22E PSHS X STB <$8C - LBSR LC5D8 + LBSR GETLIN BSR LC1F6 PULS X LEAX +$01,X @@ -373,7 +377,7 @@ LC269 BSR LC279 LEAY D,Y RTS -LC26E CMPA #$28 +LC26E CMPA #$28 A(I) pointer of word array BNE LC292 BSR LC279 LSLB @@ -396,7 +400,7 @@ LC292 ANDB #$3F CLRA LSLB - ADDD <DP04 + ADDD <VAROFS TFR D,Y RTS LC29C PSHU B,A @@ -407,7 +411,7 @@ DECB BNE LC2AB LC2A9 LEAX +$01,X -LC2AB LBSR LC521 +LC2AB LBSR EXPR PULU Y EXG D,Y PSHU Y,B,A @@ -516,7 +520,7 @@ RTS LC36D ANDCC #$FE RTS -LC370 LBSR LC5D8 +GETCLN LBSR GETLIN LC373 BSR LC364 BCC LC396 CLRA @@ -602,7 +606,7 @@ LC40C CMPB #$24 BNE LC415 PULS B,A -LC412 LBRA LC64A +LC412 LBRA OUTC1 LC415 CMPB #$3F BNE LC449 LDB +$01,X @@ -615,7 +619,7 @@ ADDA <$8E BMI LC430 BSR LC3B1 -LC430 LBRA LC165 +LC430 LBRA LPRNT LC433 TSTA LBPL LC11A LBSR LC4F3 @@ -634,7 +638,7 @@ STX <$4A LBSR LC09C STX <$50 - LBRA LC024 + LBRA GAMETP LC45E PULS PC,B,A LC460 CMPB #$3E BNE LC46C @@ -724,12 +728,12 @@ STY ,S CMPX <linetop BNE LC519 - LBSR LC165 + LBSR LPRNT BRA LC51C LC519 LBSR LC087 -LC51C LBRA LC024 +LC51C LBRA GAMETP LC51F LEAX +$01,X -LC521 LBSR LC373 +EXPR LBSR LC373 BCS LC532 LBRA LC23F LC529 BSR LC51F - @@ -774,7 +778,7 @@ BEQ LC582 PULS B,A LBSR LC433 - LBRA LC165 + LBRA LPRNT LC57E LDB ,S BSR LC584 LC582 PULS B,A @@ -794,7 +798,7 @@ LBRA LC412 LC5A1 CLRA BSR LC5BD - LBCC LC64D + LBCC GETC1 LC5A4 PSHS B BSR LC5BD PSHU B @@ -826,8 +830,8 @@ LC5D2 ANDCC #$FE RTS LC5D5 LBSR LC397 -LC5D8 LDB #$3A - LBSR LC64A +GETLIN LDB #$3A + LBSR OUTC1 LDX <linetop TST <$8C BNE LC5F2 @@ -836,8 +840,8 @@ LBSR LC443 LDB #$20 STB -$01,X - BSR LC64A -LC5F2 BSR LC64D + BSR OUTC1 +LC5F2 BSR GETC1 CMPB #$08 BEQ LC634 CMPB #$0D @@ -850,7 +854,7 @@ BNE LC5F2 LEAX -$01,X LDB #$08 - BSR LC64A + BSR OUTC1 BRA LC5F2 LC611 TST <$8C BNE LC626 @@ -860,7 +864,7 @@ BCC LC626 LC61F COM <$8C LBSR LC39B - BRA LC5D8 + BRA GETLIN LC626 LDD <$88 ADDD <$8A STD <$88 @@ -871,14 +875,14 @@ CMPX <lineb0 BNE LC5F2 STB <$8C - LBRA LC5D8 -LC63F + LBRA GETLIN +PRMPT FCB $D,$A FCC "*READY" FCB $D,$A,0 -LC64A LBRA OUTCH -LC64D LBRA GETCH +OUTC1 LBRA OUTCH +GETC1 LBRA GETCH LC650 LBRA SENSE LC653 CMPA #$2E EXBOP @@ -939,7 +943,7 @@ LC6C3 LDD ,Y JSR D,Y PULS PC,U,X -LC6C9 LBSR LC521 +LC6C9 LBSR EXPR LC6CC PSHS B LDB ,X BITB #$DF
--- a/src/a09.c Tue Aug 07 12:31:52 2018 +0900 +++ b/src/a09.c Sat Aug 11 14:04:54 2018 +0900 @@ -174,7 +174,7 @@ {"SBCA",7,0x82},{"SBCB",7,0xc2}, {"SEC",1,0x1a01},{"SEF",1,0x1a40},{"SEI",1,0x1a10}, {"SEIF",1,0x1a50},{"SET",13,15}, - {"SETDP",13,14},{"SEV",1,0x1a02},{"SEX",0,0x1d}, + {"SETDP",13,14},{"SEV",1,0x1a02},{"SEX",0,0x1d},{"SPC",13,20}, {"STA",7,0x87},{"STB",7,0xc7},{"STD",8,0xcd}, {"STS",9,0x10cf},{"STU",8,0xcf},{"STX",8,0x8f}, {"STY",9,0x108f},
--- a/src/os9/level1/cmds/Makefile Tue Aug 07 12:31:52 2018 +0900 +++ b/src/os9/level1/cmds/Makefile Sat Aug 11 14:04:54 2018 +0900 @@ -1,10 +1,10 @@ SRC2 = ../../nitros9-code/level2/cmds SRC1 = ../../nitros9-code/level1/cmds -OBJ2 = mdir mfree proc procs reboot +OBJ2 = mdir mfree proc OBJ1 = asm attr calldbg cmp config copy cputype date debug del deldir devs dir dir_cb dirsort dump echo edit \ - error free help ident irqs link list load login makdir pxd pwd procs prompt shellplus sleep tee touch tsmon unlink + error free help ident irqs link list load login makdir pxd pwd procs prompt shellplus sleep tee touch tsmon unlink game09 all : $(OBJ2) $(OBJ1) @@ -13,6 +13,9 @@ clean : rm -rf *.lst $(OBJ2) $(OBJ1) +game09 : + $(A09) -l $@.lst -o $@ ../../../../game09/$@.asm + mdir : $(A09) -l $@.lst -o $@ $(SRC1)/$@.asm mfree :
--- a/src/os9/level2/cmds/Makefile Tue Aug 07 12:31:52 2018 +0900 +++ b/src/os9/level2/cmds/Makefile Sat Aug 11 14:04:54 2018 +0900 @@ -4,7 +4,8 @@ OBJ2 = mdir mfree proc procs reboot dmem pmap smap mmap OBJ1 = asm attr calldbg cmp config copy cputype date debug del deldir devs dir dir_cb dirsort dump echo edit \ - error free help ident irqs link list load login makdir pxd pwd procs prompt shellplus sleep tee touch tsmon unlink + error free help ident irqs link list load login makdir pxd pwd procs prompt shellplus sleep tee touch tsmon unlink \ + game09 all : $(OBJ2) $(OBJ1) @@ -14,6 +15,9 @@ clean : rm -rf *.lst $(OBJ2) $(OBJ1) +game09 : + $(A09) -l $@.lst -o $@ ../../../../game09/$@.asm + mdir : $(A09) -l $@.lst -o $@ $(SRC2)/$@.asm mfree :
--- a/src/v09.c Tue Aug 07 12:31:52 2018 +0900 +++ b/src/v09.c Sat Aug 11 14:04:54 2018 +0900 @@ -109,8 +109,9 @@ * >0x100000 lapround * * discless boot - * rom image will be copyied from 0xed00-0x1xxxx - * boot copies 0x10000-0x1xxxx to os9's boot memory + * rom image will be copyied from 0xed00-0x1xxxx (all ram) + * boot copies 0x10000-0x1xxxx to os9's boot memory (ususally done by rel.asm ) + * after that 0x10000-0x1xxx will be all free */ phymem = malloc(memsize + len - 0x2000); rommemsize = memsize + len - 0x2000; @@ -153,7 +154,7 @@ int i; int setterm = 1; timerirq = 2; // use FIRQ default - memsize = 512*1024; + memsize = 512*1024*4; // full 2 mbute escchar='\x1d'; tracelo=0;tracehi=0xffff; for(i=1;i<argc;i++) {