You are on page 1of 8

I hope you enjoy the product.

Please send REPRODUCIBLE bug reports with the com plete project file required. Please simplify it as much as you can. Please do not ask me SysRPL or Calculator questions (trust me, you are much bett er off asking in the comp.sys.hp48 news group)! I cannot provide technical support for Hewlett-Packard or their products, please call them for help. Copyright (c) May, 2003 All Rights Reserved William G. Graves http://www.Debug4x.com for latest version. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is the Debug4x v2.2 Readme file. This file contains the following topics: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. Installation Removing older versions of Debug2 (HPSDK) If you use MASD syntax for {{ }} Nullam Structures Old debug2 Inform editor files and debug2 Project files Checking for Empty Inform Fields InformEditor and form types. Converting an HP49 project to the HP48 (and vice versa) Automatic word completion, stack diagrams Command Line Arguments Message Tables for Libraries, CONFIG entry for a library Breakpoints and Ports Emulator Tips Autoload A Project CR/LF, Unix Files, and Real Tabs Connectivity Package no longer in Debug4x Fun Things to Try

17. Copyright 18. Disclaimer of Warranty 19. 49G+ EMU Limitations ================================================================================ = 1. INSTALLATION Run the distribution program, it will unpack itself. Go into the unpacked folder and run SETUP.exe to install. If you have previously used the EMU48 emulator for either HP48 or HP49, there wi ll be a file called C:\Windows\Emu48.ini This file is created by Emu48 whenever it is run and it contains important const ants for your independent use of the emulator. These entries will NOT be used w hen the emulator is started by Debug4x. Debug4x uses a DLL version of EMU48 and creates registry entries for key EMU48 s ettings. These entries are independent of the values used by the stand-alone ve rsion of EMU48. File types *.s *.h and *.hpp will be hooked to Debug4x.exe (you get a dialog as king about *.s and *.h). The icons for the *.s, *.h, *.hp and *.hpp files will also be changed. - Read the README file (there is a link in the START menu)

Therefore you are on your own in removing the ol der debug2 program. Simply reverse the order of the variables between the {{ }} marks. this may be a simpler conversion. If you do this. Afte r opening in the Inform Editor. This is highly recommended! The registry entries and folde rs are completely independent between the two versions.The Help files have a "Quick Start" guide to help you get going. If you wish to change the code to HP48 style DoInputForm format. directories and v erbs. REMOVING OLDER VERSIONS OF Debug4x (HPSDK) Debug4x v2. There are also examples of the Inform Files.0 is a major change to the program and no reasonable solution to an " upgrade" install was designed. so the entry name now matches the previously generated name. 1 2 3 {{ A B C }} means that "A" will have 1. you may change the Unit Name of the Inform to Doxxxx. "B" 2GETLAM etc. The New Inform Editor will prod uce an entry like NAMELESS MyTitle and the messages are referred to in the same way as with the old editor. ch eck the "48 Style" checkbox and then press "Save".these may be re moved after uninstalling the old program. messages will be referred to by DoxxxxMesBase+#nn etc. .it will get you started . Old Inform Editor files will have an entry name like NAMELESS DoMyTitle and mess ages are referred to by MyTitleMesBase+#nn etc. IF YOU USE MASD SYNTAX FOR {{ }} Nullam STRUCTURES The order of variables in the sequence {{ A B C }} follows the HP RPLCOMP order. Registry Editing can be very dangerous for even experienced users so be careful! The OLD debug2 registry items are under HKCU\Software\debugger . "A" will be 3GE TLAM. press "Save" to generate new source code and sav e the file. To convert from MASD: leave your stack and xGETLAM/xPUTLAM calls as they current ly are.The EXAMPLE programs will show how to code simple libraries.. If you do not refer to these mess ages externally. OLD DEBUG2 INFORM EDITOR AND DEBUG2 PROJECT FILES Old Inform Editor files may be loaded directly into the new Inform editor. You will have to remove the "Do" from calls to the entry name to match the new name. ================================================================================ = 2. I n the above example change code to " {{ C B A }} ( RPLComp Order ) " and all w ill work fine. . The NEW Debug4x registry items are under HKCU\Software\Hewlett-Packard\Debug4x ================================================================================ = 3. As an alternative. "B" 2 and "C" 3. Use a comment like ( RPLComp Order ) to avoid confusion in the f uture! ================================================================================ = 4. Thus Debug4x is more consistent with the names used for Inform Box items.Run the DEMO project (link in the START menu) and read the comments .

