Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!kougiour From: kougiour@m.cs.uiuc.edu Newsgroups: comp.sys.mac.hypercard Subject: Can XCMDs change the MMU mode? Message-ID: <39800005@m.cs.uiuc.edu> Date: 7 Nov 89 01:40:46 GMT Lines: 16 Nf-ID: #N:m.cs.uiuc.edu:39800005:000:726 Nf-From: m.cs.uiuc.edu!kougiour Nov 6 18:54:00 1989 I have written a very simple XCMD for the hypertalk. Its purpose is to reset a card located in one of the Mac II slots. This is done very simply by writting a zero into an address located at the card's address space. The routne is written in MPW C 3.0. Since I cannot access this address when the MAC II operates in 24 bits mode I SwapMMUMode() to 32 bits before the operation and then back to 24 bits. The routine works ok as a seperate application but when I used it as an XCMD the hypercard crashes: "Hypercard quits unexpectedtly (28)". By commenting part of the code I discovered that the crash happens somewhwere around the first SwapMMUMode call. Does anybody has an idea what happens and how I can recover? Thanks