Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!tuvie!inst182 From: inst182@tuvie (Inst.f.Techn.Informatik) Newsgroups: comp.sys.handhelds Subject: Re: HP28 Emulator (Was: Re: (none) --- HP-28S Exponentiation) Keywords: HP-28S ^ exponentiation power Message-ID: <1143@tuvie> Date: 26 Feb 90 17:49:43 GMT References: <364@images1.Waterloo.NCR.COM> <1090@tuvie> Reply-To: inst182@tuvie.UUCP (Inst.f.Techn.Informatik) Organization: Technical University of Vienna, EDP-Center Lines: 70 Hi, everybody! About two weeks ago I posted to comp.sys.handhelds that I am writing a HP28 emulator. I got some replies by now and this article is an answer to all of them. First of all, the term "emulator" I used seems to have promised too much. I am NOT emulating the saturn CPU but the high level features of the HP28. This has of course the disadvantage that all the fancy sysevals won't work (they aren't the same on the different models anyway), but you get a larger screen, better graphics, more memory, more speed (I doubt that a CPU emulator would be as fast as the HP28 even on a fast AT)... The main reason for not writing a CPU emulator (I considered it before I started) is that either every user would have to load the entire ROM of the HP28 (128k!) into his PC (not everybody has an IR receiver on his PC) or the ROM had to be distributed with the emulator (I am not sure if HP would like this). The next question was, how much of the program does exist by now? The interpreter is finished, so all the normal programming features (IF, loops, local variables, calling other programs) work. The data types implemented by now are real (IEEE double, not BCD), complex, binary (only 32 bit) with some of the operations. Strings and lists exist, too, but they aren't of much use yet. Arrays will be added next. No algebraic types yet, sorry. I have not even decided how to represent them (Just the same as programs, just with a different magic number, would be best, I think). User interface: The current UI is a rather ugly command line interface. I plan three windows (Stack, output, edit) and a menu bar so that the commands most often needed can be selected by function keys or mouse. Portability: I am not sure how portable my code is. I tried porting it to UNIX, which didn't work without greater changes (cc does not like the prototypes (It does not complain about them, but ignores them) and gcc misses many include files and the math library), but it should work with a properly installed ANSI compiler (except for some debugging routines). After adding the UI, however, there will be a lot of Turbo-Cisms (graphics) and hardware-dependency (mouse) in it. I will now fix up a few things, write a short documentation and then post everything to comp.sources.misc, so that you folks can play around with it and tell me your opinion. greetings, Peter. PS: PLEASE, if you send me mail, do NOT REPLY to the address in the header (tuvie!inst182, which is our institute's account on the newsserver, and our sysop doesn't like guessing who the mail could be for (although he is good at it :-) but to one of the addresses below (I don't know which of them work :-() _______________________________________________________________ | __ | Peter J. Holzer | | | | \ | Technische Universitaet Wien | | |___|__/ | | | | | | hp@honey.tuwien.ac.at hp@vmars.uucp | | | | | ...!uunet!mcsun!tuvie!asupa!honey!hp | | ____/ |--------------------------------------------------| | | Think of it as evolution in action -- Tony Rand | |____________|__________________________________________________|