#: 18963 S12/OS9/68000 (OSK)
30-Sep-93 21:06:47
Sb: errno
Fm: John Strong 72270,1555
To: all
The main reason it is not recommanded to mess with errno in a signal trap is
because register A6 (the gobal variable pointer) may contain a different value
than the main program.
OS9 F$Icpt
(a0) address of intercept routine
(a6) address to pass to intercept routine
example:
vsect signal: dc.w 1
ends
movem.l a0/a6,-(sp) save registers
lea SigTrap(pc),a0
lea Signal(a6),a6
os9 F$Icpt
movem.l (sp)+,a0/a6
bcs error
|
|
| error os9 F$Exit
SigTrap: move.w d1,(a6) a6 points to the variable signal
os9 F$RTE
ends
-----------------------------
John R. Strong
StrongWare
|