Post Reply 
41 MCODE - Floating FIX Mode (Fix ALL)
02-15-2015, 06:42 PM (This post was last modified: 02-15-2015 06:43 PM by Ángel Martin.)
Post: #4
RE: 41 MCODE - Floating FIX Mode (Fix ALL)
Implementation Details – a MCODE digression.

Taking advantage of the I/O_SVC Interrupt is not easy to implement, even if conceptually simple. For starters, one needs to keep in mind that the event is triggered after the operations have occurred – thus is not to be mistaken with a code break during the execution.

Then there is also the fact that a constant polling of the I/O_SVC will introduce noticeable overhead on the system performance, thus one needs to carefully choose the instances and scenarios where the supplemental code is to be run. Doing it too often will cause annoying delays, but missing some will result in an inconsistent or incomplete implementation of the added functionality.

To make it more complicated, this technique is also used by other modules that the implementation here needs to be compatible with. Not an easy task; you probably know that the ZENROM and the CCD Module are not compatible, and that the AECROM takes over all the attention to maintain the results in the chosen unit (Foot, meters, inch fractions).

The criteria followed by the SandMath is full compatibility with the AMC_OS/X and CCD-style modules, regardless of the order they are plugged in the machine. That’s why the criteria needs to go to lower-level conditions (like pending addresses in the RTN stack and keycodes for the pressed keys) instead og more general events, like parsing OS routines.

Here’s the conditional tree used to qualify I/O events into triggering points in the SandMath.

General conditions:

1. Is Alpha ON? - Ignore if true.
2. Is the 1st. RTN address from the OS ROM_0 / ROM_1? - Ignore if False.

Conditions for the Floating FIX mode:

3. Is the message flag ON? - Ignore if true.
4. Is the 1st. RTN address = 00F0 [NFRPU], or 0CCA [STO], or 10DA [AJ]? - Ignore if False

Conditions for the RCL Math and Prompt Lengtheners

5. Is the 1st. RTN adr = 0CDE [PAR110]? - Mid term of a 2-digit prompt when True
a. Further check on keycode to exclude XEQ, replace it otherwise.

6. Is the 1st. RTN adr = 0D22 [PARA05]? – Mid term of a 1-digit prompt when True
a. Further check on keycode to exclude CAT, replace it otherwise

7. Is the 1st. RTN adr = 0DC4 [IND20] ? IND prompt situation when True
a. Is the 2nd. RTN adr = 122E [RCL]? – Replace the first adr when True (IND 1_ _ )

Say what?, Not a Fool-Proof result !

One last word about the expected results:- This is a good example of the additional difficulty arising from the afterthought nature of a task that would be basically simple had it been done integrated into the OS. Coming from behind the OS to supplement/complement its doings is not the best way to implement this functionality, which ideally belongs to the OS displaying routines instead. Thus you’ll find some instances when the Floating FIX mode won’t kick in, like using STO and then numeric keys (but note that it does work using the top-two rows, A-J).

I have tested the outcome of all functions within the SandMath, modifying some of them to make sure that they provide the triggering conditions for the Floating mode to operate. With other modules the implementation may have some glitches, depending on how their functions were written.

There is currently a limitation for some functions when you execute them using the LASTFunction method, so be aware of that as well.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: 41 MCODE - Floating FIX Mode (Fix ALL) - Ángel Martin - 02-15-2015 06:42 PM

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