icky C code

Chris Gray cg at myrias.UUCP
Fri Aug 1 02:25:33 AEST 1986


Jon Loeliger at Purdue writes that he needs to decide whether address results
on a 68000 compiler should be in A0 or D0. Unfortunately, the best answer is
probably obtained by looking at any code that you have to interface to - what
does it do? I ran into the exact same problem while porting my Draco compiler
to the Amiga. I planned to return address values in A0, so that they could
be used directly if that's all the code called for. All of the AmigaDos and
Kernal routines return all results in D0 however. This left me with three
choices: have interface stubs move the result to A0; require very strange
declarations and type cheating for the supplied routines; or have the compiler
return pointers in D0 as well. For now I've chosen the third alternative, but
I may eventually go back to the first.

			Chris Gray (..ihnp4!alberta!myrias!cg)



More information about the Comp.lang.c mailing list