HEX mode logic operation on a sequence with alpha digits

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
chengjm
Posts: 3
Joined: Sat Apr 28, 2018 2:51 pm
Location: Singapore

HEX mode logic operation on a sequence with alpha digits

Post by chengjm » Thu May 03, 2018 1:09 am

Hi,
I just got my DM42! I would like to know if anyone has tricks to work around this issue...
In HEX mode, to perform XOR operation on a sequence of hex digits with alpha characters (A..F) requires a lot of keystrokes (when compared to HP48 series or HP50G). E.g. if we want to XOR these hex numbers: AAA, 1BB, CFF, 9DD,... every time we enter the alpha digits, the submenu of the LOGIC is gone, and we need to re-enter (exit from A..F, then LOGIC, then XOR).

I found a slightly easier way, by assigning XOR to the custom menu. After entering the digits with A..F submenu, press CUSTOM, XOR, then EXIT to come back to the A..F submenu.

Is there any way to further simplify this?

JM.

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: HEX mode logic operation on a sequence with alpha digits

Post by grsbanks » Thu May 03, 2018 4:50 am

Using the CUSTOM menu is actually a very good idea!

With so many functions crammed into a machine with only one shift key on the keyboard (the 48 and 50 both have more keys, two of them are shift keys and there's an alpha key as well) more stuff has to be staffed off into menus, which can make this kind of operation a bit frustrating. The main advantage of the 48 and 50 is that hex numbers can be entered without having to use any menu at all, so you can leave the menu with your logic functions open while doing so.

I don't think there's any work-around for that other than what you've done, which is already a great idea.
Not SwissMicros staff, just an enthusiast.

Dave Britten
Posts: 39
Joined: Wed Jun 14, 2017 7:27 pm

Re: HEX mode logic operation on a sequence with alpha digits

Post by Dave Britten » Fri May 04, 2018 2:59 pm

You can recreate the LOGIC menu with a small program for even quicker access. While in the hex input menu, XEQ "LOGIC" to bring it up, and hit EXIT to go back to hex. From that point, you can just hit R/S to call up the logic menu again.

Code: Select all

LBL 00
STOP
LBL "LOGIC"
CLMENU
"AND"
KEY 1 GTO 01
"OR"
KEY 2 GTO 02
"XOR"
KEY 3 GTO 03
"NOT"
KEY 4 GTO 04
"BIT?"
KEY 5 GTO 05
"ROTXY"
KEY 6 GTO 06
MENU
GTO 00
LBL 01
AND
GTO 00
LBL 02
OR
GTO 00
LBL 03
XOR
GTO 00
LBL 04
NOT
GTO 00
LBL 05
BIT?
GTO 00
LBL 06
ROTXY
GTO 00
END

chengjm
Posts: 3
Joined: Sat Apr 28, 2018 2:51 pm
Location: Singapore

Re: HEX mode logic operation on a sequence with alpha digits

Post by chengjm » Fri May 11, 2018 2:52 am

This is a very elegant solution! I have already entered it into my DM42 manually (this way it lets me enjoy the DM42 keyboard!) and it works well.
So using R/S key saves one key stroke.

Thanks,
JM.

Post Reply