Post Reply 
HP35s RPN Series # 3 [ENTER]
02-19-2015, 08:53 PM
Post: #14
RE: HP35s RPN Series # 3 [ENTER]
(02-18-2015 11:37 PM)Sanjeev Visvanatha Wrote:  
(02-18-2015 08:24 PM)MarkHaysHarris777 Wrote:  What makes [ENTER] a conundrum?

[ENTER] causes confusion because its called 'ENTER' and because it really doesn't enter anything.

It enters the X register value into the Y register. I have always thought of it as "STO Y". This is what it does in its simplest sense. The named function of STOring to a stack register did not exist at the time the earliest HP RPN machines came out.


I've been thinking about your comment today, also in light of the discussion going on in the WP34s forum regarding allowing 'entry' RPN as a configurable alternative. Of course, I don't have any idea how the engineers of the HP35s implemented [ENTER] precisely, because it is not an open platform. The WP34s, on the other hand, is an open platform and we can take a look at some of its code:

Code:


/* Decode and process the specials.  These are niladic functions and
 * commands with non-standard stack operation.
 */
static void specials(const opcode op) {
    int opm = argKIND(op);

    switch (opm) {
    case OP_0:    case OP_1:    case OP_2:
    case OP_3:    case OP_4:    case OP_5:
    case OP_6:    case OP_7:    case OP_8:
    case OP_9:    case OP_A:    case OP_B:
    case OP_C:    case OP_D:    case OP_E:
    case OP_F:
        digit(opm - OP_0);
        break;

    case OP_DOT:
        if (is_intmode())
            break;

     . . .  {code snipped here for clarity}


    case OP_ENTER:             <======== this is what we're interested in
        process_cmdline();
        lift();
        clr_lift();
        break;

You will notice that OP_ENTER does the three things I noted in my article: 1) process the command line {parsing, error checking, terminates keyboard numeric entry}, 2) initiate stack lift {this is the hefty work of [ENTER]}, and 3) clear the 'lift' state {cancels lift for the next keyboard command line activity}

This switch-case statement is handling (partially) commands that have non standard stack operations (and there are quite a few which I have snipped away to simplify things here). This is what makes [ENTER] a conundrum for RPN methodology. It really doesn't DO what its name implies, and it DOES do things that the user does not understand... even if they can observe them and describe them... each person comes away with their own interpretation of what [ENTER] means (for them, and for the system!)


Cheers,
marcus
Smile

Kind regards,
marcus
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP35s RPN Series # 3 [ENTER] - MarkHaysHarris777 - 02-19-2015 08:53 PM
RE: HP35s RPN Series # 3 [ENTER] - Tugdual - 02-19-2015, 08:37 AM



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