in QLMultimon I've seen you do the following in EXAM_REGS (mon1_asm) - the comments are mine:
Code: Select all
LEA -$68(A0),A0 ; Start of job again
LEA EXTAB-$54(A6),A2 ; ???? -> TODO
MOVE.L A2,$1C(A0) ; JB_TRAPV - vector table
CMPA.L $28010,A0 ; SV_BASIC = Start of SuperBASIC area
BEQ.S ST_TP_1 ; Skip if SuperBASIC is the job
ADDA.L (A0),A0 ; JB_LEN = job length in header
BRA.S ST_TP
My question is, what's this line actually setting in the job's JB_TRAPV, because to me it looks like it's setting the trap vectors for the monitored job to be -2(A6) of the monitor, and not EXTAB.
We have the following in the code:
Code: Select all
EXTAB EQU 82 Exception table
EXTABEND EQU 158 End of Exception Table
Code: Select all
LEA EXTABEND(A6),A7 ; Top of Exception vector table
MOVEQ #10,D0 ; Counter for 11 exception vectors
*--------------------------------------------------------------------
* Loop around for TRAP #15 to TRAP #5. Each of these points to the
* EXBRKPNT code and will fire a breakpoint if executed.
*--------------------------------------------------------------------
SETTRAPS PEA EXBRKPNT ; Code for this trap's vector
DBF D0,SETTRAPS ; Do all of #15 down to #5
PEA EXINTL7 ; Interrupt level 7
PEA EXTRACE ; Trace exception
PEA EXPRIVV ; Privilege violation
PEA EXTRAPV ; TRAPV
PEA EXCHK ; CHK
PEA EXDIVZER ; Divide by zero exception
PEA EXILLINST ; ILLEGAL instruction exception
PEA EXADDERR ; Address error exception
MOVE.L A7,A1 ; EXTAB = Exception vectors address
LEA DATASPACE(A6),A7 ; Reset stack pointer
MOVEQ #-1,D1 ; For the current job
MOVEQ #MT_TRAPV,D0
TRAP #1 ; Set the exception vectors
What am I obviously missing here please? Why the EXTAB-$54(A6)?
Cheers,
Norm.
PS. I'm adding comments to the monitor as and when I have a couple of hours free from "having a life"
