Post Reply 
Some new user DM42/HP42s programming questions
05-15-2019, 08:22 PM (This post was last modified: 05-15-2019 08:23 PM by Androsynth.)
Post: #1
Some new user DM42/HP42s programming questions
So, in between the madness of moving, I've been fooling around with the new DM42. My main interest in getting this was for programming, and I plan on writing some programs for it that fill niches no one has addressed yet. There are also mountains of old HP42s software that could be tweaked to take advantage of that glorious screen on the DM42. All that sounds intriguing, so, a few questions:

1. Graphics: what are the main techniques for displaying text/graphics on a DM42? I saw the thread where a matrix is used to allow printing text. Graphics seem to be using a bunch of related commands centered around the 'alpha register', but the alternate manual doesn't go into much detail about any of this. Any tips or links? I'm assuming it works like the old Sharp BASIC computers where each byte turns off specific bits in a row? I'll eventually get the CDs with the original manuals, but moving prevents that at the moment.

2. Is there a detailed command reference for each of the RPN commands available to program with? I could probably get by on just that if such a thing exists.

3. Any fundamental differences (outside screen size) for converting between HP42 and DM42?

4. Lastly, what is the command to set the different graphics modes on the DM42? I'm probably just blind and missed it.

Thanks!
Find all posts by this user
Quote this message in a reply
05-16-2019, 01:42 AM (This post was last modified: 05-16-2019 01:56 AM by gomefun2.)
Post: #2
RE: Some new user DM42/HP42s programming questions
I'm probably not the best person to answer these questions, because I just started to play around with the graphics myself.

But this is the manual for the dm42:

https://www.swissmicros.com/dm42/doc/dm42_user_manual/
-----------------------------------------------------------------------------------
There are 3 main graphics modes:

"GrMod"
Graphics Mode (read-write) — RCL "GrMod" retrieves the current graphics mode and STO "GrMod" sets the graphics mode to the number present in the X register. Graphics modes currently supported are:

0 = standard HP-42S resolution 131x16

1 = reserved for future use and maps to 0 on the DM42

2 = DM42 full resolution 200x120

3 = DM42 full resolution 400x240

so basically you store 0, 1, 2, or 3 into a variable called GrMod. This variable is a hidden variable that has a pre-determined meaning to the calculator.

-----------------------------------------------------------------------------------
As a side note, there are a ton of demo programs written by other people built into your calculator already. Just make sure you are on the most recent firmware.

They can be found in SETUP>FILE>LOAD PROGRAM. Once you load them, you can find them in XEQ, or edit them in PRGM as a normal program.

some graphics examples are like dplot and HPLOT.

here is a video of dplot:

https://www.youtube.com/watch?v=oviVSOYKcXc
-----------------------------------------------------------------------------------
ALSO:

PIXEL and AGRAPH
PIXEL and AGRAPH are not limited to the original HP-42S’s resolution of 131x16 pixels. The compatibility with negative values to display lines and with complex numbers and matrices is conserved. You can now use horizontal values of 1≤X≤200 and vertical values of 1≤Y≤120 in 200x120 mode, or 1≤X≤400 and 1≤Y≤240 in 400x240 mode. Switching between 131x16, 200x120 and 400x240 modes is achieved using the GrMod virtual variable and current graphics resolution could be probed by ResX and ResY.

-----------------------------------------------------------------------------------
Free42 manual (the software the calculator uses):

https://thomasokken.com/free42/42s.pdf

has a list of commands starting page 28
-----------------------------------------------------------------------------------
https://thomasokken.com/free42/

look for the section:

Why does my HP-42S program not work properly in Free42?

some additions over the original hp42s are local variables and recursion, though I can't remember if those are yet updated to the dm42 firmware as they are new features. You can also change the font and font size (there are two different fonts), and also put underlines on the screen for easier reading of the text. Another difference is the dedicated soft keys on the dm42, and the instruction manual can be found built into the calculator, though that doesn't really change much.
-----------------------------------------------------------------------------------

I think this sort of answers some of your questions. Probably someone else can give a better answer.
Find all posts by this user
Quote this message in a reply
05-16-2019, 08:44 AM
Post: #3
RE: Some new user DM42/HP42s programming questions
(05-16-2019 01:42 AM)gomefun2 Wrote:  Free42 manual (the software the calculator uses):

https://thomasokken.com/free42/42s.pdf

has a list of commands starting page 28
-----------------------------------------------------------------------------------
https://thomasokken.com/free42/

look for the section:

Why does my HP-42S program not work properly in Free42?

Under https://thomasokken.com/free42/#doc, you can also find a link to the original HP-42S Owner's Manual, and the HP-42S Programming Examples and Techniques book.

(05-16-2019 01:42 AM)gomefun2 Wrote:  some additions over the original hp42s are local variables and recursion, though I can't remember if those are yet updated to the dm42 firmware as they are new features.

The current DM42 firmware is based on Free42 2.0.24. They are testing with Free42 2.2 at the moment, which will add SST→ and SST↑ (Step Over and Step Out), LSTO (create local variable), the 1024-level RTN stack, and YMD mode for the date functions.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2019, 03:43 PM
Post: #4
RE: Some new user DM42/HP42s programming questions
Thanks guys! This is all exactly what I was looking for. I'll dive in this weekend and see what I can do.
Find all posts by this user
Quote this message in a reply
Post Reply 




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