HP Articles Forum
[Return to the Index ]
[ Previous | Next ]
HP-41 "Halfnut": patching the ROM for full lower case character set display
Posted by J-F Garnier on 28 Dec 2012, 12:25 p.m.
This article describes a simple patch of the HP-41 OS ROM to give access of a full lower case character set on the "halfnut" LCD.
Warning: using these patches on a "fullnut" HP-41 would give unexpected results: the lower case 'a' to 'e' characters may not be displayed at all any more!
These patches are to be used on an emulated HP-41, either by software or hardware. There is no way to modify the internal OS ROM of a standard HP-41.
The latest version of the HP-41 hardware (the "halfnut" version) includes several hardware enhancements (see ref.1). One is the support of the full lower case character set on the LCD. Unfortunately, the system ROM have not been updated by HP at the time to manage these extra characters, resulting in that all lower case characters above 'e' are actually displayed as the "fullstar" character.
The internal routine which manages the LCD display is the MASK entry point ($2C88). The purpose of this routine is to convert an ASCII character to LCD character form (not including comma, period and colon), see ref.2.
The patches are indicated below in bold .
=MASK 2C88 016 A=0 XS 2C89 130 020 LDI 020 (32) 2C8B 306 ?A<C X ascii < 32 ? 2C8C 097 GOC 2C9E yes, special char 2C8D 130 05F LDI 05F (95) *** 2C8F 0A6 ACEX X *** 2C90 306 ?A<C X ascii > 95 ? *** 2C91 0DF GOC 2CAC yes, new char *** 2C92 3D8 CSTEX 2C93 144 ST=0 6 mask 6 bits only 2C94 3D8 CSTEX 2C95 106 A=C X 2C96 1B0 C=STK 2C97 330 CXISA 2C98 170 STK=C 2C99 0A6 ACEX X 2C9A 346 ?A#0 X 2C9B 3A0 RTNNC 2C9C 006 A=0 X 2C9D 31B GONC 2C80 2C9E 04E C=0 W check special char table 2C9F 15C PT= 6 2CA0 090 LC 2 table entry at 2C00 2CA1 310 LC C 2CA2 01C PT= 3 2CA3 330 CXISA load 1 char from table 2CA4 366 ?A#C X match a special char ? 2CA5 033 GONC 2CAB yes 2CA6 222 C=C+1 PT point to next word 2CA7 3E3 GONC 2CA3 go on ! 2CA8 130 03A LDI 03A (58) all segment if not found 2CAA 35B GONC 2C95 2CAB 03C RCR 3 2CAC 056 C=0 XS 2CAD 236 C=C+1 XS C[2:0] has the special char 2CAE 323 GONC 2C92 replace it ***
A side effect of these patches is that characters above 127 are no more displayed as the "fullstar" character, they may be displayed as various characters and may even include the colon symbol. This affects only the LCD display, not the ALPHA register which still holds the correct characters.
References:
1. "Halfnut - An Internally Improved HP-41C,CV,CX", by Richard Nelson & Jeremy Smith, CHHU V2N4 p9 (July/August 1985).
2. Coconut mainframe VASM listing, HP NOMAS, 1985.