ack/mach/i86/libem/error.s

43 lines
523 B
ArmAsm
Raw Permalink Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1985-02-07 15:33:13 +00:00
.define .error
1988-07-13 14:29:32 +00:00
.define .Xtrp
1985-02-07 15:33:13 +00:00
! ax is trap number
! all registers must be saved
! because return is possible
! May only be called with error no's <16
1987-01-08 10:13:48 +00:00
.sect .text
1985-02-07 15:33:13 +00:00
.error:
push bp
push si
push di
push dx
push cx
push bx
push ax
mov cx,ax
mov bx,1
sal bx,cl
1987-01-08 10:13:48 +00:00
.extern .ignmask
.extern .trp
1985-02-07 15:33:13 +00:00
test bx,(.ignmask)
jne 2f
call .trp
2:
pop ax
pop bx
pop cx
pop dx
pop di
pop si
pop bp
ret
1988-07-13 14:29:32 +00:00
.Xtrp:
cmp ax,16
jge 1f
call .error
ret
1:
jmp .trp