(15C) Operating System: mzOS
04-08-2018, 11:07 PM (This post was last modified: 04-09-2018 09:23 AM by Michael Zinn.)
Post: #1
 Michael Zinn Member Posts: 56 Joined: Mar 2018
(15C) Operating System: mzOS

mzOS is an operating system that allows you to define program mappings for the five user keys A, B, C, D and E that you can then switch easily with just two keystrokes. This is an improvement over having to move labels A-E around in the program whenever you want to remap A-E.

Example Program Label Layout

Suppose you have these programs installed (internal labels are used by the program preceeding it):

Code:
 0: xth root of y  1: log_x(y)  2: y mod x  3: configurable dice rolls  4:   (internal)  5: convert to binary  6:   (internal)  7: vSTO  8: vRCL  9:   (internal) 10: Budget 1 11: Budget 2 12: Cash Register: Entry 13: Cash Register: Done 14: Cash Register: Change 15: Cash Register: Bye 16: Cash Register: Abort 17: Days of Month 18: Remap 19: [mzOS]  A: [mzOS]  B: [mzOS]  C: [mzOS]  D: [mzOS]  E: [mzOS]

mzOS reads register 19 as the mapping of the user keys. E.g. if you store 1615141312 in R19 you will have the "Cash Register" programs on A through E available (Read the number as 5 separate 2 digit numbers). Whenever you want to remap your User keys just store a new mapping number in register 19.

The Remap Program

Instead of storing 10 digit mapping numbers into register 19 manually you can use the Remap program.

Put GTO 18 in line 001 of program memory to make it possible to use the R/S key to start the Remap program easily. That way you won't have to assign Remap to one User key in every mapping.

Put your favorite mappings into registers 10 and up. Example:

Code:
Mapping Comment       Register Value      A       B       C        D      E       ------- ------------- -------- ---------- ------- ------- -------- ------ -------       0 Utilities           10 1110170708 Budget2 Budget1 days     vSTO   vRCL          1 Math                11 0005010203 XrootY  toBin   log_x(y) YmodX  dice          2 Cash Register       12 1615141312 CRabort CRbye   CRchange CRdone CRentry

You can now do 1 R/S to switch to Math mode, then do 42 B to convert 42 to binary, then do 2 R/S and use your calculator as a cash register and finally switch to utility mode with 0 R/S to figure out how much days September has using 9 C.

The idea is that you put programs that you use together in the same mapping. That way, you don't have to remap too often and can start your programs with just one key stroke.

Editing Mapping with vSTO

If you have vSTO installed (gives you five times as many two digit virtual registers) you can store program numbers into virtual registers.

Virtual memory map:
Code:
Virtual Register Content  ---------------- ----------------               50 Mapping 0 E               51 Mapping 0 D               52 Mapping 0 C               53 Mapping 0 B               54 Mapping 0 A               55 Mapping 1 E               55 Mapping 1 D              ... ...               95 Active Mapping E               96 Active Mapping D               97 Active Mapping C               98 Active Mapping B               99 Active Mapping A

Notice that editing the active mapping is only temporary, it will be overwritten by Remap.

mzOS Source Code

This is the minimal version, you can use this by storing mappings in register 19 manually:

Code:
; loader LBL .9   10^x   STO I   R v   RCL .9   RCL / I   FRAC   STO I   R v   2   10^x   STO * I   R v   GTO I ; user keys LBL A   1   0   GTO .9 LBL B   8   GTO .9 LBL C   6   GTO .9 LBL D   4   GTO .9 LBL E   2   GTO .9

Remap Source Code

Not needed to use mzOS, but it makes remapping a lot more convenient. Either put 18 in every mapping or put GTO 18 in line 001 and start it with R/S.

Code:
LBL .8   STO I   CLx   1   0   STO + I   CLx   RCL (i)   STO .9   RTN

This whole thing is a work in progress so please comment and give me feedback.
04-09-2018, 04:58 AM
Post: #2
 grsbanks Senior Member Posts: 988 Joined: Jan 2017
RE: (15C) Operating System: mzOS
Don't know if you're aware of this but placing the 15C in USER mode also allows you to start programs A-E with one keystroke...
04-09-2018, 09:13 AM (This post was last modified: 04-09-2018 09:19 AM by Michael Zinn.)
Post: #3
 Michael Zinn Member Posts: 56 Joined: Mar 2018
RE: (15C) Operating System: mzOS
(04-09-2018 04:58 AM)grsbanks Wrote:  Don't know if you're aware of this but placing the 15C in USER mode also allows you to start programs A-E with one keystroke...

Yes, and using my program you can remap the A-E keys quickly. So one moment you'll use A-E in USER mode as a cash register, the next moment you remap them to your five favorite math functions and so on.

I'm curious, could you tell me what you thought this program does so I can make the description clearer?
04-09-2018, 09:15 AM
Post: #4
 grsbanks Senior Member Posts: 988 Joined: Jan 2017
