home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD2.bin
/
bbs
/
util
/
snoopy-2.0.lha
/
Snoopy
/
Macros
/
patch
< prev
next >
Wrap
Text File
|
1993-12-29
|
2KB
|
66 lines
;-------------- save all registers to pcr-Data structure
SAVEREGS MACRO ;\1=target,\2=MODE
move.l D0,(\1+sregs_D0,a6)
move.l D1,(\1+sregs_D1,a6)
move.l D2,(\1+sregs_D2,a6)
move.l D3,(\1+sregs_D3,a6)
move.l D4,(\1+sregs_D4,a6)
move.l D5,(\1+sregs_D5,a6)
move.l D6,(\1+sregs_D6,a6)
move.l D7,(\1+sregs_D7,a6)
move.l A0,(\1+sregs_A0,a6)
move.l A1,(\1+sregs_A1,a6)
move.l A2,(\1+sregs_A2,a6)
move.l A3,(\1+sregs_A3,a6)
move.l A4,(\1+sregs_A4,a6)
move.l A5,(\1+sregs_A5,a6)
move.l (4,sp),(\1+sregs_A6,a6)
move.l sp,(\1+sregs_A7,a6)
addq.l #8,(\1+sregs_A7,a6)
;-------------- NEW: to no longer cause enforcer-hits I test the memory via
;-------------- exec/TypeOfMem(); this takes (considerably) longer but hey
;-------------- you asked for it!
pushm d0-d7/a0-a6
movea.l a6,a5
movea.l (execBase).w,a6
movea.l (\1+sregs_A0,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I0,a5)
movea.l (\1+sregs_A1,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I1,a5)
movea.l (\1+sregs_A2,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I2,a5)
movea.l (\1+sregs_A3,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I3,a5)
movea.l (\1+sregs_A4,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I4,a5)
movea.l (\1+sregs_A5,a5),a1
bsr.b .READINDIRECT
move.l d0,(\1+sregs_I5,a5)
bra.b .DONEREADING
.READINDIRECT push a1
CALL TypeOfMem
pop a1
tst.l d0
beq.b .SKIPREADING
move.l a1,d0
bclr #0,d0
movea.l d0,a1
move.l (a1),d0
.SKIPREADING rts
.DONEREADING popm d0-d7/a0-a6
push a0
move.l (8,sp),a0
move.l (a0),(\1+sregs_I6,a6)
pop a0
move.l (8,sp),(\1+sregs_I7,a6)
ENDM