The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

41 Help !!! :-)
Message #1 Posted by Gileno - Brazil on 19 Nov 2005, 4:31 p.m.

I have a sequences of letters.
For instance ABCDEFGHIJKLM... (alpha mode, size 21 letters). 
How do I do to have only the first 3 letters?
Using the commands of HP41CX, but I don't want to use the xmemory. 
      
Re: 41 Help !!! :-)
Message #2 Posted by Vieira, Luiz C. (Brazil) on 19 Nov 2005, 5:48 p.m.,
in response to message #1 by Gileno - Brazil

Hi, Gileno;

as you have a CX, you can try this 'Mickey-Mouse' (as simple as it gets):

ATOX
ATOX
ATOX
CLA
X<> Z
XTOA
RDN
XTOA
RDN
XTOA
It does not use X-memory, only X-functions. Contents of stack registers are lost, only previous X-register contents is kept ((in Y-register). If you need more digits to be handled the same way, maybe other specific ALPHA operations would be more helpfull.

Cheers.

Luiz

            
Re: 41 Help !!! :-)
Message #3 Posted by Raymond Del Tondo on 19 Nov 2005, 7:05 p.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

Hi,

another simple solution:

Suppose you have ABCDEFGHI... in Alpha.

ASTO L  (stores the 6 leftmost chars in L, that is 'ABCDEF')
"XXX"   (replace old Alpha contents by 'XXX')
ARCL L  (appends the 6 chars from L to ALPHA, giving 'XXXABCDEF')
ASTO L  (store again, this time 'XXXABC' )
"YYY"   (replace old Alpha contents by 'YYY')
ARCL L  (append prev stored chars, giving 'YYYXXXABC')
ASHF    (shift 6 leftmost chars out. Here you are: 'ABC' ;-)

Seven steps, only uses Alpha and L register.
No X-Functions or CX needed.
Works on any HP-41;-)

Shorter version anyone, using a basic 41?

HTH

Raymond

Edited: 19 Nov 2005, 7:42 p.m.

            
Re: 41 Help !!! :-)
Message #4 Posted by Gileno - Brazil on 20 Nov 2005, 1:52 p.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

I thank all of the solutions


[ Return to Index | Top of Index ]

Go back to the main exhibit hall