🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Manx 5.0d vs Libraries (Was: Lattice vs. Aztec C what of it?)

#7615
From: Michael Jansson
Date: Fri, 21 Dec 1990 13:08
39 lines
2592 bytes
I have been working a bit with amiga libraries and manx 5.0[a,d]
and have had little success so far.

When I used 5.0a I never managed to compile a library that worked unless I
added the optimizer flag (-so). This is a real pain because that made it
close to impossible to debug the libraries with sdb. I think the compiler
was generating 'link a5,?' when it shouldn't which was 'optimized' out
with the -so flag. Another 'feature' is that the function in the libraries
must be declared with prototypes and pragmas or else it won't find the
library base and possible other global data (It seems like the compiler
will 'magically' bind the library-base variable to a6 instead of just
allocating some stack space for the base variable).

I tried to recompile the libraries with 5.0d, which I got last week on
disk and managed to do some meditation. I copied the the res_lib from 5.0a
and compiled that with the same result.  I compiled the
'open/close/expunge' function with the '-a' flag an started to look at the
assembly code that the compiler had generated. I found out that the
compiler generates a 'move.l (sp)+,a4' when it shouldn't. It will trash a4
and it will trash the stack! The library worked after I removed these
lines.

These odities can be found when the functions are declared as library
functions, i.e. prototyped and pragmaed. I guess the compiler works great
when it compiles 'ordinary' functions, but it sure don't when it comes to
library functions.

CONCLUSION: Manx 5.0[a,d] are NOT stable enough to create amiga libraries.

HAS ANYBODY MANAGED TO COMPILE AN AMIGA LIBRARY WITH MANX 5.0D???????

(I guess I'm still hoping that somebody will tell me that I made a silly
misstake ;-)
--
##########################################################
#   Michael Jansson             |   \_/
#   Internet: mij@IDA.LIU.SE    |    V                   _|_
#   UUCP: uunet!liuida!mij      |    |    Absolut Software|
#   BITNET: mij@SELIUIDA        |   ~~~  
Technical Details
Message-ID: <1990Dec21.130830.18145@ida.liu.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!rochester!kodak!uupsi!sunic!liuida!micja
References: <9012161351.42.13@INSIDER> <7322@sugar.hackercorp.com> <1990Dec20.231335.14446@csun.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!udel!rochester!kodak!uupsi!sunic!liuida!micja
From: micja@IDA.LiU.SE (Michael Jansson)
Newsgroups: comp.sys.amiga.tech
Subject: Manx 5.0d vs Libraries (Was: Lattice vs. Aztec C what of it?)
Message-ID: <1990Dec21.130830.18145@ida.liu.se>
Date: 21 Dec 90 13:08:30 GMT
References: <9012161351.42.13@INSIDER> <7322@sugar.hackercorp.com> <1990Dec20.231335.14446@csun.edu>
Sender: news@ida.liu.se (News Subsystem)
Distribution: comp
Organization: CIS Dept, Univ of Linkoping, Sweden
Lines: 39