[net.micro.mac] Bad Megamax bug if you use modaldial

bhyde@inmet.UUCP (02/13/86)

I believe that the Megamax problem described in this string applies
only to desk toys.  Megamax choose to dedicte register A4 to point
to the globals of the C program.  If you want to write a desk toy
which has vanilla C globals then they have to find a way to get A4
set up for you as you slip in and out of the toy.  No such problem
exists for more typical applications.    
  Demonstrating the problem is more difficult than just writting
a desk toy, you have to have the need time polling of the toy turning
on.
  There are a similar class of problems when you write menu def procs
or CDEFs, i.e. the A4 globals pointer will be "broken" and you can't
get to quickdraw's globals, such as: gray, screenBits, etc.  In the
other more unusual CODE resources Megamax makes no particular attempt
to support globals.
  I'd be interested if anybody knows exactly why they couldn't arrange
to get the globals accessed of A5?
	- ben hyde, cambridge.

brad@gcc-milo.ARPA (Brad Parker) (02/15/86)

In article <26700052@inmet.UUCP> bhyde@inmet.UUCP writes:
>...  If you want to write a desk toy
>which has vanilla C globals then they have to find a way to get A4
>set up for you as you slip in and out of the toy.  No such problem
>exists for more typical applications.    
>	- ben hyde, cambridge.

The MegaMax DA wrap "ACC()" calls routines which set up and tear down
A4 automagically. You really don't have to worry about it in a DA (as long
as you don't use "needtime").

-- 

J Bradford Parker
General Computer (HyperDrive Beach)
harvard!gcc-milo!brad

"She said, 'Just drive.'" -heard on the radio.