HP48 DoInputForm message table 48 Style checked) c. So a generalized test that works more complex. check the "The project is for HP48" tab.hpp) may be used sit each of the Project Form's tabbed ws: Debug Data: the "LR Files" box should ad all normal . The HP49 "IfMain" r eturns a xNOVAL for empty fields A simple check for missing values requires different code for the two calcs. Debug4x wi ll automatically supply a name if this is left blank. After loading. #0 for empty on the HP49! In this case an empty field xNOVAL. 48 Style unchecked) d. HP49 new IfMain form text "inline" d. HP48 DoInputForm text "inline" d. vi areas and correct the information as follo be cleared. Debug4x will automatically lo a checkmark in the "Use Standard File" box Now "Save" the project and then "Build" the project. INFORMEDITOR AND FORM TYPES Inform Files can be produced in 4 types a. place to load older projects. under "Project Data" tab. "Message" field is the Message Handler Name. . On the same tab. 48 Style checked) b. CHECKING FOR EMPTY INFORM FIELDS The HP48 "DoInputform" returns a MINUSONE for empty fields. Suprom48 NOVAL has EQU to MINUSONE and Suprom49 has NOVA L EQU to xNOVAL. the "Mes sage Text" fields should be left blank for most simple applications. ================================================================================ = 7. This allows the same test code for both calculator forms: xxx x NOVAL EQ The works unless a DoInputForm is run generates a MINUSONE when we expected in all three cases has to be a little ns a #1 for valid field. :: NOVAL EQ ITE #0 #1 . HP49 new IfMain form message table 48 Style unchecked) (Inform Editor: M Table is unchecke (Inform Editor: M Table is checked. To help this situation. The "Project Data" tab. The sample code below retur field. ================================================================================ = 6. Load each InformBox file (if any). In the Project form. Press "Sav e". If "M Tabl e" is checked in the Inform Editor. This code works in all 3 cases! DUP MINUSONE EQ ITE :: DROP #0 .Old Profect files (*. CONVERTING AN HP49 PROJECT TO THE HP48 (and vice versa) Load the old project. ================================================================================ = 5. and check the use "48 Style" box. message text will automatically be copied fr om the GUI form display. (Inform Editor: M Table is unchecke (Inform Editor: M Table is checked.LR files Compilation: clear all 3 boxes.

