C (140/414)

From:Allan Odgaard
Date:08 Jun 2000 at 19:55:54
Subject:Re: Off topic, and libraries :)

On 08-Jun-00, Gürer Özen wrote:

> I read their newsletter and found following:
> 1. Their VP is little endian :)

Yes, I noticed this too, which made me think they are complete braindead as
almost any format (except GIF) is stored in big endian format, so it'll add a
lot of overhead to image decoders etc. Maybe they choose it because they only
have pentium in mind, but they should still have added a 'big endian load' or
similar, as modern hardware offers the conversion at no cost (or one cycle),
but this can't really be achieved with the VP code, can it? Here one will need
many instructions for the byte-shifting...

> 2. VP code looks like something between asm and C

Which is why I wonder why anyone would code directly in VP. High level
languages of today offers quite a lot of features which make it easy to do
very rapid development, and they still composee quite efficient code (at least
they should be able to do so)

> 3. It won't have memory protection (say bye bye to server market)

It won't??? seems like my fears was justified when I thought "game developers
shouldn't do kernals" when Amiga proudly announced that the Tao founder was an
old Amiga game programmer -- no offence to game developers, but writing an OS
kernal and a killer game is two very different things, I respect both skills
and I know many game developers doesn't think like in the demo-days, but
seeing an OS promoting virtual assembler and little eendian, then I think my
prejudices are justifed ;-)

> Is it possible to use shared objects with amigaos? I'm trying to port a

Like boopsi? :-)

> library (written in ansi c) to amigaos. It works well if it is compiled
> as a sas/c .lib file or a normal executable. But crashes everytime when
> compiled as an amigaos library. [...]

The minute you load, open or use the library?

A link library may add fields to the data segment of the program and use these.
If the library you port do this then it isn't really re-entrant. But StormC
can avoid this by linking "A6 near" (IIRC) this means all globals are put in
the library base and this base is cloned for each client of the lib. Maybe
SAS/C has a similar feature? Even though it doesn't sound like it's what's
causing the crash...

> Maybe it is possible to link objects via symbol names dynamically
> with a LoadSeg() patch, or something like that? [...]

I know it's a quite bold statement, but I'd argue that any link library can be
converted into a shared library. At least if each user gets his own copy of
the library base.

Regards Allan