Article View: comp.sys.amiga.tech
Article #11820Re: CBM, Why did you make it so hard?
From: Valentin Pepelea
Date: Wed, 15 Mar 1989 15:37
Date: Wed, 15 Mar 1989 15:37
57 lines
2768 bytes
2768 bytes
Glen Fullmer <fullmer@dover.uucp> wites in Message-ID: <913@dover.uucp>
> 1. Why didn't the developers of the C compilers agree on a common linkable
> format?
There is a common linkable object format, that is the one which Lattice C and
most assemblers use. Manx s Aztec C 4.0 apparently too will use the standard
format.
> 2. How does one make a generic package, like his graphics package, both
> reexecutable and reentrant? Does it require specific register allocation
> via assembler programming? Or is there an easier way? A different
> global hook that can be used to hang environments on?
This is as simple as specifying a switch on the command line for the Lattice
compiler. Basically, all data has to be allocated dynamically.
> 3. How does one restore the environment, for example, after an interrupt?
The CPU automatically saves the current context on the supervisor stack when
an interrupt occurs. To restore the context, exit the interrupt processing
routine with an RTE. (return from exception)
> 4. Is making a package that must retain context both over the life of a
> call and the life of the session different than "pure" residentable
> code? If so, how are they different, and what are the coding
> differences?
Yes. To retain the context over a call simply save to current registers on the
user stack with the MOVEM A2-A6/D2-D7,-(A7) instruction, and restore it upon
return from the call with a MOVEM (A7)+,A2-A6/D2-D7.
> 5. How did CBM do this for their libraries?
They used the Green Hills C compiler. All you have to do is use the Green
Lettuce C compiler.
> 6. Why isn't it simpler?
It can t possibly simpler than this!
> Granted, a lot of this is probably very naive for some of you guys, but
> where does one learn it? References?
Read your Lattice compiler manual, dammit. Other than that, get your hands
on the RKMs. The third edition if possible.
> Richard
Valentin
_________________________________________________________________________
"An operating system without Name: Valentin Pepelea
virtual memory is an operating Phone: (613) 233-1821
system without virtue." Bitnet: 451061@uottawa
Usenet: Look at the header
- Ancient Inca Proverb Planet: Ontario!Canada!Earth
Technical Details
Message-ID:
<8903151654.AA14174@jade.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UOTTAWA.BITNET!451061Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UOTTAWA.BITNET!451061 From: 451061@UOTTAWA.BITNET (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: CBM, Why did you make it so hard? Message-ID: <8903151654.AA14174@jade.berkeley.edu> Date: 15 Mar 89 15:37:17 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 57