Welcome, Guest. Please login or register.

Author Topic: execbase in assembler question  (Read 5082 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: execbase in assembler question
« on: May 02, 2011, 07:14:50 PM »
Remember that struct ExecBase is an extended library base. Therefore, it starts with an embedded struct Library. You have to add the (aligned, IIRC) size of that to your offset. In C terms, that's

Code: [Select]
struct ExecBase {
  struct Library LibNode;

  UWORD SoftVer;

  /* other fields... */

};

Look in your includes for exec/libraries.h to see that structure.
« Last Edit: May 02, 2011, 07:17:20 PM by Karlos »
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: execbase in assembler question
« Reply #1 on: May 03, 2011, 07:34:26 AM »
Wouldn't have been a very long label if it was a single char. Having said that, it was enough for Microsoft's drive enumeration scheme for years :lol:
int p; // A