By the way. The Project file must exist before auto-completion or stack diagrams can be used . For example: Debug4x. When you use one of these words. The preferred method is to click the project (*. the emulator will switch back and forth between HP48 and HP49 when you chec k/uncheck "The project is for HP48" on the Project tab (even with the emulator o n the screen!) ================================================================================ = 8. You may write ROMPTR or declare the name using EXTERNAL and then RPLCOMP will insert the ROMPTR or FLASHPTR call. Just enter text strings into the "Message Text" box of the Project's "Projec t Data" tab. just save it! ================================================================================ = 9. it must have ROM PTR or FLASHPTR just before it in the code. Debug4x will supply a suitable CONFIG file automatically.hpp (you must include the . You may use batch fi les or the "run" command to start Debug4x by including one of these files on the command line. built the code into a source file or into a separate source file. you may begin a verb and then press ctrl-space to see an a utomatic completion list. h (header) file. Place the curso r on or next to the RPL name and press ctrl-j. but it cannot edit your source code automatica lly.Review all your source files to make sure the code can run on the calculator you have selected.s in your project. MESSAGE TABLES FOR LIBRARIES. STACK DIAGRAMS In the Source Editor. Debug4x is good. Inform Box code has 4 "User Code" areas which also must be checked.s (source) or *.hp p). For a new project. CONFIG ENTRY FOR A LIBRARY A library message table collects text strings which can later be retrieved by co de. Stack Diagrams show the stack picture that matches an RPL name.exe MyProject. Debug4x allows several ways to specify a library's message handler. You may retrieve these messages by writing code as shown in the "m . a list of possible stack diagrams will show. AUTOMATIC WORD COMPLETION. For most simple libraries. ROMPTR and FLASHPTR names are followed in the list by ROM or FLASH. Type "D" and then ctrl-space and see DUP DUPDUP etc. The contents of the list is context sensitive in a sm all way. a. If you wish to make your own. you may delete all references to CONFIG and CONFIG. Look at any Message Handlers too. Be sure to place the name of the entry (usually CONFIG) into the P roject's configure name box on the Project Data tab. Type grobA and t hen ctrl-space and select grobAlertIcon. Centralizing strings can make it easier to translate a program and may even be more efficient.th is way Debug4x knows all your preferences for the project.hpp (project). ================================================================================ = 10. build your new file and try it on the emulator. When all looks correct. COMMAND LINE ARGUMENTS You can start Debug4x by double clicking any *. *.hpp) file .

This method has the advantage of working automatically with t he InformEditor built into Debug4x. The name can still be "Message" if you like. Saving a test setup as a separate . It also may seem better practice to aut omatically save the emulated calculator whenever you close. However.e49. The table below shows which ports may have breakpoints on the HP49 and H P48. for devlop ment it is often better to not save on exit. built the code into a source file or into a s eparate source file." off this is not a pro blem.. *. b.essages" example. Thi s extra prompt may be annoying to some. You must also enter the name of your entry in the "Message" box on the " Project Data" tab. Do NOT enter any s trings in the "Message Text" box. In this case. With "Automatically Save. You can download a stand-alone (not using Debug4x) copy of the emulator from: . Calculator/Port: 49: 0 1 2 breakpoints work: Y N N 48: 0 1 2 Y Y N ================================================================================ = 12. Typing the name tells Debug4x that you will generate the message table code.bin (48 Port 2 card image) fi les. DO NOT save. If you are testing a library. libraries and variables yo u have created during testing. CONFIG: For most simple libraries. the emulator setting "Automatically Save Files On Exit" is set to "off". You may write your own message code. Consider the case where you build your code.e48 file can also be a nice shortcut during development.s in your project. (also see the end of the "messages" ex ample). breakpoints. the emulator and calcula tor type is not simple due to "covered" ports and variations between the various Hewlett-Packard Calculators. Make a backup copy of your *. it is always easies t to assign it to port 0. If you wish to make your own. Debug4x will supply a suitable CONFIG file automatical ly.e49 or . Be sure to place the name of the entry (usually CONFIG) in to the Project's configure name box on the Project Data tab. autoload to the calculator and the calculator "hangs" because of an e rror (or maybe even resets). Now select the emulator again (Debug4x main menu / emulation) and you have a fresh clean copy of you favorite installation to work with.e49 and Shared. The default location is the C:\Program Files\Helwett-Packard\Debug4x\Emu d irectory. EMULATOR TIPS At installation. you may delete all references to CONFIG and C ONFIG. This causes a dialog window to pop-up each time the emulator is close d (which also happens when you close Debug4x with an emulator window open). ================================================================================ = 11. This is a quick and easy way of clearing directories. you are responsible for copying information from the Info rm Editor generated source (it is clearly marked in the source) to your message table.. Breakpoints can be set in Port 0 on both the HP49 and HP48. BREAKPOINTS AND PORTS The relationship between memory addresses. Close the calculator window.

de/ChristophGiesselink/emu48. then the verb or directory will be placed on the stack ( if Autoload has been checked). If the project is " will go down from HOMEDIR through C.hpcalc. You can get a Connec tivity Kit from HP. Directories and simple one-executable projects may have a name specified in the "Path" box of the Project Data tab.http://privat.org/ ================================================================================ = 13. Eithe r line ending works when reading. AND REAL TABS CR/LF is an option on file saves (see the Editor: View \ Editor Options \ Displa y_Tab). have it autoload and the n sequence to the library's menu. If "Use Real Tabs" is unchecked.this is the user's respons ================================================================================ = 14. may be given in front of the verb or project "Test" then defining the path as "A B C Test directory A. Library Projects will be placed in the indicated memory card slot (0. If a name is given. mul tiple spaces will be substituted for tab characters. Files will also then be tr anslated when read.see "BREAKPOINTS" above). AUTOLOAD A PROJECT Projects may be automatically loaded to the emulator if the "Autoload" box on th e Project Data tab is checked. A path or series of directory names directory name. FUN THINGS TO TRY How about building an DoInputForm project for the HP48.swol. then directory B then directory named "Test" will be created. UNIX FILES. CONNECTIVITY PACKAGE NO LONGER IN Debug4x The Connectivity Window is no longer part of this product. The right side of the editor status line indicates what type of file was read (Windows or Unix line endings). The Editor uses real TABs as the default setting. the directory or simple verb will be stored into that variable name (replacing any older contents). You may select either Windows or Unix standard for line endings. CR/LF. If the path box is empty. This can be changed in the Ed itor Options \ Display_Tab \Use Real Tabs. The directori in the emulator . the option affects file saves. Now that is a nice convenient feature if you like the HP48 (and I still do). Finally the new verb/directory es named "A B C" must exist already ibility. Open the DEMO project . ================================================================================ = 15. 1 or 2 but we suggest using 0 for development . ================================================================================ = 16.htm or http://www.

the copies are not made for resale 2. Permission to copy and distribute copies of these files is granted provided that : 1.netcom. 2. ================================================================================ = 19. Be sure to look at both tabs! In the Editor Window. we must come from different planets! In the Editor Window. but THE COPYRIGHT HOLDER PROVIDES THE PROGRAM AND DOCUMENTATION "AS THEY ARE" WITHOU T WARRANTY OF ANY KIND. INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE U SE OR INABILITY TO USE THE PROGRAM OR DOCUMENTATION. 49G+ EMU LIMITATIONS The EMU for the 49G+ has the following limitations: 1. Now open the Emulator by clicking the main "Debugger" window. Saturn is ok. William G. try File \ Print_Preview. This ROM bypasses the ARM code of the "normal" 49G+ ROM using Saturn or other techniques instead. click the "48 Style") checkbox. IN NO EVENT WILL THE COPYRIGHT HOLDER BE LIABLE TO YOU FOR DAMAGES. It does not run any ARM code.s file (if the Inform Box window is not already open). DISCLAIMER OF WARRANTY These files and the product are distributed in the hope that they will be useful . they are included in the Debug4x . When the special ROMs are authorized by HP.com). Commercial use of these files and programs is prohibited without the written per mission of the copyright holder. Emulate Menu Finally. Files tab and double click the Inf. go back to the Project Window and click Build \ Build_Project or the Editor Window \ Compilation \ Build_Project On the EMU48 window. INCLUDING. BUT NOT LIMITED TO. ================================================================================ = 18. INCLUDIN G ANY GENERAL. try File \ Page_Setup. On the left side of the Inform Edit Window. press the "Demo" menu key and the project runs! We just took an HP49 project and re-compiled for the HP48! Now if you don't agree that this was marvelous. Project_Data tab and select "The project is for HP4 8" Click on Project Window. A special EMU ROM must be obtained from HP. The printouts are gorgeous! (T his thanks again to the SynEdit people!) ================================================================================ = 17. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE. Graves (bgraves@ix. 3. but ARM is not. SPECIAL. EITHER EXPRESSED OR IMPLIED.Click on Project Window. you conspicuously and appropriately include on each copy the Copyright Notice and Disclaimer of Warranty as well as this License. COPYRIGHT The help files and portions of the program and support files are Copyright 2003.

================================================================================ = .package.