Page 5 of 5

Re: Spreadsheet App for DM42

Posted: Wed Apr 17, 2019 7:21 am
by eulerfan
eulerfan wrote:
Mon Apr 15, 2019 8: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:

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

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.

Re: Spreadsheet App for DM42

Posted: Wed Apr 17, 2019 7:24 am
by eulerfan
keithdalby wrote:
Tue Apr 16, 2019 7:54 am
eulerfan wrote:
Tue Apr 16, 2019 6: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.

Re: Spreadsheet App for DM42

Posted: Thu Apr 18, 2019 5:23 pm
by Jim_W
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

Re: Spreadsheet App for DM42

Posted: Tue Jun 25, 2019 4:57 pm
by Jim_W
Hi Eulerfan and all others. After thinking about my 'spreadsheet proposal' for the last couple of months, I've thought of another solution I'd like to bounce off of you. Basically, all I need is a way to see all of my variable names along with their values and the ability to change each individual input variable value when working with my multi variable problems. How about providing an 'input mode' that displays each variable name and its value on one line. Name to the left and value to the right. If there are ten variables, there would be ten lines. Use the up and down buttons to scroll the lines up and down. The bottom line would be active. That is, the value on the bottom line would be the X register and would be able to be changed if needed. Hit the R/S button to inter and exit the 'input mode'. Of course, the scrolling line feature would be nice for the 'output data' too. (And this might already be built into the DM-42 - I don't know.) Anyway, I appreciate all the work and suggestions on my proposal. - Jim Williams

Re: Spreadsheet App for DM42

Posted: Wed Jun 26, 2019 10:49 pm
by Dave Britten
What you describe wouldn't be too hard to implement, at least with only a single line/variable visible at once.

Create a one-column matrix with all the variable names stored as strings, and INDEX it.

Set up a menu with just the Up and Down arrow keys assigned, using KEY GTO routines that just do I+ or I- and jump back to the menu display. The general structure would be something like this:

Code: Select all

CLMENU //Set up the menu keys (Up and Down at a minimum)
KEY 7 GTO 07
KEY 8 GTO 08
//Define other menu keys here, such as "GO" or "CALC" to run a calculation routine
LBL 00 //Beginning of the display/menu routine
RCLEL //Get the variable name currently pointed to
STO 00 //Store the current variable name for later
ARCL ST X //Put the variable name in the alpha register
ARCL IND ST X //Append the variable's value to alpha
STOP //Stop and wait for Up or Down
STO IND 00 //...or R/S to continue on and save into the last-viewed variable
GTO 00 //Go back to the beginning of the display routine
LBL 07
GTO 00
LBL 08
GTO 00
Then you can use Up and Down to scroll through the variables, and type a new value and hit R/S to update whichever one is currently selected.

Re: Spreadsheet App for DM42

Posted: Thu Jun 27, 2019 12:54 am
by Jim_W
Hi Dave - Thanks for the code. I'd like to try it on my HP-42S, however I don't understand the 10th line: I-"=" Is the first part (I-) just decrementing the row pointer? But what is the ("=") doing? I'll let you know if I get it running. Thanks again! - Jim Williams

Re: Spreadsheet App for DM42

Posted: Thu Jun 27, 2019 1:20 am
by Dave Britten
That's the "append alpha" indicator, i.e. Shift Alpha Enter (or Shift Enter Enter). That line just appends an equal sign to the alpha register.

Note that isn't a complete program, but it could be used as the basis for something.

Out of curiosity, have you tried the HP palmtops? Lotus 1-2-3 and the HP Calc app are nearly an exact match for what you're after.

Re: Spreadsheet App for DM42

Posted: Thu Jun 27, 2019 2:09 am
by Jim_W
Oh - I should had figured that out myself. Thanks. No, I haven't tried the Palmtop nor the HP Calc app. I have looked into the Likebook Mars E-Ink reader. It is an Android E-Reader and it does run Android spreadsheets. However, it costs about as much as the DM42 and I like the size of the DM42 much better. - Jim

Re: Spreadsheet App for DM42

Posted: Wed Jul 10, 2019 11:52 pm
by Jim_W
Hi Dave - I finally found some time to try your single line/variable visibility using a one-column matrix. I actually didn't get my program running but I got into it far enough to see that this won't help very much. I might as well just use the menu keys to store all of my variables. Thank you for your suggestion, though. However, the other night I read somewhere on this forum that a split screen for the DM42 has now been developed. I think it is being use to show long lists of items. If I understand this feature correctly, the screen can be split into two columns. Maybe this new feature will enable my request for viewing and editing multiple variables all on one screen. long live the DM42! - Jim Williams