brianw@microsoft.UUCP (Brian Willoughby) (02/09/89)
<eat this?> After all the questions about a C compiler for the II, I thought I would mention the Orca/M Small C compiler which is available for their shell (which runs under ProDOS). Although it's not full C, the source to the compiler is included. And in C !. The compiler converts C source to Macro Assembly text which can be munged by Orca's Assembler. This Assembler supports 6502, 65C02, and 65C802 commands and will run on my home-built II Plus clone with a 65C802 installed. My other compiler is Aztec C. It produces too much object code and text output is terribly slow. The reason stems from the 6502's lack of a large stack. 256 bytes is not enough for a high level recursive language, so the Aztec compiler inserts code to copy the stack to a software stack of sufficient size. This, coupled with the 8-bit nature of the 6502, requires a lot of instructions to get anything useful done. Since I have been looking for a more efficient C compiler, but can't seem to find one, I started brainstorming. With the source for Small C, and an assembler which works with a 16-bit 65C802, it should be possible to rewrite the Assembler Macros that the compiler uses (this source is also included) to use the 65C802 instructions. Thus the processor could access a true 64K stack, not a software simulated stack. There would be many other benefits such as faster manipulation of 16-bit data and smaller code. Unfortunately, no product like this will come out since not many Apple II owners have the 65C802 plugged into their board, and any 16-bit C compilers will probably be GS specific (not available to me!). { By the way, JameCo Electronics has the 65C802-4MHz for $15.95 at 1355 Shoreway Road, Belmont, CA 94002 (415) 592-8097, and it works on my clone motherboard with all software because it powers up in 6502 emulation mode! It also works with the standard TransWarp accelerator from Applied Engineering. I swapped out the 65C02 and found that AE even wrote boot code to recognise a 16-bit processor!. This gives you a 3.58MHz 16-bit machine which is totally compatible! } END PLUGs; My proposal is this: The only way to get a non-GS Apple II 16-bit compiler is to write it! Inspired by Richard M. Stallman's free GNU software spirit, this is possible. If the source for full C were available, then a 16-bit compiler could be written using the Orca/M environment. The lack of DOS 3.3 support could be ignored since ProDOS allows devices drivers and keeps a list of allocated memory. My problem... I have been doing a lot of 65C802 programming, and I could easily make the modifications to the assembly macros that Small C uses to build code, but I don't know how to get source to a full C compiler. Would any fellow Apple II owners out there like to get involved in a team project? The 65C802 is certainly affordable by any Apple owner who doesn't already have it. All I need is an interested person who understands compiler languages and perhaps has a C compiler source. Please respond by EMail to: microsoft!brianw or uw-beaver!microsoft!brianw This has nothing to do with my work at MicroSoft (The buggers don't even support the Apple II !. END DISCLAIMER;