RF Eclectica Wiki

Try to learn something about everything, and everything about something - Thomas Huxley

User Tools

Site Tools


public:calculator:guides:dm41x_ladybug_module

Calculator Hints & Tips

DM41X Ladybug Module

Another HP16 emulation

Ladybug Key Overlay

Details

Ladybug is a more user-friendly, if less versatile, “HP16C programmer's calculator” module than the fully-featured HP16 module by Angel Martin. Both have their uses, but for a simple calculator for bit-banging while writing 6502 assembly code Ladybug does everything, with a less convoluted User Interface.

Although I also have a DM16L, the Swiss Micros modern clone of the original HP16C, I am finding that having Ladybug on the DM41X allows me to quickly switch between “normal” floating point calculations and integer “programming” calculations, and have access to the best of both worlds.

The DM16L/HP16C has very limited (basically unusable) floating point support.

The Ladybug module is more intuitive and usable than the Angel Martin HP16 emulator module and having Ladybug for INTEGER and the rest of the DM41X/HP41CX functionality for other tasks makes the DM41X my go-to calculator. The DM16L is fantastic as a single-minded programmer's calculator, and is used extensively when I'm engrossed in writing assembly code, but the DM41X is much more versatile and is carried with me at all times when I'm away from the workbench.

Launching

  • modules needed:
    • Ladybug
    • Boost
    • OS/4

To switch to “Ladybug Integer” mode : XEQALPHAINTEGERALPHA

To leave (and return to normal mode) : XEQALPHAEXITAPPALPHA

Using the DM41X CST menu simplifies this, set 2 Custom menu entries for INTEGER and EXITAPP

Nice features

  • A “CMP” function akin to 6502 - sets flags in the same way but doesn't change the register(s)
  • Status Flags : C, Z, N and V equivalent to 6502 flags and set in the same way after various operations.
    • Flag 0 = Zero Z
    • Flag 1 = Sign N
    • Flag 3 = Carry C
    • Flag 4 = Overflow V
  • 2's-complement mode is set with Flag 2
  • Leading Zeros display is set with Flag 5
  • Word Size is set with Shift+R/S
  • Windowing is selected with .
  • Bits can be set Shift+4, reset Shift+5 and tested Shift+6
  • Boolean Operations on values in X and Y registers
    • AND Shift+1
    • OR Shift+2
    • XOR Shift+3
  • NOT Shift+CHS (invert each bit, on the value in the X register)
  • Shift and Rotate functions are conveniently accessible - see Overlay picture above - without delving into menus or launchers

John Pumford-Green 23/09/22 13:40

Further Information

public/calculator/guides/dm41x_ladybug_module.txt · Last modified: 08/04/24 16:12 BST by john