HP Forums
41 "Second Shift" - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: 41 "Second Shift" (/thread-158636.html)

41 "Second Shift" - Ángel Martin - 10-29-2009

I've come up with an idea for a "second shift" key on the 41. If you're like me, you rarely use the SIGMA+/- functions, so would appreciate using that key for something else instead (replace it with your most hated key if that's not the case).

Using the partial data entry routines it's relatively simple to make any key a launcher for other functions, as though they were assigned to the keys. Let's call it the RED shift key - blue is obviously taken by the Alpha keyboard). Its response is based on the pressed key codes, and it supports both shifted and unshifted selections (yellow shift).

Using other mainframe routines the behavior is identical to that of the native functions: the function name is read from the rom's FAT table and displayed while the key is depressed, and the NULL message is shown if maintained for the timeout time. A real charm, if you ask me.

On an emulator this scheme is easily completed by coloring the key and changing its face legend. I've got my 41V changed to that effect, and the legend is "Z" - as I use my red shift key to launch all the complex equivalent functions. Note that this only requires ONE key assignment, the function assigned to the RED key will do the selection work. Saves memory, your USER keyboard is free, and it's faster. You need to see it... will be added to the posted 41Z in a few days.

Now the finishing touches. I've been trying to use the "G" annunciator to flag this RED shift key usage. The idea is to have it come up while the key selection sequence is going on, and come off upon completion. Unfortunately so far I haven't managed - it's intimately linked to the RAD / GRAD selection, and it appears to have a life of its own despite my attempts to command its individual action.

In theory one can use WRITDATA with bit 9 set on C(S&X) - see Ken Emery's book - but that doesn't cut it. Not even the service ROM makes use of the "G" annunciator alone - I'm beginning to wonder whether it's possible at all?

Here's the routine I use to toggle its status - not working- , maybe you can spot the faulty bits:
(the display is enabled when calling it)

178 READ 5(M)

23C RCR 2

3D8 C<>ST

30C ?FSET 1

01F JC +03

308 SETF 1

013 JNC +02

304 CLRF 1

3D8 C<>ST

37C RCR 12



Any ideas please?


Edited: 29 Oct 2009, 4:33 a.m.

Re: 41 "Second Shift" - Eric Smith - 10-29-2009

Turning the G annunciator on isn't a problem. There's just no way to prevent the mainframe ROM from updating it as soon as it gets control back. The "message" flag prevents an update of the character data and punctuation, but it doesn't prevent the annunciators from being updated.

Re: 41 "Second Shift" - Ángel Martin - 10-29-2009

The mainframe roms make frequent use of the [ANN_14] routine to "refresh" the status of the annunciators, and I suspect that must also happen when the NEXT1 routine yields to go ligh sleep...

Yet routines like DSPTEST manage to light them all up at once, and they aren't overridden by the mainframe. That's the intriguing part, won't you think"?

Well, so be it. The RED shift works regardless of that little cosmetic detail, so it really doesn't matter much.

Edited: 29 Oct 2009, 8:11 a.m.

Re: 41 "Second Shift" - Garth Wilson - 10-29-2009

How about using two different pitches of very short chirp of the beeper to indicate the red shift going on and off. It's not ideal, but might help.

Re: 41 "Second Shift" - Ángel Martin - 10-30-2009

it's an idea, and can be controlled with user flag 26 of course.
For visual feedback I use the text "CMP: Z_" on the display, so it's quite clear as well. It gets completed with the function name once the corresponding key is pressed.

For instance, pressing RED_Shift, SIN will display: "CPM: ZSIN"

and pressing RED_Shift, SHIFT, SIN shows "CMP: ZASIN".

Other interesting keystrokes, including hyperbolics, are:

RED_Shift, RED_Shift, TAN -> "CMP: HYP ZTANH"


RED_Shift, RCL -> "CMP: ZRCL _ _" (yes, prompting and with IND support)


Edited: 30 Oct 2009, 2:33 a.m.

Re: 41 "Second Shift" - Eric Smith - 10-30-2009

I'm not familiar with DSPTEST. Does it yield control back to the mainframe ROMs?

Re: 41 "Second Shift" - Garth Wilson - 10-30-2009

It sounds excellent, since, if you get confused or change your mind and don't remember where you left it in the toggling after pressing RED_shift a few times, it still lets you know when you press the final key and hold it to see what the function will be, possibly long enough to get the "NULL" if it's not what you wanted.

Re: 41 "Second Shift" - Ángel Martin - 10-30-2009

No, it doesnt - that's how it achieves the feat, by going light sleep forced with POWOFF - and it also sets the msg flag right before doing so. So you were right, as usual. Many thanks for your insight.