Spreadsheet App for DM42

Discussion around the Swiss Micros DM42 calculator.
Jim_W
Posts: 14
Joined: Fri Mar 15, 2019 2:36 am

Re: Spreadsheet App for DM42

Post by Jim_W » Wed Apr 10, 2019 4:59 pm

Hi Eulerfan - Brilliant! I think you have a solution for my needs. I, at first, had one problem with your plan. That was my long names for my input variables. They just wouldn't fit into the VARMENU labels. Then I thought of a solution for this. A picture is worth a thousand words:
INPUT DATA:
A1: Departing Airport LAT:
A2: Departing Airport LONG:
.
.
.
A6: Whatever #6
B1: Whatever #7
.
.

I'll just name each menu label A1, A2, etc. and include these labels with the input variables on the scrollible variables list.

This should give me just what I need. I will be able to see the present values of all of my variables, I will be able to change any of the input variables if needed, and I will be able to recalculate the output variables without having to re-input all of the input variables again.

Thank you, Eulerfan. Job well done!

P.S.
One more thought - Since all of the input variables will be handled with the menu keys, instead of scrolling line by line, why not just display the first six variables all at once. Use the up and down keys to display variables 7 through 12 and so on.

Jim Williams

eulerfan
Posts: 20
Joined: Fri Aug 24, 2018 10:19 pm

Re: Spreadsheet App for DM42

Post by eulerfan » Sun Apr 14, 2019 1:51 am

Sorry for the late reply. I didn't notice that the board started a new page after my last comment, and when nothing appeared after it on that page, I thought no one had responded. This BBS really needs a more visible indication that another page is available.

Anyway, my previous suggestion wasn't brilliant, just some lazy clunky design.

A less lazy design would involve some forms features, as I alluded to earlier. I'm short of time right now to describe it, but I'll be back.

eulerfan
Posts: 20
Joined: Fri Aug 24, 2018 10:19 pm

Re: Spreadsheet App for DM42

Post by eulerfan » Mon Apr 15, 2019 6:47 am

As promised, here's the design with some simple forms features. I will approach it from four perspectives: (1) how to run a program that uses the new features; (2) how to write such a program; (3) some suggestions for the piloting program; and (4) the proposed new features for the calculator.

Of course, all this is preliminary. I will probably need to think some more. The final design may be somewhat different.



Running a Forms Program
-----------------------

Once the program has been written, running it should be reasonably convenient. The program starts by presenting some descriptive text, in narrative or tabular format, with one or more fields interspersed.

A field is just an area that shows the current value of an input variable. You can choose a field for editing by pressing the function key for that field. You can choose the fields in any order you prefer.

Once a field is chosen, it works like a one-line calculator showing the X stack register inside the field. When you choose a field, the X register gets the corresponding variable's current value. You can enter a new value for the variable, calculate an entirely new value, or use the variable's current value as a basis for calculating its new value by operating on the X register as you normally would. After each operation, the X register is automatically stored into the variable.

You can press some other function key to choose another variable. You can select the variables in any order, or you can jump directly to some variable in the middle, if you only need to change one item. Only four variables appear in the menu at any moment; use the UP and DOWN keys to see the remaining variables.

If your input form has more than one page, the remaining two function keys allow you to page up and down.

By pressing R/S, you can terminate form entry and proceed to the heart of your program.

When the program has finished crunching numbers, it can show as one or more output pages. You can use the same page-up and -down function keys to move between these pages.

Press EXIT to terminate the program.



Writing a Forms Program
-----------------------

(a) Using IPAGE and some TTY-like operations, display some descriptive text and define the input fields.

(b) Repeat for each input page. Be sure to start an input page with IPAGE.

(c) Use ISHOW to finish defining the form and start gathering input values. When ISHOW ends, all your input variables will be ready.

(d) Do the heart of your program.

(e) For each output page, do the following: Begin the page with OPAGE (a new operation). Use the new TTY-like operations to write your output.

(f) Place an OWAIT after the last output page. If you have only one output page, you don't need any OPAGE instructions but you still need OWAIT.



Suggestions for the Piloting Program
------------------------------------

I'll just suggest what you could do for each step in the recipe above.

(a) First input page:

IPAGE
"Departure latitude (DLAT): "
TEXT 1,1
FIELD 5, "DLAT"
"Departure longitude (DLONG): "
TEXT 2,1
FIELD 5, "DLONG"

