Device ID (read-only)
—
RCL "DevID" returns the type of DM42 you’re using. There are currently
two hardware models only identified by value 0 (zero) is returned by the DM42 units that we
have. Other types of unit that may be produced in future will have different DevID values.
"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
"ResX" and "ResY"
X- and Y-resolution (read-only)
—
RCL "ResX" or RCL "ResY" recalls the current X-resolution or Y-
resolution respectively into the X stack register. The values that you will get are 131, 200 or 400
for RCL "ResX" and 16, 120 or 240 for RCL "ResY" depending on the current graphics mode (0, 2
or 3).
"Vbat"
Battery voltage (read-only)
—
If you’re running off battery power then this will give you the
voltage read at that precise moment in time. If you’re running on USB power then this will give
you the last battery voltage that was recorded before connecting the USB cable. Note that the
value retrieved here can and almost always will be different to the voltage displayed in the
status bar. The latter is cached and almost always retrieved when the DM42 is idle. The voltage
read from "Vbat" is the voltage read while you are using the keyboard and/or running a
program. This can be useful for pausing lengthy processing if the battery voltage drops below a
threshold and allowing it to recover before resuming.
"RefLCD"
The purpose of programs can vary significantly. There are programs like a stopwatch or games,
where quick refreshing of the LCD is required. On the other end of the spectrum are pure
computational programs, where no LCD output is required throughout program execution and
where it is more beneficial to utilize all the CPU time for computation rather than wasting it on
unnecessary LCD updates. The "RefLCD" virtual variable was introduced specifically to address
those different requirements. It is possible to disable LCD refreshing altogether or to enable the
periodic refresh of individual portions of the LCD.
RefLCD in more detail
It is possible to disable LCD refreshing altogether or to enable the periodic refresh of individual
portions of the LCD. The value that you store in this variable is in fact a bitmask as per the table
below. Items whose corresponding bit is cleared are not refreshed whereas those whose bit is set
are refreshed with 200ms timeout after the LCD contents changes.
3