On Thu, May 28, 2009 at 2:40 AM, John V Sutton <john.sut...@xtaq.com> wrote:
> Ryan, > Forgive my ignorance, but is it documentation on Palm system functions > that you require? > There's a section in the companion.pdf that documents these if it's of > use to you. > What I am looking for basically, is porting some old, unsupported code from OnBoardC Suite to GCC. The code is Harry Konsta's StdIOLib which is used in his VFSDos and Phillipe Guillot's PalmPascal Compiler. http://pages.total.net/~hkonstas/vfsdos.html I am porting it to GCC to use in the new incarnation of OnBoardC being worked on by John Wilund and I here: p.sf.net/onboard-ng/main We are using StdioLib to have plugin<->core communication. There are certain parts of this code which must be rewritten due to minor differences in OnBoardC notations and GCC notations. Notably at the moment: small assembly hacks which works on saving and restoring the A6 register to global for app start and exit. void Tag(void) { __asm__("link a6,#0\n\t" "move.l a6,-(a7) ; push a6\n\t" "jsr setA6_00(pc) ; no need of add #4,a7\n\t" "unlk a6 \n\t"); } void exit(int code) { __asm__("jsr getA6_00(pc) ; get value in d0 \n\t" "movea.l d0,a6 ; restore a6 \n\t" "move 4(a7),d0 ; return value\n\t" "unlk a6 ; restore stack \n\t" "rts\n\t" ); } The inline notation itself is legal (changed that already) however, it's the assembly commands themselves which I am worried about: are those legal syntax to pass to m68k-palmos-as? As for my original question: I am asking for documentation on SysLib* calls because GCC complains about this call: // Close StdioLib if(StdioLibRef!=-1) { err=SysLibClose(StdioLibRef,&usecount); // too many arguments to SysLibClose if (usecount==0) { SysLibRemove(StdioLibRef); } } As I am not sure when to call SysLibRemove without this usecount argument I am kind of lost as to what to do with it. -- Thanks and best regards, Ryan Rix TamsPalm - The PalmOS Blog (623)-239-1103 <-- Grand Central, baby! Jasmine Bowden - Class of 2009, Marc Rasmussen - Class of 2008, Erica Sheffey - Class of 2009, Rest in peace. -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/