Post Reply 
A tiny synthetic HP41 challenge
12-08-2016, 06:46 PM
Post: #3
RE: A tiny synthetic HP41 challenge
(12-08-2016 06:25 PM)hth Wrote:  I am not good at synthetics at all. Your solution looks clever, but I think it will not handle the case when X is 0 properly.

Thank you for your reply. Of course the code works for x=0. A look at the M-register shows what it does. Assume x=pi.

Code:
CLA        00 00 00 00 00 00 00
STO M      03 14 15 92 65 40 00
ASTO M     10 03 14 15 92 65 40
ASTO M     10 10 03 14 15 92 65
ASTO M     10 10 10 03 14 15 92
>"000999"  10 10 10 03 14 15 92 00 09 99
       ...-- N ---> <--- register M --->

RCL M => 3,141592000 E-1
       = 0,3141592

I hoped for an elegant method of shifting the value by a nybble (half a byte) so that also results with 4, 6 or 8 digits become possible. Or something more elegant than three ASTO commands. ;-)

(12-08-2016 06:25 PM)hth Wrote:  I also think you can just remove the last CLA, there is no need to clean up.

I should have known this 40 years ago: "No, Mom, my room is OK this way. HÃ¥kan said there is no need to clean up". ;-)

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


Messages In This Thread
A tiny synthetic HP41 challenge - Dieter - 12-07-2016, 07:17 PM
RE: A tiny synthetic HP41 challenge - hth - 12-08-2016, 06:25 PM
RE: A tiny synthetic HP41 challenge - Dieter - 12-08-2016 06:46 PM
RE: A tiny synthetic HP41 challenge - hth - 12-08-2016, 08:34 PM



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