Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!COGSCI.BERKELEY.EDU!bryce From: bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: Re: Re: Astartup.obj Message-ID: <8707291127.AA05266@cogsci.berkeley.edu> Date: Wed, 29-Jul-87 07:27:45 EDT Article-I.D.: cogsci.8707291127.AA05266 Posted: Wed Jul 29 07:27:45 1987 Date-Received: Fri, 31-Jul-87 02:25:47 EDT References: <8707251238.AA03602@cogsci.berkeley.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: Institute of Cognitive Studies, UC Berkeley Lines: 46 In article <> scotty@l5comp.UUCP (Scott Turner) typed: In article <> bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) writes: > >> [Astartup.obj is buggy] >> Did I miss an upgrade? Or did everyone switch to Aztec? :-) > > How about option 3? Tossed the C compiler and went straight to assembly? :) Of course you realize that this is what I do. I consider 68000 my primary working language. However, survey SAYS... most people switched to Aztec. > As for the parameters being passed from workbench. How many programs have you > ever seen that ran from the workbench and insisted on having piles of order > dependent parameters fed to them? You missed the point. By about three hundred kilobytes. Astartup.obj passes two things to _main, argc and argv. From the CLI argc is always at least 1, and counts the number of typed paramters. argv is a "vector" (pointer) to the array of pointers that contains the args. argv[0] is the program name, argv[1] is the first paramter, etc. When started from Workbench argc will be set to be 0, and argv will be the pointer to the Workbench message. The old Astartup.obj pushed those two on the stack in the WRONG order. Any C program that uses the Workbench message or wants to know if it was started from the CLI or Workbench needs a "pile" of those two parameters, preferrably in the proper order. TRIVA: The ReportMouse() function also screws up the order of it's own parameters. This was not fixed in V1.2 because people got it to work by switching the order of the parameters. Aztec went as far as doing this for you. For us 68000 programmers the boolean must be passed in A0, and the pointer in D0. (or just EOR the proper bit in one instruction, and forget ReportMouse().) BTW: I am told that there was an update to Astartup.obj posted the net. I never saw this, and could not find it at the j.cc.purdue.EDU archives. It matters little since I re-wrote it anyway... ----------------------------- |\ /| . Ack! (NAK, EOT, SOH) {o O} . ( " ) bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce U "Be careful about reading health books. You may die of a miss-print" -Mark Twain