# HG changeset patch # User Shinji KONO # Date 1531187347 -32400 # Node ID 7104ad38bed34ed892eabc2a8b1571f9a9313ec6 # Parent 5217f23f2f9ea2b4920ecee85205131dd8f75902 fix diff -r 5217f23f2f9e -r 7104ad38bed3 a09.c --- a/a09.c Mon Jul 09 14:54:43 2018 +0900 +++ b/a09.c Tue Jul 10 10:49:07 2018 +0900 @@ -1137,6 +1137,13 @@ putword(scanexpr(0)); skipspace(); } + if(pass==2) { + outbuffer(); + } + loccounter+=codeptr; + codeptr=0; + prevloc = loccounter+1; + oldlc = loccounter = 0; } void os9end() @@ -1161,7 +1168,6 @@ case 0:/* RMB */ // in OS9 mode, this generates no data // loccounter will be reset after any code to the current code generation - if (os9 && !prevloc) prevloc = loccounter+1; setlabel(lp); operand=scanexpr(0); if(unknown)error|=4; diff -r 5217f23f2f9e -r 7104ad38bed3 os9/Makefile --- a/os9/Makefile Mon Jul 09 14:54:43 2018 +0900 +++ b/os9/Makefile Tue Jul 10 10:49:07 2018 +0900 @@ -22,4 +22,5 @@ ./makerom -o os9d.rom modules/Shell modules/init.b modules/mdir modules/dir.b modules/SysGo modules/IOMan modules/pty-dd.b modules/pty.b modules/pdisk.b modules/d0.b modules/d1.b modules/clock.b modules/SCF modules/rbf.b modules/OS9p2 modules/OS9 os9lv2.rom : makerom level2/init - ./makerom -o os9lv2.rom -2 level2/Shell level2/dir level2/d0 level2/d1 level2/ioman level2/os9p3_perr level2/os9p4_regdump level2/pipe level2/piper level2/pipeman level2/scf level2/rbf level2/os9p2 level2/sysgo level2/pdisk level2/pty level2/term level2/init level2/boot level2/os9p1 + # ./makerom -o os9lv2.rom -2 level2/Shell level2/d1 level2/dir level2/ioman level2/os9p3_perr level2/os9p4_regdump level2/pipe level2/piper level2/pipeman level2/scf level2/rbf level2/os9p2 level2/sysgo level2/pdisk level2/d0 level2/pty level2/term level2/init level2/boot level2/os9p1 + ./makerom -o os9lv2.rom -2 level2/Shell level2/d1 level2/dir level2/mdir level2/ioman level2/scf level2/rbf level2/os9p2 level2/sysgo level2/pdisk level2/d0 level2/pty level2/term level2/init level2/boot level2/os9p1 diff -r 5217f23f2f9e -r 7104ad38bed3 os9/level2/Makefile --- a/os9/level2/Makefile Mon Jul 09 14:54:43 2018 +0900 +++ b/os9/level2/Makefile Tue Jul 10 10:49:07 2018 +0900 @@ -9,76 +9,77 @@ clean : rm -f ioman pdisk init os9p1 os9p2 os9p3_perr os9p4_regdump pipe pipeman pipeman_named piper rbf scf term pty d0 d1 clock vector boot shell dir mdir +LST = -l $@.lst pdisk : - $(A09) pdisk.asm -o pdisk -# $(A09) ../modules/pdisk.asm -o pdisk + $(A09) pdisk.asm -o pdisk $(LST) $(LST) +# $(A09) ../modules/pdisk.asm -o pdisk $(LST) boot : boot.asm - $(A09) boot.asm -o boot + $(A09) boot.asm -o boot $(LST) sysgo : sysgo.asm - $(A09) sysgo.asm -o sysgo + $(A09) sysgo.asm -o sysgo $(LST) init : init.asm - $(A09) init.asm -o init + $(A09) init.asm -o init $(LST) vector : vector.asm - $(A09) vector.asm -o vector + $(A09) vector.asm -o vector $(LST) term : pty-dd.asm - $(A09) pty-dd.asm -o term + $(A09) pty-dd.asm -o term $(LST) d0 : d0.asm - $(A09) d0.asm -o d0 + $(A09) d0.asm -o d0 $(LST) d1 : d1.asm - $(A09) d1.asm -o d1 + $(A09) d1.asm -o d1 $(LST) clock : clock.asm - $(A09) clock.asm -o clock + $(A09) clock.asm -o clock $(LST) pty : - $(A09) ../modules/pty.asm -o pty + $(A09) ../modules/pty.asm -o pty $(LST) shell : - $(A09) ${SRCCMD}/shell_21.asm -o shell + $(A09) ${SRCCMD}/shell_21.asm -o shell $(LST) mdir : - $(A09) ${SRCCMD}/mdir.asm -o mdir + $(A09) ${SRCCMD}/mdir.asm -o mdir $(LST) dir : - $(A09) ${SRCCMD}/dir.asm -o dir + $(A09) ${SRCCMD}/dir.asm -o dir $(LST) os9p1 : - $(A09) ${SRCDIR}/os9p1.asm -o os9p1 + $(A09) ${SRCDIR}/os9p1.asm -o os9p1 $(LST) os9p2 : - $(A09) ${SRCDIR}/os9p2.asm -o os9p2 + $(A09) ${SRCDIR}/os9p2.asm -o os9p2 $(LST) os9p3_perr : - $(A09) ${SRCDIR}/os9p3_perr.asm -o os9p3_perr + $(A09) ${SRCDIR}/os9p3_perr.asm -o os9p3_perr $(LST) os9p4_regdump : - $(A09) ${SRCDIR}/os9p4_regdump.asm -o os9p4_regdump + $(A09) ${SRCDIR}/os9p4_regdump.asm -o os9p4_regdump $(LST) ioman : - $(A09) ${SRCDIR}/ioman.asm -o ioman + $(A09) ${SRCDIR}/ioman.asm -o ioman $(LST) pipe : - $(A09) ${SRCDIR}/pipe.asm -o pipe + $(A09) ${SRCDIR}/pipe.asm -o pipe $(LST) pipeman : - $(A09) ${SRCDIR}/pipeman.asm -o pipeman + $(A09) ${SRCDIR}/pipeman.asm -o pipeman $(LST) pipeman_named : - $(A09) ${SRCDIR}/pipeman_named.asm -o pipeman_named + $(A09) ${SRCDIR}/pipeman_named.asm -o pipeman_named $(LST) piper : - $(A09) ${SRCDIR}/piper.asm -o piper + $(A09) ${SRCDIR}/piper.asm -o piper $(LST) rbf : - $(A09) ${SRCDIR}/rbf.asm -o rbf + $(A09) ${SRCDIR}/rbf.asm -o rbf $(LST) scf : - $(A09) ${SRCDIR}/scf.asm -o scf + $(A09) ${SRCDIR}/scf.asm -o scf $(LST) diff -r 5217f23f2f9e -r 7104ad38bed3 os9/level2/boot.asm --- a/os9/level2/boot.asm Mon Jul 09 14:54:43 2018 +0900 +++ b/os9/level2/boot.asm Tue Jul 10 10:49:07 2018 +0900 @@ -9,13 +9,13 @@ nam Boot ttl v09 Boot module -* ifp1 + ifp1 use defsfile -* endc + endc * * map extended rom on page 0x40- -* valid page started from 0x87cd +* first two bytes are extra rom module size tylg set Systm+Objct atrv set ReEnt+rev @@ -30,7 +30,7 @@ fcb edition start - ldy #$40 page no. + ldy #$40 extended rom page no. clra clrb pshs d,x,y,u @@ -40,8 +40,8 @@ os9 F$LDDDXY bcs last std ,s size return as d - addb #$ff - adda #$2f request +0x2000 + addb #$ff BtMem give us a little smaller memory + adda #$0f request +0x2000 clrb anda #$e0 addd #-1 @@ -51,6 +51,7 @@ stu 2,s return as x ldd ,s ldx #0 + ** copy to Bt BtRAM pagel tfr d,y lda 5,s sta $ffa0 @@ -59,13 +60,13 @@ sty ,u++ subb #2 sbca #0 - cmpb #0 + cmpb #0 $100 transfered? bne loop bita #$1f bne loop tsta - beq last - clr $ffa0 + beq last all transfered + clr $ffa0 back to system map ** 2k boundary inc 5,s ldx #0 diff -r 5217f23f2f9e -r 7104ad38bed3 os9/makerom.c --- a/os9/makerom.c Mon Jul 09 14:54:43 2018 +0900 +++ b/os9/makerom.c Tue Jul 10 10:49:07 2018 +0900 @@ -212,7 +212,7 @@ printf("mod "); printOs9Str(cur->name); fwrite(cur->mod, cur->size, 1, romfile); - printf(" \t: 0x%x - 0x%x\n",pos, pos + cur->size-1); + printf(" \t: 0x%x - 0x%x size 0x%x\n",pos, pos + cur->size-1,cur->size); #ifdef DEBUG printf(" \t: 0x%x \n",cur->location); printf(" \t: 0x%x - 0x%x : 0x%lx \n",pos, pos + cur->size, ftell(romfile)+start); @@ -280,7 +280,7 @@ printf("mod "); printOs9Str(cur->name); fwrite(cur->mod, cur->size, 1, romfile); - printf(" \t: 0x%x - 0x%x\n",pos, pos + cur->size-1); + printf(" \t: 0x%x - 0x%x size 0x%x\n",pos, pos + cur->size-1, cur->size); #ifdef DEBUG printf(" \t: 0x%x \n",cur->location); printf(" \t: 0x%x - 0x%x : 0x%lx \n",pos, pos + cur->size, ftell(romfile)+start); diff -r 5217f23f2f9e -r 7104ad38bed3 trace.c --- a/trace.c Mon Jul 09 14:54:43 2018 +0900 +++ b/trace.c Tue Jul 10 10:49:07 2018 +0900 @@ -107,10 +107,10 @@ int adr,skip; if (bpskip) { // skip unbreak instruction bpskip--; - int lpc = paddr(pcreg,mmu); + int ppc = paddr(pcreg,mmu); BPTR *prev = &breakpoint; for(BPTR b = breakpoint; b ; prev=&b->next, b=b->next ) { - if (lpc==b->address) { + if (ppc==b->address /* || pcreg==b->laddr */) { if (b->count==-1) { // temporaly break point BPTR next = b->next; free(b); @@ -335,6 +335,9 @@ case 'R': pcreg = (mem[0xfffe] << 8) + mem[0xffff]; bpskip = 0; +#ifdef USE_MMU + mmu = &mem[0xffa0]; +#endif attention = escape = 1; break; } diff -r 5217f23f2f9e -r 7104ad38bed3 v09.c --- a/v09.c Mon Jul 09 14:54:43 2018 +0900 +++ b/v09.c Tue Jul 10 10:49:07 2018 +0900 @@ -87,6 +87,7 @@ phymem = malloc(memsize + len - 0x2000); rommemsize = memsize + len - 0x2000; mem = phymem + memsize - 0x10000 ; + mmu = &mem[0xffa0]; prog = (char*)mem; if (romstart==0x8000) { romstart = memsize - 0x2000;