Spreadsheet App for DM42

Discussion around the Swiss Micros DM42 calculator.
eulerfan
Posts: 20
Joined: Fri Aug 24, 2018 10:19 pm

Re: Spreadsheet App for DM42

Post by eulerfan » Wed Apr 17, 2019 5:21 am

eulerfan wrote:
Mon Apr 15, 2019 6:47 am
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.
Okay, here is Mark 3. It's like the second proposal except that the calculator won't have to remember the input and output forms, only the fields. Mark 3 relies on active code to regenerate each input or output page on demand.

If you only need a single input or output page, you would only have to do something like this:

CLD
"Departure latitude (DLAT) (ddd.mmss): "
TEXT 1,1
FIELD 7, DLAT
"Departure longitude (DLONG) (ddd.mmss): "
TEXT 2,1
FIELD 7, DLONG
WAIT

By default, WAIT just pauses the program and doesn't splash the stack display on the screen. As with my second proposal, you would use a function key to choose a field. Once chosen, the field behaves like a one-line calculator (similar to the old-time HP-25) showing the current value of the variable attached to that field. You could operate on that value, which is in the X register, in the usual RPN fashion. After each operation, the result would be shown inside the field and also stored in the variable. At any time, you could press another function key to choose another field. Or you could press R/S to terminate your input and continue with the heart of your program.

Code for an output page would be similar to the above. You could use FIELD instructions to show the value of the output variables. You would still need a WAIT.

By default, WAIT does not define any page-up or page-down function keys, reacts to R/S by immediately resuming execution at the next program instruction, and terminates execution if you press EXIT. This is probably what you would want if you have only one input or output page. In that case, something like the above is what you would need to write.

For more than one input or output page, you would precede the WAIT with KEYG instuctions that tell the calculator where to go for function keys f5 and f6 (normally page-up and page-down), R/S, and/or EXIT. At a destination would be code similar to the above, if the destination is another page; code for your main program; or an RTN to terminate execution.

This Mark 3 design should be reasonably easy to write code for, and reasonably convenient to operate when your program is running. What do you think?

EDIT: fixed the coordinates for the second TEXT. Other minor changes.
Last edited by eulerfan on Wed Apr 17, 2019 6:44 pm, edited 2 times in total.

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

Re: Spreadsheet App for DM42

Post by eulerfan » Wed Apr 17, 2019 5:24 am

keithdalby wrote:
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.
Well, whoever does this would need a lot of motivation, surely. Almost any solution would be easier than the one you imply (implementing a mini-Free42 inside Free42).

Which is why I said that the situation isn't so bad -- assuming that I can replicate the proper build environment. However, installing the build environment might not be possible if Swiss Micros can't release some key components, like the HTML viewer. If I can't rebuild the firmware, that would be a show stopper, and your solution might be necessary.

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

Re: Spreadsheet App for DM42

Post by Jim_W » Thu Apr 18, 2019 3:23 pm

Hi Eulerfan - Mark 3 sounds great to me. If I understand it right, it would work (entering input data) pretty much like a spreadsheet - Just use the menu keys to chose the various fields. Using the new programming commands seems to be straight forward too. Thank you! - Jim Williams

Post Reply