Post Reply 
SystemRPL using MASD compiler
05-30-2022, 10:22 AM (This post was last modified: 05-30-2022 10:25 AM by DavidM.)
Post: #4
RE: SystemRPL using MASD compiler
(05-29-2022 10:40 PM)Marc5278 Wrote:  When I press "ASM" key I receive an error message "asm Error: Invalid file". After I got the error message I press "ER" to understand the error.

After I press the "ER" key I get the message "label expected" and the cursor appears at the % symbol just before the "+" symbol.

That specific error at that spot leads me to believe that you probably don't have an extable installed.

In addition to the other comments, make sure that you have a suitable extable installed. This contains the official one from HP for a rev. 2.15 50g. I keep mine installed in port 2.

Once you've installed the extable, the built-in assembler/compiler (ASM) should be able to compile your code. If it succeeds, you'll get no error messages and simply see the compiled code object left in stack level 1. It should look something like "1. External" (the fraction mark depends on your calculator's settings). That code is now ready to be saved into a global variable or run directly with EVAL.

A word of warning, however: as written, your code assumes that a real (aka "approximate") number already is present in stack level 1 when it executes. If the stack contains any other kind of object (say, an exact number [ZINT]) or is otherwise empty, the calculator will either crash or be left in an unstable state that will inevitably lead to a crash. So be careful how you experiment with that particular program.

There's nothing inherently wrong with the code as written, it simply needs to be used in the proper context. It will function as I believe you intend, but only if the stack is pre-loaded with a real number before execution. I recommend that you use an emulated calculator for your SysRPL coding efforts so that you can safely (and quickly) recover from the inevitable "oops" moments that come up when developing SysRPL code.

Hope this helps!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
SystemRPL using MASD compiler - Marc5278 - 05-29-2022, 10:40 PM
RE: SystemRPL using MASD compiler - DavidM - 05-30-2022 10:22 AM



User(s) browsing this thread: 1 Guest(s)