[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ideas about GS Programming from Dr. Tom



Cturley2 <cturley2@aol.com> wrote:

> Can ORCA/C code be converted to Apple II and Apple IIgs assembly code?
> 
> One of the two following words will do for an answer: Either YES or NO!

Well, it isn't that simple.  Exactly what do you mean?

By "assembly code", I am assuming you mean assembly language source.

The ORCA/C compiler translates C source code to 65816 machine code,
specifically in the form of a IIgs Object Module Format object file.
After linking, this become a GS/OS application or similar file type
containing code that can be handled by the GS/OS System Loader.

The compiler has no facility to directly generate assembly language
source.  You could take the object file produced by the compiler and run
it through a disassembler (e.g. ORCA/Disassembler) to produce assembly
source, probably requiring a fair amount of work to make it fully
editable (this is much easier if you disassemble the object file,
compared to disassembling the executable file).

"Apple II and Apple IIgs" is rather ambiguous.  Are you asking whether
ORCA/C is able to generate code that will run on an 8-bit Apple II as
well as the IIgs?  If so, the answer is NO.  The output code will only
work on a IIgs, and then only under GS/OS (or ProDOS-16).


If you want to be able to compile a C program which will work on any
Apple II, you need to use an 8-bit compiler such as Aztec C or HyperC
(with associated major banging of head against brick wall if you are
trying to do a large project).

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand