The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

41-MCODE: Auto XEQ+ALPHA possible?
Message #1 Posted by 聲gel Martin on 27 May 2013, 11:42 a.m.

Here's a tricky one for the MCODE gurus - I've given up after a several futile attempts to crack this one.

It's about setting a prompting function to take ALPHA input in the prompt, like COPY does. So far no sweat, it's just a matter of properly setting the op1 and op2 digits in the first two bytes of the function name; typically to "1" and "2" respectively.

But the twist consists of eliminating the second pressing of the ALPHA key , so it's then possible to start typing the characters right on:

current behavior:
XEQ, ALPHA, "COPY", ALPHA, ALPHA, "FNAME", etc...

desired behavior:
XEQ, ALPHA, "COPY", ALPHA, "FNAME"

i.e. the first thing the function should do is activate ALPHA, then wait in a light sleep condition with the partial key sequence on.

I tried setting User flag 48 right before calling the function - that activates ALPHA at the prompt, yet no key entry is allowed util ALPHA is pressed again.

Any ideas how to tackle this one tapping into the [PARSE] OS routines? Really didn;t want to re-write the whole prompt handing using [NEXTxx] routines, that would be a lot of code for such feat.

Best, 簍

      
Re: 41-MCODE: Auto XEQ+ALPHA possible?
Message #2 Posted by Mike (Stgt) on 28 May 2013, 7:39 a.m.,
in response to message #1 by 聲gel Martin

Do you really want to change the protocol of internals like COPY? If you want special behaviour of plug-in functions, well then you are free _not_ to use the op1&2 digits in the function name. Not tested, but quite sure I assume you may do something similar as AON and PROMPT in MCode too.

Ciao.....Mike

      
Re: 41-MCODE: Auto XEQ+ALPHA possible?
Message #3 Posted by H嶡an Th顤ngren on 29 May 2013, 2:44 a.m.,
in response to message #1 by 聲gel Martin

Do you want to change existing functions like COPY, or is it for new similar prompting functions in your own XROM?

            
Re: 41-MCODE: Auto XEQ+ALPHA possible?
Message #4 Posted by 聲gel Martin on 29 May 2013, 3:51 a.m.,
in response to message #3 by H嶡an Th顤ngren

It's for functions in the PowerCL and SandMath BS - I'd not attempt to change COPY or other native OS function, only mentioned to explain the situation.

While not a dramatic impact it does have however some usability enhancement gains, there's too much ALPHA key pressing at the moment, mostly to call the sub-functions in the secondary FATs.

The HEPAX also suffers from the same issue with HEPAXA and XFA - BTW the manual mentions some OS bug that stopped them from making a single prompting function that would accept both numeric and Alpha arguments (like XEQ or GTO do), so they had to implement two functions HEPAX/HEPAXA and XF/XFA for each sub-FAT.

So I guess this is probably a can't-do subject but wanted to check anyway.

Edited: 29 May 2013, 3:52 a.m.

                  
Re: 41-MCODE: Auto XEQ+ALPHA possible?
Message #5 Posted by H嶡an Th顤ngren on 29 May 2013, 4:09 a.m.,
in response to message #4 by 聲gel Martin

The easiest way is to use the IO poll vector and detect that your function is asking for input and have not set ALPHA. Then just change the parse state to be the same as if ALPHA has been pressed from the keyboard.

You probably want to use a debugger to compare the state before and after ALPHA is pressed. State consists of parse nibbles, user flags, function being invoked and return stack if I remember it right.

                        
Re: 41-MCODE: Auto XEQ+ALPHA possible?
Message #6 Posted by 聲gel Martin on 29 May 2013, 6:15 a.m.,
in response to message #5 by H嶡an Th顤ngren

Thanks H嶡an, I was afraid this needed to be done using the I/O interrupt - but if that's the easiest way then I don't want to even think about the more difficult ones!

To be honest I wouldn't know where to start - just vague ideas on how to filter the specific IO event from all the zillions of them. Besides I've run out of room for something as involved as this, so I think I'll postpone this embellishing enhancement for a better time - it's on my "To-Learn" list for the future though.

A new revision of the PowerCL is about to be released, adding IOBUS - an I/O Bus function launcher with information on which pages are free, used, or bank-switched. Also a new ALPHA$ launcher groups many string manipulation (sub)functions so there's no need to call them using the XEQ1/XEQ2 approach - with their repeat-ALPHA pressing, that's why these are related to the original subject.

Best, 簍


[ Return to Index | Top of Index ]

Go back to the main exhibit hall