Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!news.cs.indiana.edu!widener!netnews.upenn.edu!gynko!hoford From: hoford@gynko.circ.upenn.edu (John Hoford) Newsgroups: comp.sys.handhelds Subject: Re: C compiler for HP48SX Message-ID: <45094@netnews.upenn.edu> Date: 24 Jun 91 15:37:34 GMT Article-I.D.: netnews.45094 References: <1991Jun24.210635.86948@vaxc.cc.monash.edu.au> Sender: news@netnews.upenn.edu Organization: Cardiothoracic Imaging Research Center Lines: 57 Nntp-Posting-Host: gynko.circ.upenn.edu In article <1991Jun24.210635.86948@vaxc.cc.monash.edu.au> apm279l@vaxc.cc.monash.edu.au writes: >In article , caeaves@icaen.uiowa.edu (Cory A Eaves) writes: >> >> I have looked all over for a C compiler for my new HP48SX, and I have drawn the >> conclusion one doesn't exist. >>... .... >I guess it'll end up as approximately ansi-C. Will let the net know... > >Peter > A C like compiler for the 48 would be very useful, but I think I would be better if the language was adapted to the 48's system for example: main() should be called with the stack as the arguments. the data structures for all types in the 48 should be defined the major operators should be overloaded to operate on them many of the builtin calls of the 48 should be defined You should be able to access ore create 48's variables I think c++ is a much better language to suport the functions needed On the other hand a very simple c like language would be useful one which: had no float worked only with the machine code defined data types (.w .s .a) had the ability to call 48 system calls (or the ability to build a lib of such calls) had malloc and free this tould be much simpler to write and debug and would allow and be mostly a replacment for assembly programming but a standard lib could be built with it that provided the functionality that is neded One thing that has prevented me from trying to build a compiled language for the machine is my lack of understanding of asm convensions within the 48 for example: how should malloc and free be impleted how should autmatic variables be created where should a function call put its return value John D. Hoford