After much frustration and headaches I got CC65 (C compiler for 6502 systems, including apple II) up and running. I set up a batch file with the commands to compile, assemble, link, and then store the object code on a DSK image. It is a nice way to write Apple II code! Maybe this CC65 will work on PCtransporter? Is there a way to access HGR, HPLOT,HCOLOR from within a C program? I am also curious about XDRAW, LOAD, SAVE, OPEN, READ, WRITE. Is there a document somewhere in which I can read about this stuff? I see references to Apple I/O in Apple2.o file in CC65 /include directory. Rich aiiadict AT hotmail DOT com http://rich12345.tripod.com On 3 Sep 2003 19:55:20 -0700, aiiadict@hotmail.com (Rich J.) wrote: >After much frustration and headaches I got CC65 (C compiler for 6502 >systems, including apple II) up and running. > >I set up a batch file with the commands to compile, assemble, link, >and then store the object code on a DSK image. It is a nice way to >write Apple II code! Maybe this CC65 will work on PCtransporter? > >Is there a way to access HGR, HPLOT,HCOLOR from within a C program? I >am also curious about XDRAW, LOAD, SAVE, OPEN, READ, WRITE. Is there >a document somewhere in which I can read about this stuff? I see >references to Apple I/O in Apple2.o file in CC65 /include directory. > >Rich >aiiadict AT hotmail DOT com >http://rich12345.tripod.com Hiya, Yes, you can access those functions. If you are writing under DOS 3.3, I am not sure exactly (yet) how to access (easily) the LOAD, SAVE, OPEN, READ, WRITE functions. Under ProDOS, use the MLI interface. I plan on writing a library for ProDOS file I/O using the MLI calls. As for the other functions, what you really should do is find a good source for technical information on the Apple //e. For example, the Apple //e Technical Reference Manual. Though not easy to find, a lot of the information in the Apple //c (Yes, "C" not "E") 2nd Edition is still very applicable, and you can get a copy from www.A2Central.com Knowing the Monitor entry points for various functions is pretty important. Actually, I'm looking at my //c Tech Ref Manual, 2nd Edition, and I don't see any of the firmware entry points for Hi-Res graphics. Seems to only list the Lo-Res routines. Hmm.. Well, the following examples I figured out from looking in the book "Apple Graphics & Arcade Game Design" by Jeffrey Stanton. Hope this helps! Eventually, I'd like to write a nice little library for CC65 with all these functions ready to go. // CHRIS EXAMPLES: HGR is at $F3E2 In CC65, you can call this with this code: __asm__ ("JSR $F3E2"); /* HGR : Set Graphics Mode */ HCOLOR is at $F6F0 To call this, you load the X register with the color you want. In CC65, you can call this with this code: __asm__ ("LDX #3"); /* COLOR=WHITE */ __asm__ ("JSR $F6F0"); /* HCOLOR */ HPLOT is at $F457 Register Y = HORIZONTAL Position (HI BYTE) Register X = HORIZONTAL Position (LO BYTE) Register A = VERTICAL Position HLINE is at $F53A Register X = HORIZONTAL Position (HI BYTE) Register A = HORIZONTAL Position (LO BYTE) Register Y = VERTICAL Position HOME is at $FC58 In CC65, you can call this with this code: __asm__ ("JSR $FC58"); /* HOME: Clear Text Window, Cursor Top */ TEXT is at $FB39 In CC65, you can call this with this code: __asm__ ("JSR $FB39"); /* Init Text Screen (Don't Force Page 1) */