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

Re: [MiNT] what's wrong with this code?




I use this dirty trick:

Why?

		move.l	#set_ssp,$80.w			; install new trap

That is not supposed to work from user mode on Atari hardware. The bottom few kbyte (don't remember exactly, but at least past the system variables, so probably until $800 or so) are protected by the hardware.

You're doing this on a CT60, right? I guess it does something (remap low memory or similar) that makes this possible in the normal case.

		trap	#0				; switch to
							; supervisor

Perhaps you should take a look at Super(), Supexec(), and Setexc(), which have all been available since the very first TOS. The first one does almost exactly what you want (albeit with slightly more overhead). The last one would allow you to add your own Trap #0 handler safely (well, at least unless you have turned on maximum protection in MiNT).

With TOS, Magic, FreeMiNT it works ok. But to the moment I switch MP in FreeMiNT
on. Could someone tell me, what I do wrong? And why it appears just with MP?

MiNT with memory protection should set the MMU up to protect that memory no matter what the hardware does.

But it really "shouldn't" work in the other cases either. See above.

--
| Why are these | johan@klockars.net
|  .signatures  |
| so hard to do | http://www.klockars.net
|     well?     | (fVDI, MGIFv5, QLem)