Re: A92: converting old fargo programs


[Prev][Next][Index][Thread]

Re: A92: converting old fargo programs




At 06:26 1998-11-19 +0100, you wrote:
>
>HI
>I'm just converting the old diamonds-source to fargo II, because I want
>to link some noew levels. The whole things ran pretty nice, until you
>start the game, then I always get an error. It didn't take me long to
>find the reason for that error:
>  move.w $2700,sr
>According to the file convert.txt it isn't alowed any more to address
>the status register. Unfortunatly, since I'm a very beginner in
>assembler, I neither understood the alternertives, nor could I find one
>by myself.
>So I thought, I'd simply ask all the genusis in this mailing list. Hope
>someone knows something.
>Thanks, Gek
> 

If you want to redirect an interrupt in Fargo II / PlusShell / DoorsOS you
need to do something like this:

	move.w		#$2700,d0			;Disable interrupts, put
	trap			#1					; old int mask in d0
	bclr.b		#2,($600001)		;Disable low memory protection
	move.l		($74),old_int5		;Store old int5
	move.l		#new_int5,($74)		;Activate new interrupt for auto-int 5
	bset.b		#2,($600001)		;Re-enable low memory protection
	move.w		#$2400,d0			;Enable <some> interrupts (load mask in d0)
	trap			#1

Just modify the number of the redirected interrupt ($74 = auto-int 5, each
int takes one longword) and the exit mask (Here: #$2400, should be in your
code right after the line you mention somewhere).


Niklas Brunlid - http://www.efd.lth.se/~e96nbr
PQF Quote follows:

There are *no* inconsistencies in the Discworld books; ocassionally, however,
there are alternate pasts.
        -- (Terry Pratchett, alt.fan.pratchett)


References: