Post Reply 
SdFiler error Hp50G
12-14-2018, 12:01 AM (This post was last modified: 12-14-2018 12:01 AM by DavidM.)
Post: #8
RE: SdFiler error Hp50G
(12-13-2018 11:18 PM)3298 Wrote:  Now I'm intrigued. I consider myself a SysRPL programmer, but since I haven't run into that problem yet (despite using NULLLAMs every now and then) I'd like to know what technique I should avoid. Is it the part about "instead of NULLLAM, any fixed address ROM object can be used"? Because that looks kind of unsafe on first look.

I believe the statement "instead of NULLLAM, any fixed address ROM object can be used" is correct. I've never had a problem with it, at least.

In the "other ways of binding" section on page 115 of the Kalinowski/Dominik book, they state:

Kalinowski/Dominik Wrote:use this, which takes only 12.5 bytes, a savings of 55 bytes:
... NULLLAM TWENTYFOUR NDUPN {}N BIND ...

...and later down the page, a table showing some shortcuts:
Kalinowski/Dominik Wrote:N Commands to create N null named variables
-------------------------------------------
...
N NULLLAM #N NDUPN DOBIND

The problem is that, in both cases, the NULLLAM should be quoted (prefaced with a tick mark [']).

NULLLAM by itself works just fine as long as there is already a bound NULLLAM. When "Last Stack" is turned on, the system maintains needed items in a null-named local, but there may not be any defined NULLLAMs if Last Stack is turned off. That's what causes the problem: the unticked NULLLAM SysRPL command attempts to obtain a reference to the first bound NULLLAM, and if it can't find any it triggers an "Undefined Local Name" error. As long as "Last Stack" is enabled, there will always be at least one defined NULLLAM at run time.

It's fairly easy to see this in operation. Just create a simple SysRPL program with the following contents:
Code:
::
  NULLLAM DROP
;

Run it with "Last Stack" activated. It should execute successfully, though it doesn't do anything very interesting. Smile

Now run it with "Last Stack" turned off. On my calculators, this always causes an "Undefined Local Name" error. Placing a tick mark in front of the NULLLAM fixes the problem.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
SdFiler error Hp50G - Stevetuc - 12-05-2018, 08:28 AM
RE: SdFiler error Hp50G - pier4r - 12-07-2018, 06:18 PM
RE: SdFiler error Hp50G - DavidM - 12-07-2018, 09:40 PM
RE: SdFiler error Hp50G - Stevetuc - 12-07-2018, 11:32 PM
RE: SdFiler error Hp50G - pier4r - 12-13-2018, 07:57 PM
RE: SdFiler error Hp50G - DavidM - 12-13-2018, 08:27 PM
RE: SdFiler error Hp50G - 3298 - 12-13-2018, 11:18 PM
RE: SdFiler error Hp50G - DavidM - 12-14-2018 12:01 AM
RE: SdFiler error Hp50G - DavidM - 12-14-2018, 12:32 AM
RE: SdFiler error Hp50G - 3298 - 12-14-2018, 10:47 AM



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