🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7102

Re: Lattice C : pragma? Whats all this then?

#7102
From: Matthew Dillon
Date: Tue, 27 Nov 1990 22:10
37 lines
1933 bytes
In article <CM|^9R|@uzi-9mm.fulcrum.bt.co.uk> sie@fulcrum.bt.co.uk (Simon Raybould) writes:
>In article <26892.273fe53b@kuhub.cc.ukans.edu> markv@kuhub.cc.ukans.edu writes:
>>Lattice defines several bases in their libraries including DosBase,
>>SysBase, MathBase, GfxBase, IntuitionBase, etc.  DosBase and SysBase
>						   ^^^^^^^
>>are always valid (the OS gives these to a program when it runs).  The
>
>The OS doesn't open the Dos library, surely thats done by the startup code
>LIB:c.o in the case of Lattice ?

    The only thing the OS gives to the executable when it starts it up
    is a pointer to the argument line and the length of that line, in
    registers.

    The startup code must retrieve SysBase (move.l 4.W,_SysBase), DOSBase
    (by using OpenLibrary("dos.library",0)), and everything else.

    Different compilers will open different things when you use the _main()
    entry point instead of the normal main() (unfortunately).

    Writing your own startup module can be dangerous, different compilers
    expect different things to be set up.  Try to avoid writing your own
    startup module whenever possible.

>If you don't link in the startup code then you have to set DosBase yourself!
>
>SJR

					-Matt

--


    Matthew Dillon	    dillon@Overload.Berkeley.CA.US
    891 Regal Rd.	    uunet.uu.net!overload!dillon
    Berkeley, Ca. 94708
    USA
Technical Details
Message-ID: <dillon.7388@overload.Berkeley.CA.US>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!overload!dillon
References: <1990Nov10.001056.9736@canterbury.ac.nz> <63@oregon.oacis.org> <26892.273fe53b@kuhub.cc.ukans.edu> <CM|^9R|@uzi-9mm.fulcrum.bt.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!overload!dillon
From: dillon@overload.Berkeley.CA.US (Matthew Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re:  Lattice C : pragma? Whats all this then?
Message-ID: <dillon.7388@overload.Berkeley.CA.US>
Date: 27 Nov 90 22:10:40 GMT
References: <1990Nov10.001056.9736@canterbury.ac.nz> <63@oregon.oacis.org> <26892.273fe53b@kuhub.cc.ukans.edu> <CM|^9R|@uzi-9mm.fulcrum.bt.co.uk>
Lines: 37