Mercurial > hg > Members > kono > os9 > sbc09
changeset 38:52f7ad4c2ebb
a09 out range bug
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 Jul 2018 06:41:02 +0900 |
parents | 7baffb867d70 |
children | 1d3057b6b786 |
files | a09.c os9/level2/boot.asm trace.c |
diffstat | 3 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/a09.c Mon Jul 16 11:22:28 2018 +0900 +++ b/a09.c Tue Jul 17 06:41:02 2018 +0900 @@ -938,7 +938,7 @@ if(lp) { if(lp->cat!=13&&lp->cat!=6) { if(lp->cat!=2||lp->value!=loccounter) - ; // error|=8; + lp->value=loccounter; // error|=8; } else { lp->cat=2; lp->value=loccounter; @@ -1244,7 +1244,8 @@ if(exprcat==2)lp->cat=2; else lp->cat=0; lp->value=operand; - } // else error|=8; + } else // else error|=8; + lp->value=operand; } break; case 7:/* FCB */ @@ -1350,7 +1351,8 @@ if(exprcat==2)lp->cat=3; else lp->cat=1; lp->value=operand; - } // else error|=8; + } else // else error|=8; + lp->value=operand; } break; case 2: /* END */ @@ -1658,7 +1660,6 @@ exit(4); } processfile(srcname); - } while (longer()); fprintf(stderr,"%d Pass 2 errors.\n",errors); if(listing) { fprintf(listfile,"%d Pass 2 errors.\n",errors); @@ -1670,6 +1671,7 @@ fprintf(objfile,"S9030000FC\n"); } fclose(objfile); + } while (longer()); return 0; }
--- a/os9/level2/boot.asm Mon Jul 16 11:22:28 2018 +0900 +++ b/os9/level2/boot.asm Tue Jul 17 06:41:02 2018 +0900 @@ -31,7 +31,7 @@ start lbra entry - lbra btdebg + lbra btdebug entry ldy #$40 extended rom page no. clra
--- a/trace.c Mon Jul 16 11:22:28 2018 +0900 +++ b/trace.c Tue Jul 17 06:41:02 2018 +0900 @@ -122,9 +122,9 @@ void do_escape(void) { char s[80]; int adr,page; + int ppc = paddr(pcreg,mmu); if (bpskip) { // skip unbreak instruction bpskip--; - int ppc = paddr(pcreg,mmu); BPTR *prev = &breakpoint; for(BPTR b = breakpoint; b ; prev=&b->next, b=b->next ) { #ifdef USE_MMU @@ -149,13 +149,20 @@ return; } if (stkskip) { // skip until return +#ifdef USE_MMU + if (phymem[ppc]==0x3b||(phymem[ppc]==0x10&&phymem[ppc+1]==0x3f)) + goto restart0; +#else + if (mem[ppc]==0x3b||(mem[ppc]==0x10&&mem[ppc+1]==0x3f)) + goto restart0; +#endif if (sreg < stkskip ) return; } restart0: stkskip = 0; restore_term(); #ifdef USE_MMU - Byte *phyadr = mem0(phymem,pcreg,mmu); + Byte *phyadr = phymem + ppc; prog = (char*)phyadr - pcreg; #endif do_trace(stdout);