On Mon, 11 Aug 2003 18:54:47 +0200, Thierry Godefroy wrote: > On Mon, 11 Aug 2003 15:53:23 +0100, P Witte wrote: > > > > > > > ----- Original Message ----- > > From: "Thierry Godefroy" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, August 11, 2003 12:33 AM > > Subject: Re: [ql-users] Machine Code Extension > > > > > > > > > > On Sat, 9 Aug 2003 06:20:20 EDT, [EMAIL PROTECTED] wrote: > > > > > > > Hmm - one of my old machine code extensions reports an error on QL2K > > (oddly > > > > enough, it reports Channel Not Open when I use d$=SAV_DEV$). > > > > Possibly an RI stack problem in another (nearby) keyword is causing this. > > > > <> > > > > * Def SB extensions > > > > Lab1000A dc.w 0 > > > > dc.w 0 > > > > dc.w 2 > > > > dc.w lab1001e-* > > > > dc.b 8 > > > > dc.b 'SAV_DEV$' > > > > dc.b 0 > > > > dc.w 0 > > > > * End SB ext > > > > > > That last 'dc.b 0' should be removed, although it will not make a > > > difference here given their is no more function name after that one > > > and that the following bytes are 0 as well... > > > The number of bytes in the name table must be kept even: as > > > SAV_DEV$ counts 8 bytes, you don't need for a padding null byte. > > > > The padding byte needs to be there: Nametable name strings all have byte > > sized length counters. > > I'm sorry, but you're plain wrong here... > > Thierry.
I see where is the confusion: by name table, I meant "definition table", you _must_ keep the name of each function/procedure even, padding it with a null byte _if_and_only_if_ the length of the name of the PROC/FN is odd... The SB.INIPR then takes care to copy the name of each function in the S*BASIC name table, which is actually byte sized. But if you fail to pad properly the names in the definition table used by SB.INIPR, it will point on the bad offset on for the next PROC/FN... Thierry.
