.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "HCALC" 1 "2024-01-10" "1.2u1" "Urchlay's Misc Stuff" .SH NAME hcalc \- graphical hex calculator .\" RST source for hcalc(1) man page. Convert with: . .\" rst2man.py hcalc.rst > hcalc.1 . .SH SYNOPSIS .sp hcalc [\fI\-default\fP] [\fI\-small\fP | \fI\-medium\fP | \fI\-large\fP] [\fI\-dec\fP | \fI\-hex\fP | \fI\-oct\fP | \fI\-bin\fP ] [\fI\-quiet\fP] [\fI\-\-version\fP] [\fI\-\-help\fP] .SH DESCRIPTION .sp \fBhcalc\fP is a small (137x174 pixels minimum) TI Programmer II semi\-clone for Unix/X11 and Windows 95/NT. It doesn\(aqt take up much space, and supports decimal, hex, binary, and octal modes. .sp \fBhcalc\fP is operated with the mouse and/or keyboard. See \fBMOUSE\fP and \fBKEYBOARD\fP sections, below. .SH OPTIONS .sp Options listed as (persistent) get saved to the config file, so they\(aqll still apply the next time \fBhcalc\fP is started. This applies not only to command\-line arguments; the settings get saved if they\(aqre changed via the mouse or keyboard, too. .INDENT 0.0 .TP .B \fB\-small\fP Display in a 125x147 window (persistent). .TP .B \fB\-medium\fP Display in a 250x294 window (persistent). .TP .B \fB\-large\fP Display in a 500x588 window (persistent). This is the default. .TP .B \fB\-dec\fP Start up in decimal mode (persistent). This is the default. .TP .B \fB\-hex\fP Start up in hexadecimal mode (persistent). .TP .B \fB\-oct\fP Start up in octal mode (persistent). .TP .B \fB\-bin\fP Start up in binary mode (persistent). .TP .B \fB\-default\fP Do not read the config file on startup. \fINOTE:\fP This option must be the first on the command line, or it will be ignored! .TP .B \fB\-quiet\fP Do not ring the X bell on invalid input (persistent). .UNINDENT .INDENT 0.0 .TP .B \-\-version Output version number and exit. .TP .B \-\-help Output usage string and exit. .UNINDENT .SH DISPLAY .sp The numeric display is limited to 15 digits in decimal, hex, or octal base. In binary mode, it displays 32 bits, but uses narrow "ticks" rather than 0 and 1. .sp In hex mode, the number in the display will always be prefixed with "0x". In octal mode, it will always be prefixed with "0". In decimal mode, there is no prefix. .sp In case of error (e.g. division by zero), the display will show \fBerr\fP, and you\(aqll have to press \fICLR\fP to continue. .SH BUTTONS .sp The user interface mimics a pocket calculator, so it\(aqs made of buttons. Each button can be pressed either by clicking on it with the mouse, or pressing its keystroke (given in \fBbold\fP). A few buttons have multiple functions, depending on which mouse button is used. .sp The descriptions below assume a right\-handed mouse, and refer to mouse button 1 as "left" and button 3 as "right". If your mouse is set up left\-handed, reverse them. .INDENT 0.0 .TP .B \fI0\fP to \fI9\fP, \fIA\fP to \fIF\fP (\fB0\-9\fP, \fBa\-f\fP) Digits. Lowercase only for the hex digits. Entering digits larger than the current number base is impossible (e.g. hex digits when in decimal mode, or digits other than 0 or 1 in binary mode) and will be ignored. .TP .B \fI\&.\fP (\fB\&.\fP) Decimal point. Only works in decimal mode (base 10); other bases are integer\-only. .TP .B \fI+\fP \fI\-\fP \fIx\fP \fI÷\fP (\fB+\fP \fB\-\fP \fB*\fP \fBx\fP \fB/\fP \fB%\fP) Arithmetic: addition, subtraction, multiplication, division (modulus with right\-click). Note that the \fBx\fP key is the same as \fB*\fP\&. .TP .B \fI=\fP (\fB=\fP \fBEnter\fP) Finish the calculation and display the result. .TP .B \fI+/\-\fP (\fB_\fP \fBi\fP) Invert sign. .TP .B \fIINV\fP (\fB~\fP) Unary NOT, aka 1\(aqs complement; invert the bits in the current number. For 32\-bit two\(aqs complement, right\-click or use \fB@\fP on the keyboard. Integer operation; truncates digits after the decimal point. .TP .B \fIOR\fP \fIAND\fP \fIXOR\fP (\fB&\fP \fB|\fP \fB^\fP) Boolean operations. Integer operations; truncates digits after the decimal point. .TP .B \fIDEC\fP \fIHEX\fP \fIOCT\fP \fIBIN\fP (\fBD\fP \fBH\fP \fBO\fP \fBB\fP or \fBF1\fP to \fBF4\fP) Change the number base. The number being displayed will be converted to the new base. Truncates digits after the decimal point. .TP .B \fIDEL\fP (\fBBackspace\fP or \fBDelete\fP) Delete the last digit entered. Deleting the last digit results in 0. .TP .B \fISTO\fP \fIRCL\fP \fISUM\fP (\fB[\fP, \fB]\fP, \fB}\fP) Store to memory (like \fIM\fP on most calculators); recall memory (like \fIMR\fP); add current value to memory (like \fIM+\fP). .TP .B \fI<<\fP \fI>>\fP (\fB<\fP \fB>\fP) Bit shift by one position, left or right. Integer operation; truncates digits after the decimal point. .TP .B \fISHF\fP (\fBS\fP) Shift left/right by some number of bits (binary operation, like addition). Shifts left for positive numbers and right for negative. This is less confusing than it sounds: 1 shifted left once is 2, \-1 shifted right once in \-2. Integer operation; truncates digits after the decimal point. .TP .B \fICE\fP (\fBu\fP) Clears the number being entered, same as backspacing over it, but does not clear any pending operation. .TP .B \fICLR\fP (\fBC\fP, \fBEscape\fP) Clears the display, memory, and any pending operation. With right\-click, exits \fBhcalc\fP (use \fBQ\fP or \fB^Q\fP to quit from the keyboard). .UNINDENT .SH MOUSE .sp Mouse operation is simple: for the most part, just left\-click on the buttons to press them. .sp There\(aqs no \fI%\fP button for the modulus operator, but you can right\-click on the \fI÷\fP (division) key. Also, right\-click on the \fIINV\fP key for two\(aqs complement. .sp Right\-clicking on the \fICLR\fP key exits \fBhcalc\fP\&. .sp For the numeric display, a left\-click copies the number to the X selection buffer. Right\-click pastes from X, but beware: pasting anything but a number in the current base might have unexpected effects, because all pasted characters are treated as keystrokes (so, e.g. pasting a capital Q quits the application). This can be useful, e.g. if you paste "2+2=", \fBhcalc\fP will display "4". .sp A center\-click (button 2) anywhere in the \fBhcalc\fP window also pastes. .SH KEYBOARD .sp These keys don\(aqt have calculator buttons. .INDENT 0.0 .TP .B \fB^C\fP Copy the current number to the X selection buffer. Same as clicking mouse button 1 (usually left) on the number display. .TP .B \fB^V\fP \fBShift\-Insert\fP Paste from the X selection buffer. Same as clicking a mouse button other than 1 (right\-clicking) on the number display. .TP .B \fBq\fP Quiet. Toggles the audible bell. .TP .B \fBz\fP Zoom: change window size. Alternates between the 3 sizes: \fB\-small\fP, \fB\-medium\fP, \fB\-large\fP\&. .UNINDENT .\" other sections we might want, uncomment as needed. . .SH FILES .INDENT 0.0 .TP .B \fB$HOME/.hcalc.cfg\fP Config file. This is a binary file, not human\-readable, and not portable across architectures. It gets read on startup (unless \fB\-default\fP is given) and written on exit. It stores the number base, window size (as set on the command line), the number that was displayed on exit, the contents of the \fISTO\fP memory, and the \fB\-quiet\fP flag. .sp Some care is taken to make sure a config file from a different architecture won\(aqt be used. .sp Since the config file isn\(aqt human\-readable, an easy way to create one is to run \fBhcalc\fP with \fB\-default\fP plus your preferred options. Example: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C hcalc \-default \-quiet \-large \-hex .ft P .fi .UNINDENT .UNINDENT .sp \&...which will kill any existing config file, and create a new one that stores the options you gave. Now when you run \fBhcalc\fP with no options, it will start up in hex mode, in a large window, and won\(aqt ring the bell. .sp An even easier way is just to run \fBhcalc\fP and use the controls to set the number base, size, and quiet flag. These settings automatically get saved to the config file. .UNINDENT .SH ENVIRONMENT .INDENT 0.0 .TP .B \fBHOME\fP Config file is searched for here. If this is not set, or can\(aqt be read, no config file will be read or written. .TP .B \fBDISPLAY\fP X display to use. .UNINDENT .\" EXIT STATUS . .\" =========== . .\" BUGS . .\" ==== . .\" EXAMPLES . .\" ======== . .SH COPYRIGHT .sp \fBhcalc\fP is released under the terms of the GNU GPL. .SH AUTHORS .sp \fBhcalc\fP was originally written by DJ Delorie, modified by Theodore Kilgore, and modified again by B. Watson, who also wrote this man page. .SH SEE ALSO .sp \fBxcalc\fP(1) .\" Generated by docutils manpage writer. .