RE: (15C) Operating System: mzOS
(04-09-2018 09:13 AM)michaelzinn Wrote:  I'm curious, what did you think my program does?

I didn't look into it in any detail, I just read the headline:

Quote:mzOS is an operating system that allows you to remap the five user keys A, B, C, D and E so you can easily start a program with just one key stroke instead of two or three like you would have to with GSB.

...and I thought, that's exactly what USER mode does!
04-09-2018, 09:24 AM
Post: #5
 Michael Zinn Member Posts: 56 Joined: Mar 2018
RE: (15C) Operating System: mzOS
(04-09-2018 09:15 AM)grsbanks Wrote:
(04-09-2018 09:13 AM)michaelzinn Wrote:  I'm curious, what did you think my program does?

I didn't look into it in any detail, I just read the headline:

Quote:mzOS is an operating system that allows you to remap the five user keys A, B, C, D and E so you can easily start a program with just one key stroke instead of two or three like you would have to with GSB.

...and I thought, that's exactly what USER mode does!

Thank you for that feedback! I changed the first sentence to "mzOS is an operating system that allows you to define program mappings for the five user keys A, B, C, D and E that you can then switch easily with just two keystrokes. This is an improvement over having to move labels A-E around in the program whenever you want to remap A-E.".
04-09-2018, 01:05 PM
Post: #6
 gardel Junior Member Posts: 2 Joined: Oct 2017
RE: (15C) Operating System: mzOS
If you're looking for feedback, I'd say that calling this an operating system will confuse people. I clicked on this thread expecting to read about some sort of replacement firmware for the HP 15C. :-)
04-09-2018, 02:52 PM
Post: #7
 Michael Zinn Member Posts: 56 Joined: Mar 2018
RE: (15C) Operating System: mzOS
(04-09-2018 01:05 PM)gardel Wrote:  If you're looking for feedback, I'd say that calling this an operating system will confuse people. I clicked on this thread expecting to read about some sort of replacement firmware for the HP 15C. :-)

I thought about calling it a shell or a bank switcher, but Operating System sounds way cooler.

It's also not that wrong given that it's a program that runs directly on the hardware and allows you to manage and run other programs indirectly.
04-09-2018, 09:33 PM
Post: #8
 rprosperi Senior Member Posts: 3,905 Joined: Dec 2013
RE: (15C) Operating System: mzOS
(04-09-2018 02:52 PM)michaelzinn Wrote:
(04-09-2018 01:05 PM)gardel Wrote:  If you're looking for feedback, I'd say that calling this an operating system will confuse people. I clicked on this thread expecting to read about some sort of replacement firmware for the HP 15C. :-)

I thought about calling it a shell or a bank switcher, but Operating System sounds way cooler.

It's also not that wrong given that it's a program that runs directly on the hardware and allows you to manage and run other programs indirectly.

Michael - You'll find that folks here don't dislike cool, but they do like accurate a lot more.

--Bob Prosperi
04-10-2018, 03:18 AM
Post: #9
 Gerson W. Barbosa Senior Member Posts: 1,258 Joined: Dec 2013
RE: (15C) Operating System: mzOS
(04-09-2018 09:33 PM)rprosperi Wrote:  Michael - You'll find that folks here don't dislike cool, but they do like accurate a lot more.

Precisely! (Even though I am accurate only occasionally myself :-)
04-10-2018, 01:27 PM
Post: #10
 Michael Zinn Member Posts: 56 Joined: Mar 2018
RE: (15C) Operating System: mzOS
(04-09-2018 09:33 PM)rprosperi Wrote:
(04-09-2018 02:52 PM)michaelzinn Wrote:  I thought about calling it a shell or a bank switcher, but Operating System sounds way cooler.

It's also not that wrong given that it's a program that runs directly on the hardware and allows you to manage and run other programs indirectly.

Michael - You'll find that folks here don't dislike cool, but they do like accurate a lot more.

I thought about this some more and given where I want to go with this project (system calls, memory management) I came to the conclusion that it will end up more being an OS than being a shell.
04-11-2018, 06:47 PM
Post: #11
 Michael Zinn Member Posts: 56 Joined: Mar 2018
RE: (15C) Operating System: mzOS
Here's a version that supports 100 programs (using vGTO and vRCL).

To distinguish real and virtual labels you have to add 20 to the vLabel number before putting it in a configuration number. For example, the configuration number 2309420099 would point to vLBL 3, LBL 9, vLBL 22, LBL 0, vLBL 79.

Code:
LBL A   4   GTO .9 LBL B   3   GTO .9 LBL C   2   GTO .9 LBL D   1   GTO .9 LBL E   0   GTO .9 LBL .9   9   5   +   vRCL   STO I   20   x <= y     GTO .9   R \/   R \/   GTO I   LBL .9     -     vGTO
 « Next Oldest | Next Newest »

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