dcw@icdoc.UUCP (06/19/87)
In article <8706131307.AA08935@ucbvax.Berkeley.EDU>, HAHN_K@DMRHRZ11.BITNET writes: > >I've got a question (to be read: a FEW questions) concerning Beckemeyer's >micro-RTX. The problem with my (old) version is that it doesn't support >Lattice-C. That means, it comes with a RTXBIND.S file, that would serve as >the binding file for a linker, but as it is for the DRI assembler, I tried >to convert it to my Metacomco, which wasn't so complicated after all... >Nevertheless, I got bad results; the assembled *.bin file and the RTXBIND.H >joined with the supplied QDEMO.C wouldn't work. The linker doesn't find the >'extern char *_base', that's needed. What now is the way to get the whole >(damned) thing to work under Metacomco/Lattice? >EVERY comment/help appreciated. > >-- Klaus Hahn. This is the second request in a couple of days for information about accessing the basepage in Lattice C. There was also <1992@ihuxy.ATT.COM> from Jerry Nowlin : >I've poked around all over the place below the main() entry point in >Lattice programs and can't locate the basepage. Megamax and Alcyon give >you an extern _base that's all you need. Lattice provides no such >variable. In fact basepage and environment aren't even in the index for >their manual. Can anyone help me out? I actually broke down and called >their support phone number, which has now been changed to Bristol England, >and the person answering the phone basically told me to write a letter if I >had any questions. I'm hoping the net will work faster. I replied to Jerry's mesg by e-mail but will now quote my reply: >Well, I haven't tried any of this, not knowing anything about the basepage >format... but I have in front of me June 1987's ST World [ST User, renamed] >which has on pages 85-89 a program written in Lattice C 3.03.04 which >inserts interrupt handlers into the vbi queue. It contains the following >piece of code : > > extern long _32k; > > long *basepage = (long *) (((long) & _32k) - 0x8100); > >and the explanation: > > to calculate the address of the basepage, the Lattice global > _32k is used, the address of which is $8100 above the basepage. > >it all looks rather cryptic... but still.. it might work.. I hope that a). this is accurate [I haven't tried it] & that b). it will help. [I guess you just use basepage instead of _base] Duncan White. ----------------------------------------------------------------------------- JANET address : dcw@uk.ac.ic.doc| Snail Mail : Duncan White, --------------------------------| Dept of Computing, This space intentionally | Imperial College, left blank...... | 180 Queen's Gate, (paradoxical excerpt from | South Kensington, IBM manuals) | London SW7 ---------------------------------------------------------------------------- Tel: UK 01-589-5111 x 4982/4991 ----------------------------------------------------------------------------
pes@ux63.bath.ac.uk (Paul Smee) (06/22/87)
It appears from the GEMSTART source that Lattice C (at least 3.04) puts the basepage address into an xternal variable named _pbase ; give it a try...
pes@ux63.bath.ac.uk (Paul Smee) (06/22/87)
Sorry if this shows up twice, not sure I got the distribution right. Lattice C (version 3.04) seems to pdefine a variable _pbase in the GEMSTART module, which appears to be used to hold the basepage address.