Skip to content

Commit

Permalink
causeway: separate exception/interrupt type flag from CPU eflags
Browse files Browse the repository at this point in the history
preparation to fix issue open-watcom#1361
  • Loading branch information
jmalak committed Jan 6, 2025
1 parent ff0d031 commit d52aa7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:

jobs:
start-start:
if: github.repository == 'open-watcom/open-watcom-v2'
#if: github.repository == 'open-watcom/open-watcom-v2'
name: Check if to run
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 9 additions & 9 deletions bld/causeway/asm/interrup.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

;
DpmiEmuSystemFlags dd 0
ExceptionType dd 0
;
; do NOT change order of these variables (you can add at the end), MED 01/08/96
ExceptionCode dd 0
Expand Down Expand Up @@ -919,8 +920,8 @@ mednoem:
mov eax,[esp+(4+4)+(4)] ;get error code.
mov ExceptionCode,eax ;/
mov eax,[esp+(4+4)+(4)+(4)+(4+4)] ;Get flags.
or eax,65536
mov ExceptionFlags,eax ;Let dispatch know its an exception.
mov ExceptionFlags,eax ;/
mov b ExceptionType,1 ;Let dispatch know its an exception.
mov eax,cr2 ;Grab this now to save more PL
mov ExceptionCR2,eax ;switches for page faults.
pop eax
Expand All @@ -930,15 +931,14 @@ mednoem:
inter14_NoCode:
and w[esp+(4+4)+(4)+(4+4)],0011111111010101b
mov eax,[esp+(4+4)+(4)+(4+4)] ;Get flags.
and eax,not 65536
mov ExceptionFlags,eax
cmp ExceptionIndex,0
mov ExceptionFlags,eax ;/
mov b ExceptionType,0 ;unset exception
cmp ExceptionIndex,0 ;int 0
jz inter14_ForceException
cmp ExceptionIndex,1 ;int 1
jnz inter14_SortedCode
inter14_ForceException:
; or ExceptionFlags,65535 ;force an exception.
or ExceptionFlags,65536 ;force an exception.
mov b ExceptionType,1 ;set exception

inter14_SortedCode:
pop eax
Expand All @@ -954,7 +954,7 @@ inter14_SortedCode2:
jz KernalStack ;Already on system stack?
mov ax,DpmiEmuDS
mov ds,ax
test ExceptionFlags,65536 ;exception?
test b ExceptionType,1 ;exception?
jnz KernalStack
;
push ebx
Expand Down Expand Up @@ -1235,7 +1235,7 @@ IntDispatch proc near
mov eax,esi
add esi,esi ;*4
add esi,eax ;*6
test ExceptionFlags,65536
test b ExceptionType,1 ;exception?
jnz inter17_Excep
;
;Dispatch normal interrupt.
Expand Down

0 comments on commit d52aa7e

Please sign in to comment.