Sunteți pe pagina 1din 4

HP-41C/CV/CX MicroCode Emulator for Windows 95/98/Me/NT/2000 (Version 1.

02)
Copyright (C) 1983-2001 by HrastProgrammer <http://hrastprogrammer.tripod.com>
This is true microcode emulator of the HP-41C/CV/CX. It emulates all
instructions of the famous Nut CPU (CocoNut, HalfNut, HoneyNut, ...), ROM
loading, RAM saving and loading, standard and synthetical programming, speed
adjusting, various relevant hardware, etc. etc. All emulation is performed in
separate threads with different priorities. It even emulates real display
(14 segment LCD * 12 characters, punctuation, annunciators) and keyboard
behaviour (Press -> Instruction -> NULL), has Turbo mode with emulation in
highest priority thread and display refresh in idle process. Display is
emulated without any flicking, keyboard and mouse reactions are immediate,
auto turn-off after 10 minutes is supported. It has built-in debugger with
single-step execution, disassembler and tracer. It emulates BEEP and TONE
commands, too, but the quality of sound dependends on speed of the computer.
All ROMs I tried worked perfectly.
Short description and instructions:
(there is no Help file associated with the emulator)
0. ROM images:
The format of ROM image is very simple: it is a binary file where 10-bit
microinstructions are packed into bytes so 12KWord ROM is in fact 15KByte
file. The procedure for loading ROM images is as follows: first - directory
with emulator is scanned for presence of HP41E.ROM and if it is present then
it will be loaded, second - HP41E.INI file is scanned through [ROM] section
to find another ROM images to load.
This is [ROM] section format:
[ROM]
Modules=N
Module1=Address1 ModuleFile1 BankNotSwitched1
Module2=Address2 ModuleFile2 BankNotSwitched2
...
ModuleN=AddressN ModuleFileN BankNotSwitchedN
Example:
...
[ROM]
Modules=3
Module1=$0000 HP-41CX.ROM
Module2=$3000 CXFCN2D.ROM
Module3=$5000 CXTIME2C.ROM 1
...
Extra parameter (1) in line 'Module3=' decides how many pages in this module
are not bank switched. For 8K module and this parameter =1 first bank is not
switched and the second bank is switched. Up to four banks can be switched.
1. Running the emulator:
Simply start the program HP41E.EXE (directly or via shortcut) and this is
it. You can make some adjustments in HP41E.INI (see the comments there).
First time start will make 'MEMORY LOST'. Exiting the emulator will save
the contents of RAM to disk. When you next time start the emulator it will
load this RAM image to emulate continuous memory. In this case it will
start in 'Sleep' or 'Off' mode and you must press 'ON' key to wake it up.

You can suppress this behaviour by pressing and holding 'ON' key while
emulator is initialized (you will get 'MEMORY LOST'). You can suppress RAM
image saving by pressing and holding 'ON' key while emulator shuts down.
Calculator will automaticaly turn off (not shut down) after approx. 10 min
of inactivity.
2. Keyboard mapping (one HP-41 key can be assigned to few PC keys):
HP Key
------ON:
USER:
PRGM:
ALPHA:
Sigma+:
1/X:
SQRT:
LOG:
LN:
X<>Y:
RDN:
SIN:
COS:
TAN:
SHIFT:
XEQ:
STO:
RCL:
SST:
ENTER^:
CHS:
EEX:
<-:
-:
7:
8:
9:
+:
4:
5:
6:
*:
1:
2:
3:
/:
0:
.:
R/S:

PC Key
------F1
F2 Insert
F3 Home
F4 ' " ` End
A a
B b
C c
D d
E e
F f
G g
H h
I i
J j
F5 Up Prior
K k
L l
M m
F6 Down Next
N n Enter
O o
P p
F7 BS Delete
Q q R r 7
S s 8
T t 9
U u +
V v 4
W w 5
X x 6
Y y *
Z z 1
= 2
? 3
: /
Space 0
, .
F8 Right

