![]() ![]() This allows for arbitrary length expressions with no need to approach them in an optimal manner. RPL stacks are dynamically allocated and deallocated as needed. (User) RPL calculators have the following characteristics: Stack Size Limited Only by Memory System-RPL-only calculators such as the HP-18C and the HP-38G do not present most of the features below to the user. User RPL is found in the HP-28, HP-48 and HP-49 series calculators. This opened to door to faster more powerful programming. Later, James Donnelly, an HP-48 developer, wrote "An Introduction to HP 48 System RPL and Assembly Language Programming." It was not an HP publication but was done with the company's blessing and they allowed their HP-48 development tools to be distributed on a disk that came with the book. Brave users who weren't deterred by memory corruption experimented with SYSEVAL and unlocked many of the secrets of the RPL calculators. SYSEVAL simply calls the address (user binary) provided in the first level of the stack. ![]() While originally meant for HP's programmers, HP left a window to System RPL open via the SYSEVAL command. System RPL programs were meant to be created with HP's RPL compiler and then downloaded. User RPL was documented in the manuals and could be entered in the calculator via keystrokes. ![]() A few examples of added functions for binary integers are: #1+ which adds 1, dup#1+ which duplicates x on the stack and then adds 1, and #-#2/ which subtracts y from x and divides by 2.Įventually, the term System RPL was used to describe the RPL system as available to internal programmers and User RPL was used to describe the safe subset with parameter validation etc. There are also internal commands which provide combined operations for saving space and time. If the programmer is wrong, the calculator will behave unpredictably and might need to be reset and reloaded. An HP programmer who is sure that the arguments will always be correct at some point inside a program can call the appropriate internal multiplication routine directly. As an example, the user-visible RPL command for multiply checks that there are two arguments on the stack, checks their types, and then calls an appropriate multiplication routine for real numbers, complex numbers, integers etc. Thus, HP's programmers were allowed to access powerful and quick aspects of RPL that were off-limits to the casual user. Their job was to carefully debug their code and reload their calculator memory when bugs occurred in development. Internal programmers needed speed and efficiency. Many calculator users learn by experimentation so programming errors should be handled gracefully without any loss of data. Most users expect their calculators to be relatively "bullet-proof". While the needs of both types of programmers overlapped, they also had their differences. The HP-28C was the first calculator to be both internally programmed in RPL and to make RPL available to the user. The HP-18C is listed here as an "honorary member" of the RPL calculator family because it was the first calculator to be programmed internally in RPL, but most calculator users wouldn't think of it as an "RPL calculator". Since this model was non-programmable and algebraic, RPL was not presented to the user. It was first used internally in the HP-18C. RPL was developed both for HP's internal programmers and for calculator users. and from Forth, RPL inherited threaded execution and RPN notation with an unlimited stack. From Lisp, RPL inherited concepts such as atomic and composite objects, temporary (lambda) variables, garbage collection, the ability to pass unevaluated objects as arguments etc. Instead, HP combined elements of RPN, Lisp and Forth and came up with a language called Reverse Polish Lisp or RPL. HP examined existing languages such as BASIC but found them to be unsuitable both because of their limitations and their resource demands which were still rather high for pocket devices. However, as memory became denser and less expensive, the major challenge shifted away from saving space to implementing and testing the many sophisticated functions that newer calculators contained. They used machine language exclusively and carefully refined and re-refined their algorithms until they fit. For earlier calculators, memory was very expensive and bulky and the challenge for firmware writers was to pack a set of scientific functions into very little space. ![]() In the late 1980s, HP was developing a new series of extremely powerful calculators that needed a new programming language. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |