Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileSetexc() BIOSSyntax(VOIDP)() Setexc( num, newvec )
WORD num;
VOID (*newvec)();
Function Setexc() reads or modifies system exception vectors.
Opcode 5 (0x05)
Availability All TOSversions.
Parameters num indicates the vector number you are interested in. To
obtain the vector number divide the address of the vector by
4. Some common vectors are:
Name num Vector
VEC_BUSERROR 0x02 Bomb errors (Bus, Address,
VEC_ADDRESSERROR 0x03 Instruction)
VEC_ILLEGALINSTRUCTION 0x04
VEC_GEMDOS 0x21 trap #1 (GEMDOS)
VEC_GEM 0x22 trap #2 (AES/VDI)
VEC_BIOS 0x2D trap #13 (BIOS)
VEC_XBIOS 0x2E trap #14 (XBIOS)
VEC_TIMER 0x100 System timer (etv_timer)
VEC_CRITICALERROR 0x101 Critical error handler
(VEC_CRITICALERR) (etv_critic)
VEC_TERMINATE 0x102 Process terminate handle
(VEC_PROCTERM) (etv_term)
newvec should be the address of your new vector handler.
Passing a value of VEC_INQUIRE ((VOIDP)-1) will not modify
the vector.
Binding pea newvec
move.w num,-(sp)
move.w #$05,-(sp)
trap #13
addq.l #8,sp
Return Value The original value of the vector is returned by the call.
Comments You must reinstate old vector handlers you changed prior to
your process exiting. Programs which modify replace system
vector code should install themselves following the
conventions of the XBRA protocol. For details, consult the
overview portion of this chapter.