TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: John Strong 72270,1555
date: 1993-09-30 21:06:47
subject: errno

#: 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

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.