et cetera.

"IPAGE" starts an input page and clears the display.

"TEXT r,c" displays the alpha register at row r and column c, moving the current output location to the character immediately after the last character displayed.

"FIELD w,var" defines an input field at the current output location, moving the location afterwards. The field has width w and is attached to the variable named "var". This operation also makes a function key with "var" displayed in the menu.

(b) Next input page.

IPAGE
"Arrival latitude (ALAT): "
OTEXT 1,1
FIELD 5, "ALAT"
"Arrival longitude (ALONG): "
OTEXT 2,1
FIELD 5, "ALONG"

Do something similar for the remaining pages.

(c) Do ISHOW. Until now, the calculator only saves what you defined in steps a and b. On ISHOW, the calculator displays the first input page and starts responding to your keyboard actions. When you press R/S to terminate ISHOW, all your input variables will be ready.

(d) The heart of your program is up to you.

(e) First output page:

OPAGE
"Heading (dd.mmss): "
TEXT 1,1
<compute heading, leaving value in X>
NUM
"Air speed (knots): "
<compute air speed>
NUM

et cetera

Do something similar for the remaining pages.

(f) Do an OSHOW. Until now, the calculator only saves the previous step's output. OSHOW actually displays the first output page and starts responding to your keyboard actions. You can terminate your program by pressing R/S or EXIT.



Proposed New Features
---------------------

IPAGE
TEXT
FIELD
ISHOW
OPAGE
OSHOW

On second thought, maybe this is too elaborate. Maybe the previous lazy proposal would be simpler, easier to use. What do you think?

Jim_W
Posts: 14
Joined: Fri Mar 15, 2019 2:36 am

Re: Spreadsheet App for DM42

Post by Jim_W » Mon Apr 15, 2019 5:23 pm

Good Morning, Eulerfan -My! You really have been thinking about my request. I see both pro's and con's in both of your proposals. I'll call your first proposal (using menuvar) No. 1 and this proposal (using TEXT r,c) No. 2. I hope that other people that are following this thread will offer their ideas too.

First, I think that I agree with you in that No. 1 might be a little easier to use. It is straight forward and works pretty much like we are use to - at least for me (HP42s). But, since I don't have my DM42 yet and don't have any experience using one, it is probably not fair for me to say how hard or easy using No. 2 would be. However, I really like the concept of TEXT r,c! The DM42 has a lot of improvements over the HP42s, not the least of which is its display. I would really like to see that display used to its full potential. No. 2 seems to be doing that.

It would be nice if SwissMicros could build an PC emulator for the dm42. Or even just a display emulator. I would like to be able to type things (like forms) and see them on my PC screen as they would appear on the DM2's screen. In the mean time, I am going to use my word possessor to see if I can make my own emulator. BTW, the calculator's display is 8 rows by 36 charters, right? Anyway, I'll play with my home made emulator to see what No.2 would look like and then post again to let you know what I think. There is some advantage to seeing several variable values on one page over just seeing a rolling single list of the variables.

Jim Williams

keithdalby
Posts: 544
Joined: Mon Apr 24, 2017 6:38 pm

Re: Spreadsheet App for DM42

Post by keithdalby » Mon Apr 15, 2019 8:20 pm

The way I see it, we have a way to produce text strings anywhere on the screen (cannot link to the thread, cannot remember where it was mentioned). We have a way of detecting key presses. We should, therefore, be able to make a simple form. All it'd take is some grunt work to make it.

A lot of grunt work.

More grunt work than I'm motivated to do.

User avatar
Walter
Posts: 1072
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Spreadsheet App for DM42

Post by Walter » Mon Apr 15, 2019 8:38 pm

Jim_W wrote:
Mon Apr 15, 2019 5:23 pm
... BTW, the calculator's display is 8 rows by 36 charters, right? ...
The screen has 240 x 400 pixels. Anything what fits in this area is possible in principle. Each pixel is 0.147 mm square.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

Jim_W
Posts: 14
Joined: Fri Mar 15, 2019 2:36 am

Re: Spreadsheet App for DM42

Post by Jim_W » Mon Apr 15, 2019 11:03 pm

Hi All - Well, I have played with my "home made" emulator and am I surprised! Gee, 8 rows of lines with 36 charterers in each line sound like a lot - especially after working with 2 lines with 21 charters per line for so many years (HP42s). Well, here is a copy of my emulator display. I have added ..... so that it looks right om this post:

