Mercurial > hg > Members > kono > os9 > sbc09
changeset 13:2aebc6b17fbf
swi/rti bug fixed
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Jul 2018 12:45:31 +0900 |
parents | 111e5defb8ab |
children | 3f18c1fa9132 |
files | engine.c io.c os9/level2/vector.asm |
diffstat | 3 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/engine.c Sat Jul 07 00:37:24 2018 +0900 +++ b/engine.c Sat Jul 07 12:45:31 2018 +0900 @@ -250,14 +250,15 @@ PUSHBYTE(idpreg) PUSHBYTE(ibreg) PUSHBYTE(iareg) + iccreg|=0x80; PUSHBYTE(iccreg) iccreg|=0x90; ipcreg=GETWORD(0xfff8); } if(irq==2&&!(iccreg&0x40)) { /* Fast IRQ */ PUSHWORD(ipcreg) + iccreg&=0x7f; PUSHBYTE(iccreg) - iccreg&=0x7f; iccreg|=0x50; ipcreg=GETWORD(0xfff6); } @@ -665,8 +666,8 @@ if(tb&0x80)PULUWORD(ipcreg) break; case 0x39: /* RTS*/ PULLWORD(ipcreg) break; case 0x3A: /* ABX*/ ixreg+=ibreg; break; - case 0x3B: /* RTI*/ tb=iccreg&0x80; - PULLBYTE(iccreg) + case 0x3B: /* RTI*/ PULLBYTE(iccreg) + tb=iccreg&0x80; if(tb) { PULLBYTE(iareg) @@ -706,8 +707,8 @@ PUSHBYTE(idpreg) PUSHBYTE(ibreg) PUSHBYTE(iareg) + iccreg|=0x80; PUSHBYTE(iccreg) - iccreg|=0x80; if(!iflag)iccreg|=0x50; switch(iflag) { case 0:ipcreg=GETWORD(0xfffa);break;
--- a/io.c Sat Jul 07 00:37:24 2018 +0900 +++ b/io.c Sat Jul 07 12:45:31 2018 +0900 @@ -326,10 +326,10 @@ #ifdef USE_MMU if (a==0x11+(IOPAGE&0xff)) { - if (c&0) { + if (c&1) { + mmu = phymem+memsize-0x10000+0xffa8; + } else { mmu = phymem+memsize-0x10000+0xffa0; - } else { - mmu = phymem+memsize-0x10000+0xffa8; } } mem[(IOPAGE&0xff00)+a] = c; // other register such as 0xffa0-0xffaf @@ -602,6 +602,8 @@ break; case 'R': pcreg = (mem[0xfffe] << 8) + mem[0xffff]; + bpskip = 0; + attention = escape = 1; break; } if (tracing||breakpoint||trskip||bpskip||stkskip) { attention = escape = 1; }
--- a/os9/level2/vector.asm Sat Jul 07 00:37:24 2018 +0900 +++ b/os9/level2/vector.asm Sat Jul 07 12:45:31 2018 +0900 @@ -4,11 +4,10 @@ reset clra tfr a,dp ldx #$ff90 - sta $10,x + sta 1,x use system mmu + sta $10,x set 0 page lda #$3f - sta $17,x - lda #1 - sta 1,x + sta $17,x set IO/os9p1 page jmp [<vector,pcr] org $fff0