Re: Need some old docs
It's great to see that there are still some working on OnBoardC. Being an old school C programmer I thought about refactoring VFSDos, because it seems to have many flaws. However, time's limited... :-( > 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? It helps a lot to let the GCC compiler generate assembler source code (option "-S") and to study that. >From my experiences writing Phoinix (phoinix.sf.net) I'd recommend to try: __asm__("link %a6,#0\n\t" "move.l %a6,-(%a7) ; push a6\n\t" "jbsr setA6_00(%pc) ; no need of add #4,a7\n\t" "unlk %a6 ; restore stack\n\t" "rts\n\t"); and __asm__("jbsr getA6_00(%pc) ; get value in d0\n\t" "move.l %d0,%a6 ; restore a6\n\t" "move.w 4(%a7),%d0 ; return value\n\t" "unlk %a6 ; restore stack \n\t" "rts\n\t"); respectively. You may also replace "%a7" by "%sp", or "%a6" by "%fp", if you like it better. The pseudo-op "jbsr" uses "bsr.s", "bsr.w", or "jsr", whichever is appropriate. Anyway, I found the complete source, and it looks better to me to use these lines, provided that your A5 point to the globals. It saves some calls and returns. void Tag(void) { __asm__("link %a6,#0 ; set up %a6 for exit()\n\t" "move.l %a6,me...@end.w(%a5) ; store %a6 in global memA6\n\t" "unlk %a6 ; restore stack\n\t" "rts\n\t"); } void exit(int code) { __asm__("move.l me...@end.w(%a5),%a6 ; restore %a6 from global memA6\n\t" "move.w 4(%a7),%d0; return value\n\t" "unlk %a6 ; restore stack\n\t" "rts\n\t"); } > I am asking for documentation on SysLib* calls because GCC complains about > this call: > err=SysLibClose(StdioLibRef,&usecount); // too many arguments to > SysLibClose Well, the header file contains a prototype with the libref only... HTH, Bodo -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
RE: Need some old docs
Ryan, Sorry to waste your time with that last stab in the dark. I can't help I'm afraid, I've only ever worked with C on the Palm - never touched assembler. Regards John __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Need some old docs
On Thu, May 28, 2009 at 2:40 AM, John V Sutton 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/
RE: Need some old docs
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. Extract below... System Manager This chapter provides reference material for the system manager. The system manager API is declared in the header files FatalAlert.h, SystemMgr.h, and SysUtils.h. For more information on the system manager, see the chapters "Application Startup and Stop" and "Palm System Features" in the Palm OS Programmer's Companion. Regards John Sutton __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Need some old docs
On Wed, May 27, 2009 at 12:04 PM, Dmitry Grinberg wrote: > why? I'm in the midst of rewriting a shared library from onboardc->gcc and hit a stumbling block. The Garnet docs referenced that pdf but it's a cobalt doc... -- 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/
Re: Need some old docs
why? Best Regards, Dmitry Grinberg (847) 226 9295 On Tue, May 26, 2009 at 10:24 PM, Ryan Rix wrote: > Hi guys, > > I am currently in search of some documents describing various system > aspects that used to reside at > http://www.palmos.com/dev/support/docs/protein_books/ but now are > seemingly invisible because, well, access probably nuked them ;) I > know that one is system_management.pdf and that is the one that I need > the most. The others would just be nice to have > > Anyone have an old archive somewhere or a mirror with these pdfs? > > -- > 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/ > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
Re: Need some old docs
On Tue, May 26, 2009 at 10:24 PM, Ryan Rix wrote: > Hi guys, > > I am currently in search of some documents describing various system > aspects that used to reside at > http://www.palmos.com/dev/support/docs/protein_books/ but now are > seemingly invisible because, well, access probably nuked them ;) I > know that one is system_management.pdf and that is the one that I need > the most. The others would just be nice to have > > Anyone have an old archive somewhere or a mirror with these pdfs? > > -- > 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/ > ... nicked them from web.archive.org, and they are not what I needed... will ask in a different thread when I can narrow down what I need later. -- 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/
Need some old docs
Hi guys, I am currently in search of some documents describing various system aspects that used to reside at http://www.palmos.com/dev/support/docs/protein_books/ but now are seemingly invisible because, well, access probably nuked them ;) I know that one is system_management.pdf and that is the one that I need the most. The others would just be nice to have Anyone have an old archive somewhere or a mirror with these pdfs? -- 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/