Article View: comp.sys.atari.st
Article #28718Re: Mark Williams C: some findings...
From: S. User
Date: Mon, 12 Oct 1987 02:41
Date: Mon, 12 Oct 1987 02:41
26 lines
1287 bytes
1287 bytes
Well, the size isn't _really_ the compiler's fault. Just a different design methodology: the Megamax produces PC-relative code and the Mark Williams produces _real_ code. That is why there is the 32k limitation on Megamax programs. To use variables in MWC, pass them as parameters. Everything is passed as a long word. so func(v1,v2,v3,v4) char v1; short v2; int v3,v4; ends up like this on the stack: (sp) Return Address from the jsr 4(sp) v1 (use move.b 4(sp), d0 or equiv) 8(sp) v2 (use move.w 8(sp), d0 or equiv) 12(sp) v3 etc 16(sp) v4 etc If you use the link instruction (as in compiled C-code), then make sure you allow for the address it'll push onto the stack and the instructions effects. G. Onufer
Technical Details
Message-ID:
<607@uop.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!necntc!ames!ucbcad!zen!ucbvax!ucdavis!uop!rootReferences:
<879@sask.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!necntc!ames!ucbcad!zen!ucbvax!ucdavis!uop!root From: root@uop.UUCP (S. User) Newsgroups: comp.sys.atari.st Subject: Re: Mark Williams C: some findings... Message-ID: <607@uop.UUCP> Date: Sun, 11-Oct-87 22:41:15 EDT Article-I.D.: uop.607 Posted: Sun Oct 11 22:41:15 1987 Date-Received: Sat, 17-Oct-87 08:23:14 EDT References: <879@sask.UUCP> Organization: University of the Pacific, Stockton, CA Lines: 26 Summary: Read the manual