[comp.sys.apple] MPW IIGS C more info..

MMPR004@ECNCDC.BITNET (Scott Hutinger) (09/26/89)

More information about MPWIIGS program bombing with what seems to be a
mangled stack from NoteOn:

APW filesize is 32k
jj   created without using MakeDirectIIGS : default 4k stack area
jj      B3   pdos    31K lvbspoimad  9/26/89  1:24 AM
jj2k created with MakeDirectIIGS $2000
jj2k    B3   pdos    35K lvbspoimad  9/26/89  1:25 AM
jj4k created with MakeDirectIIGS $4000
jj4k    B3   pdos    43K lvbspoimad  9/26/89  9:54 AM

Could it possibly be that start.obj needs to be converted to OMF 2?
for a dump of start.obj gives this:
Version     : $01  1

and where of course my newly compiled object file is
Version     : $02  2

I thought I read that version 1 OMF and version 2 OMF files could be mixed.

What is strange, is that the exact same source code will create a program that
runs fine with APW, but not with MPW IIGS.  I have also made sure all files
are current,and are in the correct directory.

Also, all the tool sets are read in the correct order etc.

One other possibility is that APW sets nil differently than MPW, for the
NSStartUp(150,nil);
#define nil 0x0L   is MPW's
#define nil  0L    is my APW's
But, the problem is not a call back, but the return from a function that
has NoteOn in it NoteOn.
extern pascal void NoteOn () inline(0x0B19,dispatcher);  // MPW's NoteOn
extern pascal void  NoteOn() inline(0x0B19, dispatcher); // APW's NoteOn

Looks basically the same to me.  Guess it would have to be IIGS C creating
bad code for the stack, or the mixing of OMF files, which really shouldn't
matter.  Now, if NoteOn was not defined as extern pascal I could see where
it would create some stack problems, but this is not the case.

scott hutinger     mmpr004@ecncdc.bitnet