-c
Okay - I can't get around the # problem, but you can assign various
logic functions to individual keys, or you could create a custom menu
with the logic functions in that. I took the second route. Keep in
mind that certain generic functions on the 48 have logical flavours -
"+/-" will perform a one's complement, while "-" will do a two's
complement.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear God, if I live through this, I swear I'll
never try to troll again!
Michael Heinz, mhe...@ssw.com
Here's what to do
"Binary calculator"
1.
Save your old key-assignments, and set flag -63.
Also delete your key assignments.
<< RCLKEYS `OldKeys' STO -63 SF 0 DELKEYS >>
2.
Store this tiny program in the variable 'AlphaENTER' (Greek alpha, alpha RS A )
<< "# " SWAP + OBJ-> >>
3.
Make new key assignments. For example:
{ S "A" 11.1 "B" 12.1 "C" 13.1 "D" 14.1 "E" 15.1 "F" 16.1
XOR 53.1 } STOKEYS
would be useful for hex-calculations. You could also assign BIN, HEX, OCT, DEC,
OR, NOT and AND to the keys that suit you. (To assign OCT to the key "O"
(EVAL), simply add
OCT 33.1
in the list above, or enter << OCT >> 33 ASN from the stack. The key nk is the
k'th key in the n'th row.)
Now set the calc in user mode (LS alpha or LS alpga LS alpha, depn. on the
state of flag -61)
Try 123Bh ABC1h XOR
by simply pressing
123B ENTER ABC1 EEX (XOR is assigned to the EEX key)
(Assumes you are in HEX mode)
When finished, execute
<< RCLKEYS 'BinKeys' STO 0 DELKEYS -63 CF 'OldKeys' DUP RCL STOKEYS PURGE >>
Christian
> Is anyone aware of a reasonably easy-to-use hex/octal/binary calculation
> program for the 48? I'd just use the built-in mode, but it's too damn
> cumbersome having to enter the # every time, not just having a key that's
> "XOR" and so forth. I guess what I want is an HP-16 emulator for the 48. Any
> ideas?
I guess this is another opportunity for my shameless plug for the HP16C Emulator
Library for the HP48, which has been around for more than two years now. Developed
by Rick Grevelle and myself, the latest version (4.00h) works
on both the SX and GX and in any port. It's a 26K library available on floppy
disk for downloading to RAM or as a 32K plug-in card. Educalc had it in their
catalog for around 15 months, ending around a year or so ago when they determined
that the "niche" sales weren't justifying the column space.
Here's the "official" info article:
-------------------------------------
The HP16C Emulator Library for the HP48 - Some Info
For those who are already familiar with this library for the HP48, feel
free to skip this article. For the others, here is a little background.
The HP16C Emulator Library has been available now for the HP48SX since
early 1993 and appeared in the EduCalc catalogs #59 through #64. Due to
slow sales (perhaps attributed to (1) its appearing in the 12th page of a
multi-page HP48 products section; and (2) its niche market), the EduCalc
people decided to discontinue carrying the library and thus it is omitted
from the catalog #65 and future catalogs. If you call and ask them
about it, they will suggest you call me for information.
Following the introduction of the HP48GX, a new version of the library was
planned which would be compatible with both the SX and GX units. This
latest version (4.00h) works in all ports of the GX.
The library encompasses all the functionality in the HP48's native MTH BASE
menu plus all the functionality of the HP16C calculator (discontinued around
1987) and more, running in the HP48 RPL environment. The math functions
supported are:
Arithmetic: +, -, *, /, RMD (remainder), NEG, ABS
Double-word: DBL*, DBL/, DBLR (double remainder)
Bit Shift/Rotate: SL, SLn, SR, SRn, RL, RLn, RR, RRn, LJ (left justify),
ASR, RLC (rotate left thru carry), RLCn, RRC, RRCn
Masking: MSKL (mask left), MSKR
Bit Set/Clr/Test: SB, CB, B?, #B (no. of bits set)
Logical: AND, OR, XOR, NOT
Conversion: ->IEEE, IEEE-> (IEEE standard 32-bit format),
FLOAT, FIXED, R->B, B->R
Relational Tests: ==, <> (not equal), <, <=, >=, >
Carry, Range: SETC, CLRC, TC (toggle carry), CRRY?,
SETR, CLRR, TR, RNG?, CCR (clear carry & range)
Complement: UNSGN (unsigned mode), ONES (ones complement),
TWOS (twos complement), CMP? (what is current mode)
Word Size: STWS, RCWS
Math: Square Root, Square, Y^X
Display: #0000... (Leading zero's mode),
MLSHOW (Display full number in multi-line format),
SHOW BIN, SHOW OCT, SHOW DEC, SHOW HEX (displays in
specified base briefly)
An overview of the library:
The entire HP48 keyboard is redefined and labeled using the supplied
four-color mylar keyboard overlay. No function is more than two
keystrokes away.
LCD shows all modes (current base, word size, complement mode, plus
status of carry and range flags) at all times in the status area.
Entry of binary numbers does NOT require the use of the #-sign de-
limiter; it is added automatically.
Both signed (ones and twos complement) and unsigned numbers are
supported with all math functions.
Keys A through F have been moved down to keyboard row 4 so they are
closer to the numeric keypad.
Illegal numbers are disabled when applicable (i.e., in BINARY base,
keys 2 through F are disabled)
Entry of both integers and reals are permitted without delimiters.
Math on reals still available while library is active.
Negative decimal integers are displayed such as "#-5d" using a custom
display routine.
All emulator library status is preserved when exited and reentered.
All emulator functions may be used in user program objects.
I still have versions on floppy-disk and can have more plug-in cards made
if the demand is there. The package includes library on card or disk, 130-page
user manual and mylar keyboard overlay. The floppy-disk based version is
$40.00 and the card-based version is $75.00. Both include shipping in the
U.S. via Priority Mail. (Sorry - I can't handle credit cards.)
Feel free to contact me by phone or by mail if additional information is
needed.
Jake Schwartz jsch...@motown.mmc.com
135 Saxby Terrace or
Cherry Hill, NJ Jak...@cup.portal.com
08003-4606
USA
609-751-1310 home (evenings and weekends)
609-722-3795 work (8-5 M-F)
>Here's what to do
>"Binary calculator"
[snipped out some handy tips]
Chris, I'm going to start using that. I could never imagine what I
would want to use a-Enter for...
>Is anyone aware of a reasonably easy-to-use hex/octal/binary calculation
>program for the 48?
I liked Christian's idea so much I expanded it into a little pack of
tools:
@ COMPSCI @
DIR
NORMAL
« 'OLDKEYS' DUP RCL
0 DELKEYS -63 CF STOKEYS
PURGE CST TMENU
»
ŒENTER
« "# " SWAP + OBJ »
KEYS
« RCLKEYS 'OLDKEYS'
STO -63 SF 0 DELKEYS
{ S "A" 21.1 "B" 22.1
"C" 23.1 "D" 24.1
"E" 25.1 "F" 26.1
NORMAL 91.1 }
STOKEYS
{ NORMAL AND OR XOR NOT STWS } TMENU
»
B 1
KB '1024_B'
MB '1024_KB'
CST { { "#MODE" KEYS } HEX DEC OCT
BIN '1_B' '1_KB' '1_MB'
STWS RCWS HOME }
END
To use this, Your calc should be in USER mode and with the CST menu
displayed. (This is how I always have my 48 configured, you may have
to adapt things to how you work) Anyway, when you CD to this
directory, the CST menu will display a few handy functions and "#MODE"
over the A key. Pressing this will enable the binary mode Christian
talked about, and will update the CST menu with some new functions.
NORMAL will restore the calculator to normal functioning, the others
are self explainatory. NOTE - because I wanted to use the menu while
in this mode, I had to move the keys for entering A-F. These keys are
now moved down one row, MTH = "A", PRG = "B" and so on. I've been
playing with it all day, and it seems quite handy. Again, pressing
NORMAL (or CANCEL) will restore the calculator to normal operations.
Sorry, missed the original post.
I have written a freeware HP-16C simulator library. It will be released in
the very near future. Currently, it is about 10300 bytes and runs only
on G/GX in non-covered RAM. S/SX support will be added in the next few
weeks.
It supports most of the HP-16C functionality, except:
- 1-complement mode.
- IEEE floating point numbers.
- It is not programmable (this rules out many functions that
only are useful in programs)
On the other hand, it gives you a 4-level RPN stack on the LCD, different
number bases without any messy #, variable word size (1-64), signed and
unsigned modes, carry and overflow flags, double operations and even
nibble memory. :-)
It has a full range of arithmetic, logical, shift and mask operations.
Binary numbers are grouped and large numbers can be scrolled using a
window similar to HP-16C.
I need a few peoply for beta testing, drop me a note if you think you
can do that during February to mid March.
Once again: This beta version will only run on a G/GX. Testing so far has
been on a HP48GX revision R.
--
Use MS-Windows every morning and nothing worse will happen to you all day.
email: h...@iar.se
>Is anyone aware of a reasonably easy-to-use hex/octal/binary calculation
>program for the 48? I'd just use the built-in mode, but it's too damn
>cumbersome having to enter the # every time, not just having a key that's
>"XOR" and so forth. I guess what I want is an HP-16 emulator for the 48. Any
>ideas?
>-c
Why all the overly complicated solutions?
Three 32 byte programs and a CST menu will do the same stuff
Program 1 << "#" SWAP + "d" + OBJ-> >>
STOred as DC
Program 2 << "#" SWAP + "o" + OBJ-> >>
STOred as OC
Program 3 << "#" SWAP + "h" + OBJ-> >>
STOred as HX
The CST Menu is { DC OC HX HEX OCT BIN }
Now you can flip back and forth easily (Yes, I just realized I forgot Binary
you can easily add it !)
You seem to be assuming the only use of a hex calculator is to convert to/from
other bases. The original poster was interested in the functions of an HP 16C.
This (since discontinued) calculator handled AND, OR, XOR, signed, unsigned,
shift left/right, rotate left/right, etc. I use all of these daily in my work.
Because I know of no other calculator (or software to emulate) that can touch
the 16C, I bought several of them when Educalc was closing them out.
If anyone does know of a 16C emulator for ANY other environment or system, I'd
be quite interested. (especially one that runs on X).
--
---------------------------------------------------------------
Daniel Senie Internet: d...@senie.com,
Daniel Senie Consulting n1...@senie.com
http://www.senie.com Packet Radio: N1...@KA1SRD.MA