HP49G Entry Reference Complete listing sorted by functionality Edition 2.11, 30 May 2005 Carsten Dominik, Thomas Rast & Eduardo M. Kalinowski i Table of Contents 1 Introduction............................... 1 1.1 Disclaimer and Acknowledgments......................... 1 1.2 Terminology............................................ 3 1.2.1 Abbreviations used in Stack Diagrams............ 3 1.2.2 Unsupported Entry Points....................... 3 1.2.3 More Information............................... 4 2 HP Objects ............................... 5 2.1 Binary Integers ......................................... 5 2.1.1 Built-in BINTS 0-127........................... 5 2.1.2 Built-in BINTS 127-255........................ 10 2.1.3 Built-in BINTS 256-........................... 11 2.1.4 Pushing Several BINTs ........................ 16 2.1.5 Conversion.................................... 17 2.1.6 Arithmetic Functions .......................... 17 2.1.7 Tests......................................... 20 2.2 Real Numbers.......................................... 20 2.2.1 Built-in Real Numbers......................... 21 2.2.2 Built-in Extended Real Numbers................ 23 2.2.3 Stack Manipulation Combined with Reals ....... 24 2.2.4 Conversion.................................... 24 2.2.5 Real Functions................................ 24 2.2.6 Extended Real Functions....................... 26 2.2.7 Tests......................................... 28 2.3 Complex Numbers ..................................... 28 2.3.1 Built-in Complex Numbers..................... 29 2.3.2 Conversion.................................... 29 2.3.3 Functions..................................... 29 2.3.4 Tests......................................... 30 2.4 Character Strings...................................... 31 2.4.1 Built-in Characters............................ 31 2.4.2 Built-in Strings................................ 33 2.4.3 Built-in Strings with Stack Manipulation........ 36 2.4.4 Conversion.................................... 37 2.4.5 Management.................................. 37 2.4.6 Parsing Strings................................ 40 2.4.7 Decompilation................................. 41 2.4.8 String Tests................................... 45 2.5 HEX Strings........................................... 45 2.5.1 Built-in HEX Strings .......................... 45 2.5.2 Conversion.................................... 46 2.5.3 General Functions............................. 46 2.5.4 Tests......................................... 48 ii 2.6 Tagged Objects........................................ 48 2.7 Arrays ................................................ 48 2.7.1 General Functions............................. 48 2.7.2 Conversion.................................... 50 2.7.3 Statistics...................................... 50 2.8 Unit Objects........................................... 51 2.8.1 Built-in Units................................. 51 2.8.2 Creating Units ................................ 51 2.8.3 General Functions............................. 52 2.8.4 Arithmetic Functions .......................... 52 2.8.5 Tests......................................... 53 2.9 Composites............................................ 53 2.9.1 General Operations............................ 54 2.9.2 Building...................................... 56 2.9.3 Exploding..................................... 57 2.9.4 Lists.......................................... 57 2.9.5 Secondaries ................................... 59 2.10 Meta Objects......................................... 59 2.10.1 Stack Functions.............................. 59 2.10.2 Combining Functions......................... 59 2.10.3 Meta and Object Operations.................. 60 2.10.4 Other Operations............................. 60 2.11 Symbolics ............................................ 61 2.11.1 General Operations........................... 61 2.11.2 Derivatives................................... 63 2.11.3 Other Functions.............................. 65 2.11.4 Meta Symbolics Functions..................... 65 2.12 Library and Backup Objects........................... 65 2.12.1 Port Operations.............................. 65 2.12.2 Rompointers................................. 65 2.12.3 Libraries..................................... 66 2.12.4 Backup Objects.............................. 68 3 General SysRPL Entries .................. 69 3.1 Stack Operations....................................... 69 3.2 Temporary Environments............................... 73 3.2.1 Built-in IDs and LAMs......................... 73 3.2.2 Conversion.................................... 74 3.2.3 Temporary Environments Words................ 74 3.3 Error Handling......................................... 78 3.3.1 General Words................................ 78 3.3.2 Error Generating Words........................ 79 3.4 Conditionals........................................... 80 3.4.1 Boolean Flags................................. 80 3.4.2 General Tests ................................. 81 3.4.3 True/False Tests............................... 82 3.4.4 Binary Integer Tests........................... 84 3.4.5 Real and Complex Number Tests............... 86 iii 3.4.6 Meta Object Tests............................. 87 3.4.7 General Object Tests .......................... 87 3.4.8 Miscellaneous ................................. 88 3.5 Runstream Control..................................... 89 3.5.1 Quoting Objects............................... 91 3.5.2 Skipping Objects.............................. 92 3.6 Loops................................................. 93 3.6.1 Indefinite Loops............................... 93 3.6.2 Definite Loops................................. 94 3.7 Memory Operations.................................... 95 3.7.1 Recalling, Storing and Purging ................. 95 3.7.2 Directories.................................... 97 3.7.3 The Hidden Directory.......................... 98 3.7.4 Temporary Memory............................ 99 3.8 Time and Alarms ..................................... 100 3.8.1 Alarms ...................................... 101 3.9 System Functions..................................... 101 3.9.1 User and System Flags........................ 101 3.9.2 Hardware Tests............................... 104 3.9.3 General Functions............................ 105 3.10 The Virtual Stack.................................... 106 3.11 Kermit.............................................. 109 4 Input and Output ....................... 113 4.1 Checking for Arguments............................... 113 4.1.1 Number and Type of Arguments............... 113 4.1.2 Type Checking............................... 115 4.2 Keyboard Control..................................... 118 4.2.1 Converting Keycodes ......................... 118 4.2.2 Waiting for Keys............................. 119 4.2.3 The ATTN Flag.............................. 121 4.2.4 Bad Keys.................................... 121 4.2.5 User Keys.................................... 121 4.3 The Menu............................................ 123 4.3.1 Menu Properties.............................. 123 4.3.2 Building Menus .............................. 126 4.3.3 Menu Display................................ 127 4.3.4 Displaying Menu Labels....................... 127 4.3.5 General Entries............................... 128 4.4 InputLine and Inputforms ............................. 128 4.4.1 Inputline..................................... 128 4.4.2 Inputform.................................... 129 4.4.3 The input form message handler commands..... 129 4.5 The Filer............................................. 132 4.6 The Browser Engines.................................. 133 4.6.1 The HP48 Browser Engine.................... 133 4.6.2 The HP49 Browser Engine.................... 137 4.7 The Parametrized Outer Loop (POL)................... 139 iv 4.8 Editor Commands..................................... 140 4.8.1 Status....................................... 140 4.8.2 Display Window.............................. 141 4.8.3 Inserting Text................................ 142 4.8.4 Deleting Text ................................ 143 4.8.5 Moving the Cursor............................ 144 4.8.6 Selection, Cut and Paste, the Clipboard........ 145 4.8.7 Search and Replace........................... 147 4.8.8 Evaluation................................... 148 4.8.9 Starting the Editor........................... 149 4.8.10 Miscellaneous............................... 151 4.9 Entries Related to the Equation Writer................. 153 4.10 Entries Related to the Matrix Editor and Matrix Operations ...................................................... 154 4.11 The Display......................................... 154 4.11.1 Display Organization ........................ 154 4.11.2 Preparing the Display........................ 155 4.11.3 Immediate Refresh........................... 155 4.11.4 Controlling Display Refresh .................. 156 4.11.5 Clearing the Display......................... 159 4.11.6 Annunciator and Modes Control.............. 159 4.11.7 Window Coordinates ........................ 161 4.11.8 Scrolling the Display......................... 161 4.11.9 Displaying Objects .......................... 162 4.11.10 Displaying Text............................ 162 4.11.11 Messages and Boxes........................ 164 4.11.12 Fonts...................................... 165 4.12 Graphics............................................ 166 4.12.1 Built-in Grobs............................... 166 4.12.2 Dimensions ................................. 167 4.12.3 Grob Handling.............................. 167 4.12.4 Greyscale Graphics.......................... 168 4.12.5 Creating Menu Label Grobs.................. 170 4.12.6 Converting Strings to Grobs.................. 171 4.12.7 Creating Grobs from Other Objects........... 173 4.13 Plotting............................................. 173 v 5 The HP49G CAS........................ 178 5.1 Type Checking and Conversion......................... 178 5.2 Integers.............................................. 179 5.2.1 Built-in Integers.............................. 179 5.2.2 Conversion Functions......................... 180 5.2.3 General Integer Operations.................... 181 5.2.4 Integer Factorization and Prime Numbers ...... 182 5.2.5 Gaussian Integers............................. 184 5.2.6 Integer Tests................................. 185 5.3 Matrix Operations .................................... 186 5.3.1 Creating and Redimensioning Matrices......... 186 5.3.2 Conversion................................... 187 5.3.3 Tests........................................ 187 5.3.4 Calculations with Matrices.................... 188 5.3.5 Linear Algebra and Gaussian Reduction........ 189 5.3.6 Linear System Solver ......................... 190 5.3.7 Other Matrix Operations...................... 190 5.3.8 Eigenvalues, Eigenfunctions, Reduction......... 192 5.4 Symbolic Expression Handling ......................... 193 5.4.1 Basic Operations and Function Application..... 193 5.4.2 Trigonometric and Exponential Operators...... 197 5.4.3 Simplification, Evaluation and Substitution..... 199 5.4.4 Collection and Expansion..................... 201 5.4.5 Trigonometric Transformations................ 201 5.4.6 Division, GCD and LCM...................... 202 5.5 Symbolic Meta Handling............................... 204 5.5.1 Basic Expression Manipulation ................ 204 5.5.2 Basic Operations and Function Application..... 205 5.5.3 Trigonometric and Exponential Operators...... 208 5.5.4 Infinity and Undefs........................... 210 5.5.5 Expansion and Simplification.................. 211 5.5.6 Tests........................................ 212 5.6 Polynomials .......................................... 213 5.6.1 Computation with Polynomials................ 213 5.6.2 Factorization................................. 215 5.6.3 General Polynomial Operations................ 218 5.6.4 Tests........................................ 220 5.7 Root Finding......................................... 221 5.7.1 Root Finding and Numerical Solvers........... 221 5.8 Calculus Operations................................... 224 5.8.1 Limits and Series Expansion................... 224 5.8.2 Derivatives................................... 227 5.8.3 Integration................................... 229 5.8.4 Partial Fractions ............................. 230 5.8.5 Differential Equations......................... 230 5.8.6 Laplace Transformation....................... 230 5.9 Summation........................................... 231 5.10 Modular Operations.................................. 232 vi 5.10.1 Modulo Operations.......................... 232 5.10.2 Symmetric Modular Arithmetic............... 233 5.11 Sign Tables.......................................... 236 5.12 Errors............................................... 237 5.13 CAS Configuration................................... 238 5.14 CAS Menus.......................................... 241 5.15 Internal Version of UserRPL CAS Commands.......... 242 5.16 Miscellaneous........................................ 246 5.16.1 Verbose Mode Display Routines .............. 246 5.16.2 Evaluation.................................. 246 5.16.3 Conversion.................................. 247 5.16.4 Qpi......................................... 247 5.16.5 Infinity..................................... 248 5.16.6 Built-In Constants........................... 248 5.16.7 List Application............................. 249 5.16.8 Irrquads.................................... 250 5.16.9 Miscellaneous............................... 250 6 Entries specific to the HP38/39/40 ....... 255 6.1 Topic Variables and the Topic Outer Loop.............. 255 6.2 Rest ................................................. 273 7 UserRPL Commands .................... 274 7.1 A-F.................................................. 274 7.2 G-M................................................. 314 7.3 N-S.................................................. 337 7.4 T-Z.................................................. 375 7.5 Non A-Z ............................................. 392 7.6 The Development Library 256.......................... 402 7.7 The EXTABLE Library ............................... 403 8 ML Entry Points ........................ 405 8.1 General Purpose...................................... 405 8.2 Errors................................................ 405 8.2.1 Generating Errors............................ 405 8.2.2 Error Number Constants...................... 405 8.3 Hexadecimal Math.................................... 406 8.4 Long Reals........................................... 407 8.4.1 Storage Handling............................. 407 8.4.2 Calculating .................................. 407 8.4.3 Conversion................................... 407 8.5 Memory Handling..................................... 408 8.5.1 General Memory Handling Routines............ 408 8.5.2 Moving and Swapping Memory Areas.......... 408 8.5.3 Allocating Memory in TEMPOB............... 410 8.5.4 Resizing TEMPOB Areas..................... 410 8.5.5 CRC Routines................................ 411 vii 8.5.6 Working with Memory........................ 411 8.5.7 Other Routines............................... 411 8.6 Bank Switching....................................... 412 8.7 Memory Addresses.................................... 412 8.8 Display............................................... 413 8.9 Graphical Toolbox .................................... 414 8.10 Popping and Pushing................................. 416 8.10.1 Pointers .................................... 416 8.10.2 TRUE and FALSE .......................... 417 8.10.3 System Binary Integers (BINT)............... 417 8.10.4 HXS and ZINTs............................. 418 8.10.5 Real and Complex Numbers.................. 418 8.11 Keyboard Handling .................................. 418 8.12 Various ML Entries .................................. 420 8.13 Debugging........................................... 420 8.14 Object Types........................................ 421 9 RAM entries ............................ 425 9.1 RPL pointers......................................... 425 9.2 Memory management pointers ......................... 425 9.3 Screen related......................................... 425 9.4 Annunciators......................................... 426 9.5 Save areas............................................ 426 9.6 System and User Flags ................................ 427 9.7 Internal System Flags ................................. 427 9.8 Warmstart log........................................ 431 9.9 Command line management............................ 431 9.10 POL variables ....................................... 432 9.11 Topic/TOL variables................................. 432 9.12 User interrupts....................................... 440 9.13 UART buffering...................................... 440 9.14 ROM Part Tables.................................... 441 9.15 Fonts................................................ 441 9.16 Constants........................................... 441 9.17 Other/Uncategorized................................. 442 10 Miscellaneous Entries................... 449 10.1 Various Matrix operations............................ 449 10.2 Undescribed Entry Points............................. 449 11 Entries sorted by address ............... 457 Entry Index ................................ 526 Chapter 1: Introduction 1 1 Introduction This is a list of SystemRPL, User RPL and ML entries. The list groups the entries by task in many different chapters and sections. If you are looking for a particular entry go directlytotheIndex. Thereisalsoanaddress-sortedlist,ifyouwanttolookupaparticular address. 1.1 Disclaimer and Acknowledgments The information provided in this document was compiled from a large variety of sources. The transformation of all the different formats to a single database was largely done with specialpurposeprogramstoreverse-engineerthedifferentdocuments. Thishasworkedvery well in many cases, and less well in some other cases. If some of the information looks oddly formatted, the reason is probably the automatic extraction. Many of the authors of the original documents will find literal bits and pieces of their text in this document. Thanks to all of them for their generosity in allowing me to use their documents and files freely. Neither we nor the authors of the different sources assume any warranty. This document isdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you find any errors, let us know so that the database can up updated and fixed. Sent bugreportsandothercommentstoCarstenDominik. ReportsabouttheMLchaptershould be sent directly to Thomas Rast, but with a CC to Carsten Dominik. Here is a list of sources which have been used. Programming in System RPL by Eduardo Kalinowski This book has been a major source for the database. The entire book has been reverse-engineered using pdftotext and then a variety of Emacs and Perl programs to extract and format the reference part of the book. CAS Documentation Draft by Bernard Parisse Bernard Parisse has kindly sent me a file with draft documentation about most CAS entries which is the basis of the CAS chapter. This covers both code derivedfromErable(writtenbyBernard)andfromALG48(byMikaHeiskanen and Claude-Nicolas Fiechter). The documentation is not complete, and not entirely up-to-date. However, the information given should be accurate. entries.srt by Mika Heiskanen Mika’sreallyusefulcollectionofentrydescriptionhasbeenusedtodouble-check the information derived from Eduardo’s book. ML entry descriptions by Peter Geelhoed Peter Geelhoed created the initial version of the ML section for this document. HP48/49 entry cross-reference by Joe Horn This document has been used to make a list of entries for the HP49 in the first place, and to add and double-check addresses for both calculators. Chapter 1: Introduction 2 Various posts on comp.sys.hp48 A number of post on comp.sys.hp48 have documented a set of entry points, for example the Graphical Toolbox (Cyrille de Brebisson), the Editor related entries (myself) and other stuff. Supported entry lists from HP HP has published lists of supported entries for all calculators in the database. The lists generally only contain names and addresses, no further description. Further contributions Denis Martinez, Alberto Zamora Oyarce, Wolfgang Rautenberg, Michael de Coninck, Christoph Giesselink, Martin Lang, Piotr Kowalewski, Lilian Pigallio and in particular Jean-Yves Avenard have also contributed information about variousentrypointsand/orhaverepliedtomyquestionsaboutdifferentaspects related to entries.
Description: