Article View: comp.sys.atari.st
Article #32908errorchk
From: Leo de Wit
Date: Sat, 18 Jun 1988 17:58
Date: Sat, 18 Jun 1988 17:58
48 lines
1710 bytes
1710 bytes
Having had a small problem recently with this program that is in
Comp.sources.atari.st (address error on exit of other - GEM - program)
I have added a fix. The reason seems to be that when some GEM programs
terminate they are using the GEM-exit vector, and the exit routine
still relies on A4 having a valid contents (I'm not sure). After I
modified the code to save A4 on the stack the problem disappeared.
Here is the relevant part of the code (comments omitted), with 2
instructions added:
DTOPWAIT
MOVE.L $602C,A0
MOVEQ.L #0,D1
BRA.S DTOPAREND
DTOPARNT
ADDQ.L #1,D1
MOVE.L 36(A0),A0
DTOPAREND
TST.L (A0)
BNE.S DTOPARNT
CMP.B #3,D1
BNE.S DTWEND
MOVE.L A4,-(SP) * Added this instruction to save A4 ....
LEA WAITMSG(PC),A4
BRA.S DTOPW3
DTOPW2
EXT.W D0
MOVE.W D0,-(SP)
MOVE.W #2,-(SP)
MOVE.W #3,-(SP)
TRAP #BIOS
ADDQ.L #6,SP
DTOPW3
MOVE.B (A4)+,D0
BNE.S DTOPW2
MOVE.W #2,-(SP)
MOVE.W #2,-(SP)
TRAP #BIOS
ADDQ.L #4,SP
MOVE.L (SP)+,A4 * .... and this one to restore A4
DTWEND
MOVE.L OLDVEC(PC),-(SP)
RTS
Leo. * Not an instruction, more a periferal 8-)
Technical Details
Message-ID:
<510@philmds.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!philmds!leoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: errorchk Keywords: Fix, GEM-exit Message-ID: <510@philmds.UUCP> Date: 18 Jun 88 17:58:21 GMT Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Organization: Philips I&E DTS Eindhoven Lines: 48