Base-N Tools

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
Post Reply
richmit
Posts: 28
Joined: Tue Feb 16, 2021 2:51 am

Base-N Tools

Post by richmit »

I have recently started rewriting all my old programs using the new and improved functionality in free42. Figured I would post them on github in case they might be useful to someone else.

The second one is a collection of base-n tools. I have replicated the bits of the HP-16C that I use, and added a BVIEW program that can display a full 64-bit binary number. All of the functions are tied together in a menu called "BASE".

https://richmit.github.io/hp42/base.html

The menu program is generated by a little emacs lisp function contained in my "hp42s Programming Tools" file:

https://richmit.github.io/hp42/hp42s-meta.html
richmit
Posts: 28
Joined: Tue Feb 16, 2021 2:51 am

Re: Base-N Tools

Post by richmit »

DM42 Notes:

On the DM42 you have to hit R/S after BVIEW. This is because the menu gets repainted over the display when the menu is recreated after CLLCD. On free42 it doesn't work this way, and you just need to hit ENTER or another key to get back. I don't know if this is a bug or just me doing something incorrectly.

Also on the DM42, the code doesn't understand the various graphics modes.
richmit
Posts: 28
Joined: Tue Feb 16, 2021 2:51 am

Re: Base-N Tools

Post by richmit »

I have included workarounds for the display bug. I also included some code to do the right thing on a DM42.

I have also included some requested changes:
  • BVIEW is not better suited to run by itself -- so you can cut that one (and TNPR) out if you don't need the rest.
  • The zero padding is gone. If you want it back, delete the line with "GTO 14".
  • It tries to return to the system BASEN menu with the base set correctly when it finishes. If you don't like that, zap the "EXITALL" near the end of the program.
I may make the padding and menu jump configurable, but I'm not sure how to do that. I don't want to use a flag because I don't want to create conflicts with how others have already used them... I could use flags, but make it configurable which ones to use. Duno. Need to think about that some more.

Oh and a screenshot:
bviewSS.jpeg
bviewSS.jpeg (53.75 KiB) Viewed 2247 times
Post Reply