1989-01-19 16:43:32 +00:00
|
|
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
|
|
|
.define .error
|
|
|
|
.define .Xtrp
|
|
|
|
|
|
|
|
! eax is trap number
|
|
|
|
! all registers must be saved
|
|
|
|
! because return is possible
|
|
|
|
! May only be called with error no's <16
|
|
|
|
.sect .text
|
|
|
|
.error:
|
|
|
|
mov ecx,eax
|
|
|
|
mov ebx,1
|
|
|
|
sal ebx,cl
|
|
|
|
.extern .ignmask
|
|
|
|
.extern .trp
|
|
|
|
test ebx,(.ignmask)
|
|
|
|
jne 2f
|
|
|
|
call .trp
|
|
|
|
2:
|
|
|
|
ret
|
|
|
|
|
|
|
|
.Xtrp:
|
1989-02-08 15:47:22 +00:00
|
|
|
pusha
|
1989-01-19 16:43:32 +00:00
|
|
|
cmp eax,16
|
|
|
|
jge 1f
|
|
|
|
call .error
|
1989-02-08 15:47:22 +00:00
|
|
|
popa
|
1989-01-19 16:43:32 +00:00
|
|
|
ret
|
|
|
|
1:
|
1989-02-08 15:47:22 +00:00
|
|
|
call .trp
|
|
|
|
popa
|
|
|
|
ret
|