HP48SX program HELPPPP... Message #1 Posted by Tal on 8 Nov 1999, 1:23 a.m.
Hi There, I tried to write a simple program that receives ASCII characters (from RS232 port), and performs any task according to it (for the HP48SX calculator). I spent lots of time programing it and I don't understand why the program dosn't performs the CASE loop instructions. I will appreciate very much if you can help my to solve the problem. The program is:
%%HP: T(1)A(D)F(.); CLLCD ERASE DO @ START INFINITY LOOP.
1 SRECV DROP NUM A @ RECEIVE CHARACTER TO LOCAL VAR. A.
CASE @ START CASE LOOP.
A 50 SAME @ ASCII 50 IS 2 KEY?.
THEN
"TWO" @ PRINT "TWO" IF 2 KEY IS PRESS.
END
A 50 @ IF OTHER KEYS PRESS?.
THEN
A 1 * @ PRINT ASCII CHR. OF A KEY.
END
END
UNTIL 0 @ INFINITY LOOP. END
Thank you, Best regards, Tal. email: td@chem.ch.huji.ac.il
|