From: | Colin Wenzel |
Date: | 16 Jul 2000 at 06:37:25 |
Subject: | Re: I am going OO nuts !!! |
On 16-Jul-00, Allan Odgaard wrote:
> On 15-Jul-00, Colin Wenzel wrote:
>> MUI_MakeObject() as it appears not to be in mui.lib.
> MUI_MakeObjectA() is in muimaster.library, but MUI_MakeObject() is
> the variable-length argument variant, which is normally just
> generated by the compiler.
I found the varargs stub in the archive, mui/Dlib/MakeObj.c file.
This resolved the first symbol ok...
Object *MUI_MakeObject(LONG type, ...)
{
return(MUI_MakeObjectA(type, (ULONG *)(((ULONG)&type)+4)));
}
My compiler will build the varargs version just fine, it is totally
ansi complient & handles all the new stuff ok, it just needs the info,
the # pragma entry, or this code shown above,
but I must be missing something from the MUI archive,
because I can only find this in an "inline" file from it.
Object *MUI_MakeObjectA( LONG type, ULONG *params)
{
BASE_EXT_DECL
register Object* res __asm("d0");
register struct Library* a6 __asm("a6") = BASE_NAME;
register LONG d0 __asm("d0")=type;
register ULONG* a0 __asm("a0")=params;
__asm volatile ("
jsr a6@(-0x78)"
: "=r" (res)
: "r" (a6), "r" (d0), "r" (a0)
: "d0", "d1", "a0", "a1" );
return res;
}
It's some sort of wierd inline half asm code that didn't get included
as a header file or a # pragma....
I managed to figure it out & built this out of it:
#asm
xref _MUIMasterBase
public _MUI_MakeObjectA
_MUI_MakeObjectA:
MOVE.L _MUIMasterBase,a6
MOVE.L 4(sp),d0
LEA 8(sp),a0
JSR -$78(A6)
RTS
#endasm
That fixed the missing reference...
However, I would be interested in finding out exactly where
your compiler gets to know about MUIMakeObjectA()
because it is not in the mui.lib I have, or in any header files
that were included.
My mui.lib = 2304 bytes, in the archive "mui38dev.lha"
at path: MUI/developer/C/Manx/mui.lib
> The code I posted (for DoMethod() and MUI_MakeObject()) should
> function as stubs, so simply add these two functions to your source,
> and your program should compile!
> It's not ideal, because they rely on parameters being passed on the
> stack (which they are) and as said,
> your compiler should be able to do it, but I don't know Aztec...
There is really nothing much to know,
it's just like lattice-C compiler.
> I don't understand why you don't just change compiler,
Because if I change compiler at the same time I am trying new
stuff, I get into the situation of not knowing where the fault is,
and have no way of resolving problems.
As it is now, the files I have would not compile anyway,
because I am obviously missing something,
but I don't know exactly what. (header file / pragma ?)
However, with the missing bits, I CAN make my own
stubs & things to get around the problem,
because I know quite well how mine works..
> because during startup you don't want to struggle with
> problems caused by an outdated compiler --
> when you master C, AmigaOS, OOP etc. then you
> can go back and fight these problems... ;-)
I seriously have to disagree with you here, the biggest
problems so far have been attempts at changing compilers.
1) I bought the dev cd-3.5 to try StormC-v3,
however, they WONT supply docs with it & I couldn't even
get a "simple" calculator program to compile without getting
error messages that require a user manual to resolve.
2) I downloaded the "Dice" compiler, after spending
days getting it set up, it wouldn't compile programs without them
randomly crashing or causing bad references in the exe,
it was no longer supported & doesn't handle pragmas either,
so that was a fizzer....
3) I downloaded a million archives for gcc,
eventually, I managed to figure out a quarter of what I have,
but everything I try to compile keeps telling me I have
some error with ....ix...... , I still havn't had a spare year
to wade through that pile.....
4) I was going to buy Hisoft-C, but several people have told me that
it doesn't support some things I need in it & is generally flakey to use.
So that stoped that happening...
5) I obtained v6.5 of SAS-C as well as having user manuals, last week.
I have "installed" everything, but have not read the books yet.
When I have some time, I will give it a good going over.
As far as I can see, for now, it looks like the best chance I
have to get a newer usable compiler..
Even though it is only 2 years older than my Aztec 5.2...
So, if you have any suggestions, I would really like to hear them....
Regards
Colin Wenzel. Australia.
EMAIL: colstv@hotkey.net.au
URL: http://www.hotkey.net.au/~colstv/
ICQ: 17608330
AMIGA: 4000T, 68060/50, 150Mb RAM,
OS 3.5, Spectrum Gfx Card.
_________________________________________
------------------------------------------------------------------------
It's the End Of The Line for My Shipping Broker.
http://click.egroups.com/1/5175/1/_/451227/_/963726323/
------------------------------------------------------------------------