Post Reply 
HP41C - workaround for the SIZE? missing
04-21-2016, 05:24 PM (This post was last modified: 04-21-2016 05:49 PM by Dieter.)
Post: #15
RE: HP41C - workaround for the SIZE? missing
(04-20-2016 08:40 AM)Werner Wrote:  *Edited a few times. Now, after 25 years or so, I seem to be able to find improvements I couldn't find before..

I prefer the original version – the new one is slightly shorter (while I doubt it's faster), but the display looks a bit weird because of the VIEW / CLD sequence.
Here's another option that does not require a second flag test:

Code:
>LBL"SIZE?"
 255
 ENTER
 ISG X
>LBL 01
 SF 25
 ENTER
 CLX
 RCL IND Z
 RDN
 FC?C 25
 CHS
 2
 /
 ST+ Y
 ABS
 INT
 X>0?
 GTO 01
 X<> L
 +
 END

The CLX disables stack lift so that the RCL overwrites X if the register is available, otherwise it leaves a zero.

Otherwise I really like your code. It's short, fast and effective.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP41C - workaround for the SIZE? missing - Dieter - 04-21-2016 05:24 PM



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