Post Reply 
WP 34S: GTO.. behaviour
08-16-2014, 09:08 AM
Post: #17
RE: WP 34S: GTO.. behaviour
(08-16-2014 08:43 AM)Didier Lachieze Wrote:  Ok. Let see if I can do that without adding confusion ... ;-)

The difference in behaviour for the hot keys depends on being in program mode or not, not on the step number you are at. In program mode, A - D always provide their default function. In run mode, they do if the corresponding label isn't defined. From keys.c:

Code:
static int check_f_key(int n, const int dflt) {
    const int code = 100 + n;
    unsigned int pc = state_pc();

    if (State2.runmode) {
        if (isXROM(pc))
            pc = 1;
        if (find_label_from(pc, code, FIND_OP_ENDS))
            return RARG(RARG_XEQ, code);
    }
    return dflt;
}

The important bit is about being in run mode as opposed to program mode.


As for step 000 vs step 001 -- go to step 000 in program mode, switch to run mode and back. You're at step 001. Step 000 is a program mode only fake step to allow you to input something before step 001.

In xeq.c:

Code:
void update_program_bounds(const int force) {
    unsigned int pc = state_pc();
    if (pc == 0 && State2.runmode)
        State.pc = pc = 1;
...

So if we're in run mode, the program counter can never be zero.


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


Messages In This Thread
WP 34S: GTO.. behaviour - RMollov - 08-12-2014, 07:06 AM
RE: WP 34S: GTO.. behaviour - walter b - 08-12-2014, 07:31 AM
RE: WP 34S: GTO.. behaviour - walter b - 08-16-2014, 07:49 AM
RE: WP 34S: GTO.. behaviour - walter b - 08-16-2014, 09:04 AM
RE: WP 34S: GTO.. behaviour - Paul Dale - 08-16-2014, 11:14 AM
RE: WP 34S: GTO.. behaviour - Paul Dale - 08-16-2014 09:08 AM
RE: WP 34S: GTO.. behaviour - walter b - 08-16-2014, 09:13 AM
RE: WP 34S: GTO.. behaviour - RMollov - 08-16-2014, 09:27 AM
RE: WP 34S: GTO.. behaviour - Paul Dale - 08-12-2014, 07:42 AM
RE: WP 34S: GTO.. behaviour - Paul Dale - 08-12-2014, 09:24 AM
RE: WP 34S: GTO.. behaviour - RMollov - 08-13-2014, 12:20 AM
RE: WP 34S: GTO.. behaviour - RMollov - 08-14-2014, 10:24 AM
RE: WP 34S: GTO.. behaviour - RMollov - 08-12-2014, 10:05 AM
Ping - walter b - 08-15-2014, 06:33 PM



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