[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: Amgia Vim 6.3
From:       Ali Akcaagac <aliakc () web ! de>
Date:       2004-06-27 19:45:04
Message-ID: 1088365504.468.20.camel () localhost
[Download RAW message or body]

On Sun, 2004-06-27 at 21:14 +0200, Bram Moolenaar wrote:
> I only care about the real Amiga OS myself. I don't produce an
> executable for anything else, thus I am not going to work on that
> anyway.

My same explaination is also valid for the 'real' AmigaOS. Things like
ixemul and libnix are invented on AmigaOS (please refer to geekgadget)
on: http://www.geekgadgets.org/

It cleary is where the Amiga has moved over the years which has been
settled on and which is now being adopted on even AmigaOS4, MorphOS and
AROS.

> It appears the answer is that the amount of stack can only be changed by
> recompiling, unless we change something in the startup code.

No, this is not really the case. You can change the stack in the ways I
described it which are the actual common and correct way to do it.

> It's not clear to me what "custom startuproutines" means.

There are different startup routines for Executables. With that I mean
the way how your compiler and linker connects the stuff together and
have it jump to main(); Main is no real address to jump to when the code
gets executed with the processor main(); is just a synonym for the
compiler and linker to say:

"please add the startup code to the final generated binary and have the
startup code refer to the main(); function which the programmer
described to be the start of the program"

The final executable totally differs from hunk and other stuff the
compiler and linker has added there. It can be an ELF fileformat, it can
be a WarpOS fileformat, it can be a native AmigaOS fileformat or even
an .aout fileformat. When you use say Dice then it might add a different
startupcode to your final executable than e.g. the SAS/C compiler, the
GCC compiler again creates a different startupcode which gets added to
your final executable. It depends clearly on the implementation. You can
also write your own custom startupcode which is some type of object
which for example put all dataregisters and addressregisters onto the
stack, which allocates stackspace, which maybe jumps into some other
areas and then jump to main();

So basicly every compiler you find on your 'real' Amiga does the
startuphandling differently, every compiler for the 'real' Amiga has
different libraries, different ABI and different whatever. They all do
follow some sort of C Standards such as C8x or C9x which offers you an
identical API but the internals are differently and depend on
implementation. A lot of the C compilers also offer standard lib C
functions such as strcpy, memcpy, printf etc. without these you wouldn't
be able to compile anything on the Amiga and VIM is full of standard C
calls. The compiler and linker package offers such a bridge, that
bridges these functioncalls with own functions or for speed relevance
wraps these calls to native Amiga API which is entirely different.

Over the years we had different such libc implementations, different
hunk formats, different fileformats etc. and they started to cause a big
pain in the ass thus why people started to work towards some correct
implementations such as ixemul and libnix.

ixemul is an BSD environment running ontop of the AmigaOS (it's basicly
a ixemul.library) and the stubs and librarycalls are similar to libc
that's why it's so easy for us to compile VIM because we have more or
less a similar API as found on BSD or Linux.

libnix is more or less something similar but no environment it mostly
follows the Amiga specifications which also wraps a lot of the functions
to native Amiga API for speed issues.

Basicly you can say:

what DICE compiler and DICE's own libC implementation is, is the same
for SAS/C with it's own libC implementation, is the same like Storm/C
own libC implementation. These and other compilers offer a different
internal structure, startupcode and whatever but offers the same API to
program with.

Today we moved forward to use ixemul AND libnix on the 'real' Amiga.
ixemul to better port Linux/BSD stuff to our architecture and libnix for
own Amiga stuff with conventient routines. Nonetheless we can also avoid
using either of them by providing our own custom stuff.

By the way the same is valid on every architecture existing and is NOT
limited to AmigaOS. It also is a valid argumentation on Linux, BSD,
Windows, BeOS, MacOSX and so on.

greetings,

Ali Akcaagac


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic