Time and Date Functions |
ADATE | Appends the contents of the X register to the ALPHA register, formatted as a date value. |
ATIME | | Appends the contents of the X register to the ALPHA register, formatted as a time value. |
ATIME24 | Like ATIME, except it always formats the time in 24-hour format. |
CLK12 | | FDisplay the time in 12-hour format with AM/PM. |
CLK24 | Display the time in 24-hour format. |
DATE | | Returns the current date to the X register. |
DATE+ | Takes a date from Y, and adds a number of days from X. |
DDAYS | Number of days between the dates in Y and in X. |
DMY | | Set the date format to day/month/year. |
DOW | | Calculates the day of the week for the date in X. (sunday=0; monday=1; etc) |
MDY | | Set the date format to month/day/year. |
TIME | | Returns the current time in X in 24-hour format. |
YMD | | Set the date format to year/month/day. |
|
Extended Functions |
ANUM | | Scans the ALPHA register for a number, and places it into X. |
RCLFLAG | Gets the state of all flags and returns them as a complex number. |
STOFLAG | Restores the state of all flags that were retrieved using a previous RCLFLAG. |
X<>F | | Exchanges flags 0-7 with the X register. |
|
BASE Enhancements |
A...F | Sets HEXM mode and activates the A...F menu. |
BRESET | Resets all BASE modes back to the HP-42S defaults: WSIZE 36, signed, not wrapped. |
BSIGNED | Toggles signed mode. |
BWRAP | Toggles wrapped mode. |
WSIZE | Sets the word size to the number in X, between 1 and 64. |
WSIZE? | Returns the current word size. |
|
Programming Utilities |
CPXMAT? | Tests whether the object in the X register is a complex matrix. |
ERRMSG | Returns the error message for the most recent error to be caught using flag 25. |
ERRNO | Returns the error number for the most recent error to be caught using flag 25. |
FUNC | | Save the contents of the stack and LASTx, and restore then when the function returns, according to the parameter. |
GETKEY1 | | Like GETKEY, except it does not halt program execution when EXIT or Shift-EXIT are pressed. |
LSTO | | Creates local variables that exist only for the duration of the current subroutine, and are automatically deleted when it returns. |
LASTO | Relates to LSTO like ASTO relates to STO. |
LCLV | | CLV for local variables. LCLV only deletes local variables that were created at the current RTN level. |
NOP | | No Operation, encoded as 0xF0, which corresponds to TEXT 0 in the HP-41. |
PGMMENU | Presents a menu of all global labels that have MVAR instructions |
PGMVAR | Prints all the variables associated with the given LBL through MVAR declarations. |
RTNERR | Return Error from a function. |
RTNNO | Return from conditional function, RTNNO causes the line after the calling XEQ to be skipped. |
RTNYES | Return from conditional function, return to the line after the calling XEQ. |
SKIP | | Skips the next line, like a test that always tests false. |
SST↑ | | Step Out: Starts program execution, continuing until just after the end of the current function. |
SST→ | | Step Over: Executes one line of code, and if that line is a function call, it is executed in that one step. |
SST↓ | | Step Into: Executes one line of code, alias for the original SST function. Not in CATALOG. |
TYPE? | Returns an integer, representing the type of the object in the X register. 1: Real Number, 2: Complex Number, 3: Real Matrix, 4: Complex Matrix, 5: String, 6: List |
VARMENU1 | | Modified version of VARMENU. |
X=? X≠? X<? X>? X≤? X≥? | Compare X to any register or variable. |
0=? 0≠? 0<? 0>? 0≤? 0≥? | Compare any register or variable to 0. |
|
String and List Functions |
These string functions introduced by Free42 work with unlimited-length strings, on the stack. (see XSTR for creating such strings) |
APPEND | Adds the object in X to the string or list in Y. If Y is a string, the contents of X will be converted to a string. If X is a list, it will be added to Y as one element. |
C→N | | Convert character to number. |
EXTEND | Adds the object in X to the string or list in Y. If Y is a string, the contents of X will be converted to a string. If X is a list, it will be added to Y element by element. |
HEAD | | Removes and returns the first character or element from the string or list named by the function's parameter. |
LENGHT | Returns the length of the string or list in X. |
→LIST | Creates a list from objects on the stack. The number of objects is taken from the X register. |
LIST→ | Performs the inverse of the →LIST operation. |
LIST? | | Tests whether the object in X is a list. |
LXASTO | Like LASTO, but the entire ALPHA register, not just the first 6 characters. |
NEWLIST | Returns a new empty list. |
NEWSTR | Returns a new empty string. Equivalent to XSTR "". |
N→C | | Convert number to character. |
N→S | | Convert number to string. |
POS | | Finds the first occurrence of the string/list X in Y. Or of the string/list X in Z starting from Y. |
REV | | Reverse the string or list in X. |
SUBSTR | From the string/list in Z, gets the substring/sublist starting at index Y and ending just before index X. |
S→N | | Convert string to number. |
XASTO | Like ASTO, but the entire ALPHA register, not just the first 6 characters. |
XSTR | | Create a string directly in the X register, without needing the ALPHA register and without the six-character limit of ASTO. |
XVIEW | This function works just like AVIEW, except it takes the text from the X register rather than the ALPHA register, so it doesn't have the 44-character length restriction of AVIEW. |
|
Stack |
The big stack functions are enabled only if the option "Dynamic Stack Extension" is checked in Setup → Settings. |
4STK | | 4-level Stack. Turns off big stack mode, returning to the TZYX stack. |
DEPTH | Returns the current stack depth. |
DROP | | Drops level 1. In 4-level mode, the stack is replenished with zeroes from the top. |
DROPN n | Drops levels 1..n. In 4-level mode, the stack is replenished with zeroes from the top. |
DUP | | Duplicates level 1. |
DUPN n | Duplicates levels 1..n. In 4-level mode, n must be 2 or less. |
L4STK | Local 4-level Stack, automatically restore the previous stack mode when the current function returns. |
LNSTK | Local N-level Stack, automatically restore the previous stack mode when the current function returns. |
NSTK | | N-level Stack. Turns on big stack mode. |
PICK n | Gets the object from level n. |
R↑N n | | Rolls up levels 1..n. R↑ is equivalent to R↑N depth. |
R↓N n | | Rolls down levels 1..n. R↓ is equivalent to R↓N depth. |
UNPICK n | Puts an object into level n. Consumes the contents of level 1, unlike STO, and n refers to the stack level number after X has been dropped. |
|
Other Extensions |
A2LINE | Create program lines containing the current contents of the ALPHA register, to be set. |
A2+LINE | Create program lines containing the current contents of the ALPHA register, to be appended. |
CAPS | | NOP on the DM42 which is always in Mixed mode. |
FMA | | Fused Multiply-Add. Calculates Z*Y+X using the DM42's native FMA function. |
Mixed | NOP on the DM42 which is always in Mixed mode. |
PCOMPLEX | Works like COMPLEX, but always in polar mode. |
RCOMPLEX | Works like COMPLEX, but always in rectangular mode. |
STRACE | Stack Trace mode. Variation on TRACE mode, printing the entire stack instead of just X. |
X2LINE | Create program lines containing the current contents of the X register, to be set. |
Not in CATALOG |
SST↓ | | Step Into: Executes one line of code, alias for the original SST function. |
WIDTH HEIGHT | Get the display size, in pixels. The main use of these functions is to make programs that use PIXEL and AGRAPH resolution-independent. |