41-MCODE: Auto XEQ+ALPHA possible?



#3

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, ÁM


#4

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

#5

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


#6

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.


#7

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.


#8

Thanks Håkan, 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,
ÁM


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 147 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  ILPer with "auto-extended addressing" Christoph Giesselink 0 151 07-23-2013, 03:28 PM
Last Post: Christoph Giesselink
  WP-34S: Alpha lock Marcel Samek 15 578 07-08-2013, 08:23 AM
Last Post: Reth
  [alpha]SR wp34s Andrew Nikitin 9 345 06-17-2013, 11:48 PM
Last Post: Andrew Nikitin
  HP 41 Mcode related Questions Michael Fehlhammer 4 246 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  HP-41C partially repaired, help with "ROM", alpha glitches MattMalone 2 157 09-26-2012, 02:26 AM
Last Post: Diego Diaz
  41-MCODE: Breaking the FAT barrier. Ángel Martin 0 116 09-03-2012, 06:31 AM
Last Post: Ángel Martin
  41-MCODE: Dr. Jekyll & Mr. Hyde Ángel Martin 9 370 07-09-2012, 09:41 AM
Last Post: Monte Dalrymple
  41CL auto turbo? Paul Dale 2 155 06-26-2012, 07:27 PM
Last Post: Paul Dale
  HP41C: Factorial (kind of) in MCODE Frido Bohn 7 331 05-26-2012, 09:18 AM
Last Post: Frido Bohn

Forum Jump: