home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
disk_tools
/
cd32tools
/
fixsad.asm
< prev
next >
Wrap
Assembly Source File
|
1995-07-12
|
933b
|
32 lines
**
** Whoah, assembler. i found a hint that the LEVEL-7 interrupt vector
** is disabled on some machines. this is bad, because you can't trigger
** the SAD, the SIMPLE AMIGA DEBUGGER. this patch re-enables the SAD.
**
** if you don't know what a level-7 irq is good for, do NOT use this.
**
INCDIR "PROG:Assembler/include"
INCLUDE "lib/exec.i"
; INCLUDE "exec/memory.i"
MACHINE 68020
SECTION "ASM",CODE
Begin movea.l 4.w,a6 ; call Routine() in Supervisor-Mode
lea Routine(pc),a5
jsr Supervisor(a6)
rts
Routine
movec vbr,a0 ; get the Vector Base Register (68010++ only)
moveq #0,d0 ; set early return code (RETURN_OK)
move.l $7c(a0),a1 ; get the LEVEL-7 Vector (NMI)
cmp.w #$4E73,(a1) ; does it point to a RTE instruction ?
bne.s Exit ; no, then return.
add.l #2,$7c(a0) ; correct the vector to the NMI routine.
moveq #5,d0 ; warn the user that we've fixed a vector.
Exit rte ; end the SuperVisor mode
END