3. Mouse commands:
Mouse is used instead of fingers to press keys on the keyboard. To move the
calculator to any locations on the screen you simply drag them with the
mouse on any location outside the buttons and drop them to location you want.
New location is preserved when you exit the calculator. In the upper left and
right conners of the calculator there are four buttons (in flat style):
'Center','Turbo','Minimize' and 'Exit'. 'Exit' button exits the calculator
and saves RAM image (keyboard equivalent is <Esc> or <Alt+F4>). Notice that
'ON' key doesn't exit the calculator - it simply turns it 'Off' and 'On'

again. 'Minimize' button minimizes the calculator to the Taskbar. 'Center'


button centers the calculator on the screen. 'Turbo' button boosts the
emulator thread to highest priority in which it will run about 50 times
faster than normal with display emulation in idle time. Pressing 'Turbo'
button again returns to normal speed. You can toggle 'Turbo' mode via
keyboard with <F9>. 'Turbo' mode doesn't affect keyboard handling because
display is refreshed on every press of the button or key (not on release)
and emulator switch to normal mode after pressing the button or key and
restore the 'Turbo' mode after releasing.
4. Debugger:
Debugger can be activated with double-click on the HP-41C image between the
buttons in first row. This will open debugger window on the right side of
the calculator. Debugger shows all CPU, display and time chip registers
together with disassembling of current instruction. You can single-step
to the next instruction or exit debugger and resume normal execution. You
cannot set breakpoints and disassemble or dump blocks of memory (maybe
available in the future). There is also the ability to trace throuh the code
and save the state of the CPU for every instruction to the file for later
inspection. And finally, there is animation mode which isn't usefull at all
but looks pretty.
5. Emulator speed:
The speed of emulation strongly depends on the speed of your computer.
HP41E.INI file contains the [CPU] section with rows 'TICKS=' and 'TURBO='.
With 'TICKS=' you can set the number of ticks to slow down emulator (bigger
is slower) on fast computers. Too low values can cause emulator to run
incorrectly. You can also set 'TURBO=1' to activate Turbo mode on start.
To make speed adjustments more comfortable I added a small scroll bar
at the bottom of the emulator. It appears only when the mouse is over it.
Simply set the position of the thumb to appropriate value. This value is
saved to INI file on exit. Speed adjustment is not available in Turbo mode.
Also, there are two more values in the INI file you can play with:
'NormalPriority' and 'TurboPriority' (names speak for themselves).
6. Command line options:
/A or -A: Activate animation mode on start.
/D or -D: Activate debugger on start so you can single-step from the
beggining.
/P or -P: Show printer window on start.
/T or -T: Turn on trace option. Every single CPU microinstruction will
be logged to HP41E.LOG together with the contents of all
CPU registers. This will significantly slow down the emulator.
Trace option is not available in 'Turbo' mode.
7. Final word:
Required ROM images are released by HP to the public under NOMAS license (NO
MAnufacturer Support) many years ago. They can be found elsewhere on the
Internet but I have included them to simplify the use of the emulator.
I am not responsible for anything you do with this software. The emulators
are not designed to make any (software or hardware) damage but (due to the
complexity of the code) if something goes wrong I am not responsible for that.

Again: use this software at your (and only your) own risk!
Consult the LICENSE.TXT before using this software.
Now you can enter your 'Byte Grabber' with ASN ALPHA + ALPHA LN ASN ALPHA
DEL ALPHA LOG USER PRGM LBL ALPHA T ALPHA CAT 1 R/S (while display shows
LBL "T") DEL 001 BST GTO .005 DEL 003 ALPHA ?AAAAAA ALPHA PRGM GTO ..
Press and hold 'LN' key and you will see XROM 28,63 followed by NULL.
What is following next depends on your imagination.
Please check my HP41E for HP-48S/SX/G/G+/GX and HP-49G, too.
Best regards,
HrastProgrammer.

S-ar putea să vă placă și