[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need some help on traps...
- To: info-macl@cambridge.apple.com
- Subject: Need some help on traps...
- From: DOYLE@SISU
- Date: Fri, 7 Feb 1992 13:45 EST
Greetings!
I'm having some trouble with calling traps which change the addressing mode
from 32 to 24 bit (and vice versa). I know how to do this in C, but I have two
confusions about calling these routines (and some traps in general) from MCL2.0.
Perhaps the answer (for me) is RTFM, but I tried and am still befuddled.
Confusion #1:
Why is getmmumode commented out in OSUTILS.lisp? (There
are a number of routines which are commented out which mention
'Not in ROM'. Shouldn't it be transparent to the calling program
whether or not the trap is in ROM or not?
Confusion #2:
How can I invoke SwapMMUMode? In C it would be something like:
char mode;
mode = true32b;
SwapMMUMode(&mode);
The OSUTILS.lisp trap definition is:
(deftrap _swapmmumode ((mode (:pointer :signed-byte)))
nil
(:register-trap #xA05D :d0 mode))
... so I tried calling it by entering
(defun set-32bit-mode()
(%stack-block((mode 1))
(%put-byte mode #$true32b)
(#_SwapMMUmode mode)
(%get-byte mode)))
...but this returns an error saying that the argument #<A Mac Non-Zone Pointer..>
is not of the required type.
I'm sure I just don't know how to call this type of trap...
In case you're wondering... I'm using this to access pixel data which is at a
NuBus address.
Thanks!
Sean Doyle
Massachusetts General Hospital