ack/mach/ns/libem/trp.s

30 lines
381 B
ArmAsm
Raw Normal View History

1985-07-26 11:56:24 +00:00
.define .trp
1987-01-16 16:49:46 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-07-26 11:56:24 +00:00
1987-01-16 16:49:46 +00:00
.sect .text
1985-07-26 11:56:24 +00:00
.trp:
save [r0, r1]
movd 12(sp), r0 !error number
cmpd r0, 16
bge 1f
sbitd r0, r1
andw @.ignmask, r1
beq 1f
br 3f !do not trap
1: !do trap
movd @.trpreg, r1
cmpqd 0, r1
beq 2f
movqd 0, @.trpreg
jsr r1
3:
restore [r0, r1]
ret 4
2:
jump @.stop !no trapprocedure supplied