brian@ut-sally.UUCP (Brian H. Powell) (05/25/85)
Okay, I asked this several months ago and got no response. Now *I* need to use the information, not my friend, who needed the information before. Has anybody perfected the task of writing pure assembly language code for the Macintosh using the Lisa's assembler? (pure = not declaring all of your variables in Pascal and passing their address(es) to an assembly routine.) For those of you without Lisa's, the problem is that the assembler only believes in the program space. ***FLAME ON*** The Pascal compiler is the only program endowed with knowledge of the data space. ***FLAME OFF*** Apple recommends (in "Putting together a Macintosh Application") having a dummy Pascal program declare an array of however many words you need and passing the address of it to your assembly routine. So how have you other people solved this problem? What we need is MDS-XL. I think the MDS is excellent (except for the "Code Optimization", but that's another flame.) Brian H. Powell brian@ut-sally.{ARPA,UUCP} U.S. Mail: Southwestern Bell P.O. Box 5899 451-0739 Austin, TX 78763 AT&T (512) 451-0739
brad@gcc-bill.ARPA (Brad Parker) (05/30/85)
In article <2003@ut-sally.UUCP> brian@ut-sally.UUCP (Brian H. Powell) writes: > Has anybody perfected the task of writing pure assembly language >code for the Macintosh using the Lisa's assembler? (pure = not declaring >all of your variables in Pascal and passing their address(es) to an assembly >routine.) For those of you without Lisa's, the problem is that the assembler >only believes in the program space. The Pascal compiler is the only program >endowed with knowledge of the data space. >Brian H. Powell brian@ut-sally.{ARPA,UUCP} Once I discovered the ".main <module name>" directive, generating pure assembly mac applications worked for me. I just declare variables as .word, .long, .byte or whatever and do a "lea var, a0" or similar to get it's address. This is foolish but it works. Pascal seems to reference all of it's globals off a stack frame pointed to by a5. This is not a bad strategy to adopt and certainly faster that the "lea" method. All in all, I'd switch to the MDS. -- J Bradford Parker uucp: seismo!harvard!gcc-bill!brad "She said you know how to spell AUDACIOUSLY? I could tell I was in love... You want to go to heaven? or would you rather not be saved?" - Lloyd Coal