[alpha]SR wp34s



#11

PDF manual for wp34s says that [alpha]SR "takes s rightmost characters" out of alpha, but in reality it looks like it adds spaces in the beginning.
Is it a bug? Please let it be a bug.
Adding spaces on the left seems like a reasonable interpretation of "shift right", but pretty useless. PDF makes more sense.


#12

The code shifts spaces into alpha as the rightmost characters are removed.

A bug or not? This is the way it has always been. I'm sure we'll have a discussion about what the proper behaviour is once Walter wakes up and sees this :)


To get the behaviour you want, shift left after shifting right.


- Pauli


#13

When I enter "ABCD" in the alpha and then execute [a]SR 02 I get what looks like " ABCD". The way I interpreted PDF description, I expected "AB". It definietly says nothing about adding spaces, only about removing characters (which were not removed in my case).

I personally find operation that pdf describes (in my interpretation) as more useful than what it does right now.

#14

Left shift after right shift leaves alpha="ABCD" unchanged.

I just got the paper manual today but it says same thing as pdf.

for [alpha]SL:

Shifts n leftmost characters out of alpha, like ASHF in the HP-42S.

for [alpha]SR:

Works like [alpha]SL, but takes n rightmost characters instead.

A lot is open to interpretation here, but I wonder, how ASHF works in HP42s on "ABCD" with, say, 2 and with -2 as shift argument. Can anybody with HP42s shed some light on how it is in the canon?

Edited: 14 June 2013, 6:05 p.m.


#15

The 42S's ASHF command doesn't take an argument. It removes the left most six characters from alpha. Why six? This corresponds to the number of characters than can be stored into a register on the 41C.

I suspect some of the confusion here is the distinction between a proper string type and the alpha register. Alpha is fixed length. The 34S does not have a string type.


Pauli


#16

Most of our alpha commands are based on the ones of the HP-42S. At the beginning of the WP 34S project, we had a far larger alpha space in mind. Looking to the real HP-20b display, however, that became obsolete and thus the HP-42S alpha function set was a minimum we didn't want to fall below. Some functions also crept in for symmetry reasons without a real application backing them. I suspect [alpha]SR may be one of them but don't remember anymore. It would be easy to remove from the function set though.

d:-/

#17

Quote:
Alpha is fixed length. The 34S does not have a string type.

I am not sure I understand what that means. If I start with "ABCDEFGH" in alpha register and apply RR 03, I get "FGHABCDE", exactly what I expect, so it must know somehow where the string ends.


#18

Well, it knows by ALENG. And alpha rotations rotate within ALENG while alpha shifts shift the whole 30-byte register. Not really consistent. Our fault. We'll think about a better solution.

d:-)


#19

The HP-42S isn't any better ;-) You can rotate the present string by any number of characters and ALENG will stay unchanged. OTOH you can use ASHF to shift 6 characters (to the left) out of alpha and ALENG will be reduced by 6.

Our WP 34S does exactly the same, and extends shifting by allowing right shifts. If left shifts reduce ALENG, right shifts shall increase it.

I admit it confused me, too, though it's all perfectly logical.

d:-)


#20

Quote:
If left shifts reduce ALENG, right shifts shall increase it.

Logical indeed.

Possibly Related Threads...
Thread Author Replies Views Last Post
  WP-34S: Alpha lock Marcel Samek 15 590 07-08-2013, 08:23 AM
Last Post: Reth
  41-MCODE: Auto XEQ+ALPHA possible? Ángel Martin 5 275 05-29-2013, 06:15 AM
Last Post: Ángel Martin
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 156 10-04-2012, 04:59 PM
Last Post: Paul Dale
  HP-41C partially repaired, help with "ROM", alpha glitches MattMalone 2 159 09-26-2012, 02:26 AM
Last Post: Diego Diaz
  SR-52 flaky display Colin Verrilli 11 492 07-24-2012, 01:22 PM
Last Post: Colin Verrilli
  SR-52 vs 15c: more questions of NIMB nina scholz 6 296 05-27-2012, 05:59 PM
Last Post: Anders Persson
  Help wanted SR-52 nina scholz 29 967 05-16-2012, 07:48 AM
Last Post: Anders Persson
  OT--TI's SR-60 Matt Agajanian 8 369 04-25-2012, 11:34 AM
Last Post: Joerg Woerner
  HP vs TI's SR-50 Matt Agajanian 15 571 03-28-2012, 06:45 PM
Last Post: Bill Carter
  [wp34s] Incomplete Gamma on the wp34s Les Wright 18 643 12-06-2011, 11:07 AM
Last Post: Namir

Forum Jump: