HP Forums
Using Custom (vectored) ENTER - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Using Custom (vectored) ENTER (/thread-132925.html)



Using Custom (vectored) ENTER - Gerry Schultz - 02-15-2008

Hello Everyone:

I'm using vectored ENTERing to trace some programs listed in Wickes' HP 48 Insights Part 1, the GX version. In section 12.11.2 (pg 397) and 12.11.3, Prime Numbers and Prime Factors respectively, Mr. Wickes has three programs I would like to trace using my 82240B and my HP49g+.

I've typed in PRIMES1, PRIMES2 and FACTOR and they all work as described in the book. I also closely read and studied section 7.4, Vectored ENTER (pg 206) and reviewed James M. Prange excellent "48/49 series print trace / vectored ENTER" posting back at the beginning of 2007. I've typed in and confirmed that the TRON and TROFF programs correctly generate alphaENTER and betaENTER global variables. I went as far as to verify that /Ga in the program is the right alpha character, character number 140 and /Gb is the correct beta character, character number 223 in the 49g+. The alphaENTER and betaENTER global variables are in the same subdirectory as the three programs, PRIME1,PRIME2 and FACTOR. Finally, I've confirmed that both flags -62 and -63 are set.

When I run any of the three programs with the above setup, none of then generate a trace print. My input prints on my printer and the program output prints, but no trace printings in between. None of this Custom ENTER stuff is difficult to figure out so I think the problem must relate to Wickes' programs using stack manipulation and not explict ENTERs to move his data around.

With no ENTERs in the program, will vectored ENTERing allow you to trace a program with a printer? Will implicit ENTERs allow tracing in a program?

Sorry for the long nature of this post. I just wanted to make sure I had covered all the pieces that are required to make vectored ENTERing work.

If you have any insights, thank you. I'm curious to see what I'm missing or doing wrong. I also checked the comp.sys.48 group to see if they had any insight but without success.

Thanks,

Gerry


Re: Using Custom (vectored) ENTER - James M. Prange (Michigan) - 02-15-2008

Right, with vectored ENTER in effect, \GaENTER acts as a pre-processor on the command line string before the explicit or implicit ENTER action is executed, and \GbENTER acts as a post-processor after the execution is completed. They aren't called before and after each step in a program being executed.

In the RPL models, ENTER is an operation, not a programmable command, so it can't be included within a program. Even 105 KEYEVAL (49 series only) invokes the DUP command, not the ENTER operation.

To "trace print" within a program, I suggest including the PR1, PRSTC, or PRST commands where desired within the program.

Regards,
James


Re: Using Custom (vectored) ENTER - Gerry Schultz - 02-16-2008

James:

Thanks for confirming my suspicions. Now I'm confused. The original discussion was about figuring out how to duplicate trace printing a running 48/49 UserRPL program that matches the HP-97 and HP-41/822143. Since vectored ENTERing doesn't work, then what is another solution?

Perhaps what is needed is a SysRPL program that can run behind a UserRPL and duplicate Trace printing reguardless of how its written. With this potential solution the user could specify what gets printed when tracing a program.

Am I full of crap?

Gerry