PCem
changeset 94:a956082bfaf9
Fixed trap handling.
| author | TomW |
|---|---|
| date | Sat Mar 29 17:35:50 2014 +0000 |
| parents | df0c5617560a |
| children | da4d97ca11cf |
| files | src/386.c |
| diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line diff
1.1 --- a/src/386.c Sat Mar 29 15:17:23 2014 +0000 1.2 +++ b/src/386.c Sat Mar 29 17:35:50 2014 +0000 1.3 @@ -15,6 +15,8 @@ 1.4 int inscounts[256]; 1.5 uint32_t oldpc2; 1.6 1.7 +int trap; 1.8 + 1.9 #define check_io_perm(port) if (!IOPLp || (eflags&VM_FLAG)) \ 1.10 { \ 1.11 int tempi = checkio(port); \ 1.12 @@ -385,6 +387,7 @@ 1.13 loadcs(readmemw(0,addr+2)); 1.14 } 1.15 cycles-=70; 1.16 + trap = 0; 1.17 } 1.18 1.19 void x86illegal() 1.20 @@ -1236,7 +1239,6 @@ 1.21 int tempi; 1.22 int cycdiff; 1.23 int oldcyc; 1.24 - int trap = flags & T_FLAG; 1.25 1.26 cycles+=cycs; 1.27 // output=3; 1.28 @@ -1327,12 +1329,11 @@ 1.29 } 1.30 cycdiff=oldcyc-cycles; 1.31 1.32 - if (trap && (flags&T_FLAG)) 1.33 + if (trap) 1.34 { 1.35 flags_rebuild(); 1.36 // oldpc=pc; 1.37 // oldcs=CS; 1.38 -// pclog("TRAP!!! %04X:%04X\n",CS,pc); 1.39 if (msw&1) 1.40 { 1.41 pmodeint(1,0);
