Page 1 of 1

some language questions...

PostPosted: Wed May 19, 2010 2:22 pm
by SurveyD
Hi all,
I'm completely new to the 41. I am attempting to take a large program/routine written by a guy who is no longer with our company, and convert it into an excel/VB format. I have some questions on some syntax that I'm hoping someone may be able to clear up:

1. At "RCL IND X": I'm thinking this RCL's the Register of the value indicated by the current value of the 'x' stack...is that right? What if the current value of 'x' is a decimal number? If 'x' = 1.51 would a "RCL IND X" result in RCL'ing register 1 (the integer)?

2. What is the purpose/result of a "LASTX"?

Thanks for any light you can shine....

Re: some language questions...

PostPosted: Wed May 19, 2010 6:07 pm
by Garth
1. At "RCL IND X": I'm thinking this RCL's the Register of the value indicated by the current value of the 'x' stack...is that right? What if the current value of 'x' is a decimal number? If 'x' = 1.51 would a "RCL IND X" result in RCL'ing register 1 (the integer)?

Mostly right. Just change the word "stack" above to "register," and it will be perfect. (X is one of the registers in the stack.)

2. What is the purpose/result of a "LASTX"?

It is mostly for recovery from errors when doing calculations by hand, but has some use in programs as well. It just saves the last X value automatically without your having to take extra steps to store it for future use.

I am attempting to take a large program/routine written by a guy who is no longer with our company, and convert it into an excel/VB format.

Hopefully he commented his work well and described the processes. It doesn't usually seem to work very well to try to actually translate a program from one language to another one that is not closely related. It's best if take the requirements and just re-write it, referring back to the old program only in cases where some detail is missing. If the writer of the original program got into synthetic programming on the 41, you will have an extra challenge.

The 41 was slow in program execution, but very quick to develop applications in, for example, data acquisition and control of instruments in the lab. Using the 82169A HPIL-to-HPIB (IEEE-488) interface converter, it could interface to thousands of models of lab instruments, up to 15 at a time. My first exposure to it was when someone where I worked took 20 minutes of his lunch time to write an HP-41 program to control a simple automated test equipment setup and get it going. I was immediately hooked.