Xref: utzoo comp.sys.amiga:21686 comp.sys.amiga.tech:1460 Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!ucsd!ames!oliveb!amiga!cbmvax!carolyn From: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Astartup.obj and Lstartup.obj Message-ID: <4469@cbmvax.UUCP> Date: 11 Aug 88 01:15:51 GMT References: <6562@bloom-beacon.MIT.EDU> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Organization: Commodore Technology, West Chester, PA Lines: 75 In article <6562@bloom-beacon.MIT.EDU> rlcarr@athena.mit.edu (Rich Carreiro) writes: >I have asked this previously and got a rather patronizing letter from >someone telling me to read the manual. I looked at the manual for the nth time >and couldn't find the info - so I ask again: > >How do Astartup.obj and Lstartup.obj map into Lattice 4.0? I assume >that Lstartup.obj is now Lattice's c.o. What of Lstartup.obj? When we sold Amiga C (aka Lattice 3.03), we provided two startups - LStartup.obj and Astartup.obj. When Lattice sells Lattice, they currently provide only the LStartup.obj but they call it "c.o". LStartup.obj (aka c.o) does the following: - Normal startup stuff like command line parsing and handling of Workbench startup msg and passing of WBenchMsg to application - Sets up Lattice filehandles for Lattice stdio (causing much of the LC.lib IO stuff to be linked to your code) - Opens a small window for output on Workbench startup (unless you take special steps) - Sets up some variables needed by LC.lib rtns and Lattice stack checking code When using LStartup.obj, you generally - #include(and maybe other lattice headers) - don't need to -v on LC2 - Link Lstartup.obj your.o ... LIBRARY LC.lib, Amiga.lib (causing all std and file IO calls to be satisfied by LC.lib since these want Lattice filehandles, and just Amiga system calls to be satisfied by Amiga.lib stubs) AStartup.obj does the following: - Normal startup stuff like command line parsing and handling of Workbench startup msg and passing of WBenchMsg to application - Sets up Amiga filehandles for Amiga stdio (which consists of a limited printf, getchar, etc. in Amiga.lib - these functions are described in the AW RKM Exec) When using AStartup.obj, you generally - Do NOT #include (or other lattice headers) - Must use -v on LC2 to disable Lattice's insertion of stack check code - Link Astartup.obj your.o ... LIBRARY Amiga.lib,LC.lib, Amiga.lib (limiting you to the stdio and file io "C" functions in Amiga.lib - these functions want Amiga (Open(...)) filehandles - and generally limiting your use of LC.lib functions to non-Lattice-specific functions such as string functions and non-power-of-two-math.) You might ask "Well, why would I WANT to use Astartup.obj ?" If you have a pretty Amiga-specific 32-bit program, and don't need (or can't use) all of the Lattice stuff, you can usually reduce the size of your program this way, sometimes significantly. Astartup.obj is the startup used by most of the C and Assembler programs provided on Workbench, Extras, etc. It is the startup used on the OS guy's Suns with the Greenhill's compiler. It's the startup and way of writing/linking I use when working native to write Greenhill's compatible Amiga-specific (rather than compiler-specific) code for inclusion on Workbench and Extras. (They need to be able to remake the whole system, including all of the programs on Workbench and Extras) If you see an example in the Amiga manuals (except for a couple of Lstartup ones I wrote) you can be sure it was written using Astartup.obj, Amiga.lib printf and file IO, etc. (Note - I wrote the Lstartup ones when Amiga C was the only C compiler for the Amiga, and it was sold by us.) -- ========================================================================== Carolyn Scheppner -- CATS Commodore Amiga Technical Support PHONE 215-431-9180 UUCP ...{uunet,allegra,rutgers}!cbmvax!carolyn "Under the multitasking operating system, the trackdisk.device is the defied interface..." - Bryce ==========================================================================