R1..Departure Latitude: ……………………42.1234
R2..Departure Longitude:………………….112.1234
R3..Arrival Latitude:…………………………40.1234
R4..Arrival Longitude:…………..…………110.1234
R5..TAS (kts):………………………..…………115
R6..Wind Direction (Degrees):……….…330
R7..X:
R8..111111222222333333444444555555666666

The R1.. thru R8.. are there so I can talk about individual rows. They are not part of the display. R8 represents the menu labels. R7 is the line on which we can type (X register). R1 thru R6 are the text lines showing input variables and their values.

What I am so surprised about is how fast the display real estate goes. I thought that showing two variables with their values on each line would be possible. Obviously I was wrong. I guess it could be done if I used variable names like "DLAT", but I have so many programs in my calculators that I really want to use descriptive variable names.

So, with this realization, I think Eulerfan's first proposal would meet my needs the best. A scrolling list (up and down scrolling) of just one variable name and its value per row, I believe, would be the most clear and easy to use method. Using the menu keys to change values works out too. i.e. - six rows to show six variables and six menu keys!

Jim Williams

eulerfan
Posts: 20
Joined: Fri Aug 24, 2018 10:19 pm

Re: Spreadsheet App for DM42

Post by eulerfan » Tue Apr 16, 2019 4:52 am

keithdalby wrote:
Mon Apr 15, 2019 8:20 pm
The way I see it, we have a way to produce text strings anywhere on the screen (cannot link to the thread, cannot remember where it was mentioned). We have a way of detecting key presses. We should, therefore, be able to make a simple form. All it'd take is some grunt work to make it.

A lot of grunt work.

More grunt work than I'm motivated to do.
The situation isn't so bad.

Most of the work will be replicating the Swiss Micro build environment. That won't be easy; it may not even be possible, if Swiss Micros is unable to release some software (such as the RTOS, the FAT file system, or the HTML browser).

When I can actually rebuild DMCP and their version of Free42, the actual modification will be rather easy.

eulerfan
Posts: 20
Joined: Fri Aug 24, 2018 10:19 pm

Re: Spreadsheet App for DM42

Post by eulerfan » Tue Apr 16, 2019 4:56 am

Jim_W wrote:
Mon Apr 15, 2019 11:03 pm
Hi All - Well, I have played with my "home made" emulator and am I surprised! Gee, 8 rows of lines with 36 charterers in each line sound like a lot - especially after working with 2 lines with 21 charters per line for so many years (HP42s). Well, here is a copy of my emulator display. I have added ..... so that it looks right om this post:

R1..Departure Latitude: ……………………42.1234
R2..Departure Longitude:………………….112.1234
R3..Arrival Latitude:…………………………40.1234
R4..Arrival Longitude:…………..…………110.1234
R5..TAS (kts):………………………..…………115
R6..Wind Direction (Degrees):……….…330
R7..X:
R8..111111222222333333444444555555666666

The R1.. thru R8.. are there so I can talk about individual rows. They are not part of the display. R8 represents the menu labels. R7 is the line on which we can type (X register). R1 thru R6 are the text lines showing input variables and their values.

What I am so surprised about is how fast the display real estate goes. I thought that showing two variables with their values on each line would be possible. Obviously I was wrong. I guess it could be done if I used variable names like "DLAT", but I have so many programs in my calculators that I really want to use descriptive variable names.

So, with this realization, I think Eulerfan's first proposal would meet my needs the best. A scrolling list (up and down scrolling) of just one variable name and its value per row, I believe, would be the most clear and easy to use method. Using the menu keys to change values works out too. i.e. - six rows to show six variables and six menu keys!

Jim Williams
I can understand your needs a little better now. As you probably noticed, I wasn't totally satisfied with the first two designs, so Mark 3 is coming up. I'm short of time again, but I'll be back.

keithdalby
Posts: 544
Joined: Mon Apr 24, 2017 6:38 pm

Re: Spreadsheet App for DM42

Post by keithdalby » Tue Apr 16, 2019 5:54 am

eulerfan wrote:
Tue Apr 16, 2019 4:52 am
Most of the work will be replicating the Swiss Micro build environment.
What I meant was that a suitably motivated user can design a forms program within the current DM42 implementation of Free42.

Post Reply