|Re: HP-49G+ anomaly with 'CR'.|
Message #5 Posted by James M. Prange on 19 Nov 2003, 2:40 a.m.,
in response to message #4 by r. d. bärtschiger.
Because a key is down when the CR tries to execute? I tried inserting a CR into a few programs without getting any beep from them, but just \<< CR \>> by itself, or CR as the first object in a program, does beep when I press the EVAL key on the 49g+. On the 48GX, this doesn't happen unless I intentionally hold the key down longer than normal. I expect that the "problem" is that on the 49g+, the program executes so fast that I don't have time to release the EVAL key before it tries executing the command. Maybe the fact that I have to press harder than "normal" on the 49g+ influences how fast I can release the key. With the program \<< .1 WAIT CR \>>, I don't get the beep with a normal keypress. Personally, I'd rather ignore this "problem" than have HP add a delay at the beginning of each print command.
But I am a bit curious about why the print commands beep when a key is down, but not the XMIT command (even when using the IR port) for instance.
If I use PR1 to print a string too long to fit on a single line, and hold the key down, then it prints out the first line and beeps. When I release the key, the rest of the string is printed. That it prints out the first line tells me that the "CR" ("print line and leave head at right", actually character 4) was sent while the key was still down.
The 48SX and 48GX seem to behave the same, so I continued experimenting with them. Using the INPRT program to capture the "Red Eye" IR stream does indeed confirm that the first line, beginning with the switch to ECMA 94 and ending with character 4, is sent while the key is down. If it can send that much, why the beep and delay in sending the rest of the string?
But with the CR command, with the key held down, it just beeps, and the character 4 isn't sent until after the key is released.
Switching to serial IR for printing and using the SRECV command to capture the print stream, the entire string is sent out while the key is held down, and then it beeps if the key is still down when it finishes sending. With the CR command, the line termination string is sent while the key is still down, and then it beeps. Printing by wire to either another calculator's SRECV or an actual serial printer shows the same behavior.
I really doesn't see a reasonable explanation for why it should behave this way. Maybe you've noticed a "bug" that's been in the ROM since the 48SX, but that nobody found objectionable until the 48g+'s extra speed made it so noticeable.
Maybe someone at comp.sys.hp48 has an answer? Should we take this discussion there?