Welcome, Guest. Please login or register.

Author Topic: Stupid question about if it's possible to link and create two separate executables  (Read 7023 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Quote
Let's face it, any raw memory handling for object memory will always involve some form of explicit/implicit pointer conversion.

Yes. No more miserable excuses. We're all grown men here, we can stand the truth. ;-)
 

Offline PiR

  • Full Member
  • ***
  • Join Date: Apr 2003
  • Posts: 148
    • Show all replies
Hi

I dig through all the documentation I could find and I give up.
Can anyone (yes, Piru, I'm talking to you...) be so kind and explain me, why in all examples with fakeSegList there is always '16' put in the 'size' field?
To be more curious - why there is anything at all, if you are not allowed to call UnloadSeg() for it anyway...

And one last related thing - what is the interpretation of this size in this DOS/BCPL world? Number of bytes/words/longs/doubles/lines/pages/magic_number_that_is_always_set_to_16_regardles_of_anything?

Code: [Select]

struct fakeseg
{
  ULONG size;
  BPTR  next;
  UWORD jmp;
  APTR  myfunc;
};


From my calculations sizeof( struct fakeseg ) = 14.
But hmmm... If I remember correctly BCPL uses only longs. So mayby sizeof() must always be multiplication of 4? So, to be precise it should be rather:

Code: [Select]

struct fakeseg
{
  ULONG size;
  BPTR  next;
  UWORD jmp;
  APTR  myfunc;
  UWORD _filler;
};


On the other hand if it's not used for anything, why to bother and initiate it at all?

Correct me if I'm wrong.

Thanks.