1009716520 chen@laptop.office
1. added commnets

====================================================================

NOTE: This file (Chapter 5 of 95LX developer documentation) has not been
NOTE: completely "ASCII-ized".  Only the first 10% of it has been.  Starting
NOTE: around line 540 you will start finding all kinds of "formatting commands"
NOTE: or "tags".  All of the information is here, but it's not formatted very
NOTE: nicely.  Sorry about that.  If there were 48 hours in a day and squid
NOTE: could fly, I'd have gotten this file "cleaned up".  C'est la vie!
NOTE:
NOTE: (By the way.  The information is provided "as is", with no warantee,
NOTE: guarantee, or any other kind of "tee" as to it's usefulness, accuracy,
NOTE: or worthiness.  Use at your own risk.
NOTE:
NOTE: If anyone else cares to "clean up" the rest of the document and repost
NOTE: it, please feel free to do so.  I do ask that you add your own note after
NOTE: this one, though, explaining what you've done.
NOTE:
NOTE: Everett Kaser --- 5/6/94

NOTE: I did a 'quickie'  clean up, so the text is at least readable.
NOTE: Unfortunately, some of the figures were apparently 'embedded objects',
NOTE: so their information is missing.  When (at least partly) applicable, I
NOTE: inserted the appropriate 'bits' from the IBM BIOS Tech. Ref.
NOTE:
NOTE: All missing figures are denoted by the string '<Missing Figure>'.
NOTE:
NOTE: Mark E. Huss --- 5/17/94

==============================================================================

        CHAPTER 5:   HP 95LX BIOS

==============================================================================

===== OVERVIEW =====

This chapter contains the specification for the HP 95LX ROM Basic Input/Output
(BIOS) System. The BIOS provides the lowest level of software support for
applications running on the HP 95LX. This specification describes in detail the
implementation of the Hewlett-Packard 95LX BIOS which is designed to be
completely compatible with IBM's new version of the PC-XT. In addition to the
PC-XT BIOS functions, the HP 95LX BIOS includes a small number of BIOS
functions that are compatible with the IBM PC-AT.

The HP 95LX BIOS is based upon an XT-level BIOS source code obtained from
Phoenix Software Associates (PSA). The code Hewlett-Packard purchased from
PSA is compatible with the IBM PC-XT of pre-April 1986 vintage - that
is, before the introduction of a new version of the XT with the enhanced
keyboard. To our knowledge, the PSA XT code received by Hewlett-Packard does
not infringe any of IBM's copyrights to the XT BIOS code. In the same spirit,
Hewlett-Packard has added to and modified the PSA code without infringing 
IBM's copyright.

HP 95LX HARDWARE SET
--------------------

The HP 95LX is an Information-Management Calculator. It features an 8088
processor and hardware set that is moderately compatible with an IBM PC-XT.
Differences between the HP 95LX and IBM PC-XT hardware are:

    * The HP 95LX has a smaller display (LCD) than an IBM PC-XT. The
      HP 95LX display size is 40 by 16 (text) or 240 by 128 dots (graphics)
      vs the XT's monochrome display size of 80 characters by 25 (text) or
      320 by 200 dots (CGA graphics). The Display RAM in the HP 95LX is the
      same size as that of an IBM PC-XT with a Monochrome Display Adapter
      (4K bytes). Also, there is provision to window around in the
      display RAM, so the user can see the contents of all 4K of RAM.

    * The HP 95LX's display cursor size control is different from that of
      an IBM PC-XT.

    * The HP 95LX has no mechanical disk; instead there is a built-in
      electronic RAM disk.

    * Hewlett-Packard 95LX has a different keyboard layout from the
      IBM PC-XT.

    * The HP 95LX's keyboard management is different from that of the the
      IBM PC-XT. Keyboard Scans are implemented in software in the HP 95LX
      but are performed by an 8048 microcontroller in an IBM PC-XT.
      However, the HP 95LX keyboard-interrupt service routine emulates the
      keyboard-interrupt service routine in the 8048.

    * The HP 95LX supports plug-in ROMs.

    * The HP 95LX supports plug-in RAMs - all memory in plug-in RAM is used
      as RAM disk.

    * The HP 95LX is switched ON or OFF under software control, as opposed
      to an IBM PC-XT which is switched ON or OFF by a hardware switch that
      controls power to the entire machine.

    * The HP 95LX display (LCD) contrast adjustment is under software
      control. This is fundamentally different from the IBM PC-XT's
      brightness control, which uses potentiometer adjustment.

    * The HP 95LX does not support a parallel printer. However, it does
      support a serial printer which uses XON-XOFF flow control.

    * The HP 95LX supports only one serial port UART. However the serial
      channel can be directed either to the IR or the wired serial port.

    * The HP 95LX RAM is 8 bits wide. There is no parity bit, as in the
      IBM PC-XT.

    * The HP 95LX's hardware-interrupt set is not identical in function to
      that in an IBM PC-XT.


CHANGES TO PSA CODE
---------------------

The following changes were made to the Phoenix Software Associates' (PSA)
XT-level BIOS source code. This list just touches on the major changes. To
obtain more information on the changes made, refer to the sections on the BIOS
Interrupts or go directly to the BIOS source code.

    <RESET VECTOR>  POWER-ON CODE WAS CHANGED so that turning on the
                    HP 95LX causes the computer to return to the
                    application that was running before the system was
                    powered down.

    INT 02          NONMASKABLE INTERRUPT (NMI).
                    This is invoked in the IBM PC-XT when a RAM parity
                    error occurs. It is invoked on the HP 95LX by either a
                    Low-Battery or Module-Pulled event.

    INT 05          PRINT-SCREEN INTERRUPT.
                    This prints the contents of the active display window
                    only, not the contents of the entire display memory as
                    in the IBM PC-XT.

    INT 06          LOW-POWER HOOK.
                    This interrupt is called by the system:
                        * Just before going into light sleep.

                        * Just after awakening from light sleep.

                        * Just before going into deep sleep.

                        * Just after awakening from deep sleep.

    INT 08          TIMER-HARDWARE SERVICE.
                    The timer service was modified to add display window
                    control and battery-level checks.

    INT 09          KEYBOARD INTERRUPT.
                    Int 09 was modified to support Char key translations,
                    Mute key translations and the ALT-NUMPAD code was
                    modified to work with the top row number keys instead
                    of the number pad keys.

    INT 0A          MISCELLANEOUS INTERRUPT.
                    This is a reserved interrupt in the IBM PC-XT.

    INT 0B          KEYBOARD AND TOUCH-PANEL-HARDWARE INTERRUPT.
                    Hardware keyboard interrupt in the HP 95LX is INT Bh,
                    *not* INT 09. INT 0Bh code debounces pressed keys and
                    places their key codes in the keycode register
                    (I/O address 60h). Then it invokes the INT 09 service
                    routine.

    ************
    * NOTE !!! *    INT 0Bh is the COM2 interrupt in the IBM-XT.
    ************
    
    INT 0D          SYSTEM-CONTROLLER-IR INTERRUPT.
                    This is the fixed-disk interrupt in the IBM PC-XT.

    INT 0E          EXTERNAL XINT PIN-HARDWARE-INTERRUPT ROUTINE.
                    This is diskette interrupt in the IBM PC-XT.

    INT 0F          SYSTEM CONTROLLER RTC INTERRUPT.
                    This is the LPT1 interrupt in the IBM PC-XT.

    INT 10          VIDEO SERVICES.
                    Changed CGA functions to maintain a moderate degree of
                    compatibility. Left MDA functions intact.

    INT 13          Disk Services.
                    Modified to work with a RAM disk.

    INT 14          SERIAL-PORT SERVICES.
                    Removed waits for DSR and CTS set when sending a
                    character. Removed wait for DSR set when receiving a
                    character. The receive character service changes the
                    serial port interrupt vector to point to a dummy-
                    interrupt service routine (just an IRET).

    INT 15          SYSTEM SERVICES (Cassette control in now defunct XT).
                    Just about all of Int 15 is new. Keyboard translation
                    hook (Int 15 function 4F).

    INT 16          KEYBOARD SERVICES.
                    Modified to trap an [ON] key press while machine is
                    running. Also invokes light sleep code.

    INT 17          PRINTER SERVICES.
                    Modified to work with a serial printer. It implements
                    the XON-XOFF handshake in the HP 95LX.  These services
                    change the serial port vector to point to a serial
                    service routine that handles XON-XOFF handshakes.

    INT 19          BOOT SERVICE.
                    Now boots DOS from ROM.

    INT 1A          TIME-OF-DAY SERVICES.
                    Added support of real time clock, including the
                    capability of setting an alarm. The alarm is capable of
                    turning on power to the unit.

    INT 1E          SET TO A DUMMY IRET.
                    This is the disk parameter table in the IBM-XT.

    INT 1F          GRAPHICS-CHARACTER-TABLE POINTER.
                    This points to a code page 850 font for characters
                    80h - FFh.

The following PSA interrupt handlers were not modified:

    INT 11          Equipment-Check Service.
    INT 12          Get-Memory-Size Service.
    INT 14          Serial-Port Service.
    INT 1B          Keyboard-Break-Default Handler.
    INT 1C          Timer-Tick-Default Handler (how can you change an IRET?).
    INT 1D          Video-Parameter Table.



===== HP 95LX BIOS RAM DEFINITION =====

This section describes how memory is organized and used by the HP 95LX BIOS.

HP 95LX Memory Map

    Start address       contents
    -------------       ---------------------------------------------------
    00000h              Interrupt vectors
    00400h              BIOS data area
    00600h              DOS data area
    01000h              Memory mapped display RAM (provides RAM mapped into
                        B0000h for the "MDA display"
    02000h              DOS data area
    (variable)*         DOS
    (variable)*         application program area
    (variable)*         RAM Disk portion of drive C:
    80000h              unused in 512K unit (part of variable RAM on 1M unit)
    A0000h              OS functions (DOS, COMMAND.COM)
    B0000h              MDA display RAM
    B1000h              unused
    C0000h              64K byte page frame
    D0000h              64K byte page frame
    E0000h              16K byte page frame
    E4000h              16K byte page frame
    E8000h              16K byte page frame
    EC000h              16K byte page frame
    F0000h              BIOS ROM and SysMgr

* The size of the DOS area varies since optional drivers and buffers may occupy
  variable amounts of RAM, and the RAM disk size is adjustable.


INTERRUPT VECTOR TABLE
----------------------

The interrupt vector table is in address range 0:0000h through 0:3FFh. Vectors
used by the HP 95LX BIOS are initialized by the BIOS-initialization code.

The following table lists the interrupt vector assignments and identifies
each interrupt by function and type. The interrupts consist of four types,
Services, ISRs, Hooks, and Tables:

    * Service Interrupt is an application-program-callable interrupt.
      Such interrupts provide functions that an application can call by
      using the appropriate ++Int++ instruction.

    * An ISR Interrupt is a hardware-interrupt service routine. These
      routines should not be called from applications since unpredictable
      results may occur.

    * A Hook Interrupt is an interrupt service routine provided for
      applications to optionally take over.

    * A Table Interrupt is a pointer to a table of data bytes. 

Interrupt Vector Assignments    Note: SC == SYSTEM CONTROLLER


Int      Address    Function                            Type
-------  ---------  ----------------------------------  --------
00h      000-003    Divide by Zero.                     Hook
01h      004-007    Single Step.                        Hook
02h      008-00B    NMI Interrupt.                      Hook
03h      00C-00F    Breakpoint.                         Hook
04h      010-013    Arithmetic Overflow.                Hook
05h      014-017    Print Screen.                       service
06h      018-0B1    Low Power.                          Hook
07h      01C-0F1    Reserved.                           Hook
08h      020-023    IRQ0, Timer0 HW Int.                ISR
09h      024-027    IRQ1,PC Compatible KB Int.          ISR
0Ah      028-02B    IRQ2, SC Misc. Int.                 ISR
0Bh      02C-02F    IRQ3, SC KB & Touch Panel Int.      Hook
0Ch      030-033    IRQ4, SC UART Int.                  Hook
0Dh      034-037    IRQ5, SC IR Input Int.              ISR
0Eh      038-03B    IRQ6, SC XINT Pin Int.              ISR
0Fh      03C-03F    IRQ7, SC RTC Int.                   ISR
10h      040-043    Video Series.                       Service
11h      044-047    Equipment Chack.                    Service
12h      048-04B    Memory Size.                        Service
13h      04C-04F    Flexible Disk Services.             Service
14h      050-053    Serial Port Services.               Service
15h      054-057    System Functions.                   Service
16h      058-05B    Keyboard Services.                  Service
17h      05C-05F    Dummy Return.                       -
18h      060-063    Reserved.                           -
19h      064-067    Boot.                               service
1Ah      068-06B    Time-of-Day Services.               Service
1Bh      06C-06F    Keyboard Break.                     Hook
1Ch      070-073    Timer Tick.                         Hook
1Dh      074-077    Video Parameter Table Pointer.      Table
1Eh      078-07B    Flexible Disk Parameter Table Ptr.  Table
1Fh      07C-07F    Graphics Character Table Pointer.   Table
20h-3Fh  080-0FFF7  Reserved for DOS.                   -
40H-49h  100-127    Reserved.                           -
4Ah      128-12B    Alarm Interrupt.                    Hook
4Bh-5Fh  12C-17F    Reserved.                           -
60h-61h  180-187    System Manager Interrupts.
62h      188-18B    Reserved.                           -
63h      18C-18F    XIP Services.
64h-6Fh  190-1BF    Reserved.                           -
70h      1C0-1C3    Real-Time Clock Interrupt.          ISR
71h-F0h  1C4-3C3    Reserved.                           -
F1h-FFh  3C4-3FF    Not Used.                           -


Most HP 95LX interrupts have the same function as the corresponding PSA
interrupt (see page 28 of the Phoenix manual). Interrupts with different
functions from the PSA BIOS definition are shown in the following table:


Int     HP 95LX\Function        IBM-XT\Function         Type            IRQ
---     ----------------        ---------------         ----            ---
02h     Low Batt & Card Pulled. RAM Parity Errors.      Non-Maskable    NMI
06h     Low Power Hook.         Reserved.               Hook
09h     Keyboard.               Keyboard.               Hardware*       1
0Ah     Miscellaneous.          Reserved.               Hardware        2
0Bh     Kbd & Touch Panel.      COM2.                   Hardware        3
0Dh     IR Input.               Hard Disk.              Hardware        5
0Eh     XINT Pin.               Floppy Disk.            Hardware        6
0Fh     RTC                     LPT                     Hardware        7


* INT 09h is a hardware interrupt in the IBM PC-XT, but it is invoked by
  software in the HP 95LX. After an INT 0Bh, the HP 95LX software scans and
  debounces the keyboard and writes the keycode to the Keycode register (60h).
  Then it invokes INT 09h.


BIOS DATA AREA
--------------

The BIOS data area is also set up by the BIOS initialization code. The
HP 95LX RAM definitions are similar to PSA XT BIOS definitions, except as
noted in the following table.  All lengths are in bytes.

HP 95LX BIOS Data Area Definitions

Address   Length    Description
-------   ------    ----------------------------------------------------------
40h:00h     8       I/O address of up to 4 serial communication ports.
40h:08h     6       I/O address of up to 3 parallel ports. Set to all 00s in
                    the HP 95LX.
40h:0Eh     2       Not used.
40h:10h     2       Equipment variable (see int 11h), where:
                    bit     definition
                    -----   --------------------------------------
                    15-14   Define the number of printer adapters.
                    13-12   Reserved.
                    11-9    Number of RS-232 adapters.
                    8       Reserved.
                    7-6     Number of disk drives where:
                                00b = 1
                                01b = 2 drives
                    5-4     Initial video mode (11b in the HP 95LX)
                    3-2     Installed Memory Size (11 = at least
                            256K installed).
                    1       If Math Coprocessor installed.
                    0       If disk installed.
40H:12h     1       Reserved.
40h:13h     2       Installed memory in kilobytes (see int 12h).
40h:15h     2       Reserved.
40h:17h     1       Keyboard flag 1 (see int 16h), where:
                    bit     definition
                    -----   --------------------------------------
                    7       1 = Insert active.
                    6       1 = Caps Lock active.
                    5       1 = Num Lock active.
                    4       1 = Scroll Lock active.
                    3       1 = Alt pressed.
                    2       1 = Ctrl pressed.
                    1       1 = Left Shift pressed.
                    0       1 = Right Shift pressed.
40h:18h     1       Keyboard flag 2, where:
                    bit     definition
                    -----   --------------------------------------
                    7       1 = Insert pressed.
                    6       1 = Caps Lock pressed.
                    5       1 = Num Lock pressed.
                    4       1 = Scroll Lock pressed.
                    3       1 = Ctrl-Num Lock state active.
                    2       1 = Sys Req pressed.
                    1       1 = Left Alt pressed.
                    0       1 = Left Ctrl pressed.
40h:19h     1       Alt-key, keypad buffer.
40h:1Ah     2       Key buffer read pointer.
40h:1Ch     2       Key buffer write pointer.
40h:1Eh     32      Key buffer (16 words).
40h:3Eh     1       Floppy recalibrate status (not used in the HP 95LX).
40h:3Fh     1       Floppy motor status (not used in the HP 95LX).
40h:40h     1       Floppy motor time-out count (not used in the HP 95LX).
40h:41h     1       Disk status return code where:
                    bit     definition
                    -----   --------------------------------------
                    7       1 Drive not ready.
                    6       1 seek error occured.
                    5       1 disk ctlr failed.
                    4-0     Error codes, where:
                                00h No error.
                                01h Illegal function was requested.
                                02h Address mark not found.
                                03h Write-protect error.
                                04h Sector not found.
                                06h Drive door was open.
                                08h DMA overrun error (not used in 95)
                                09h DMA bound. error (not used in 95)
                                0Ch Unknown media type.
                                10h CRC failed on disk read.
40h:42h     7       Floppy controller status and command bytes
                    (not used in the HP 95LX)
40h:49h     1       Video mode setting
40h:4Ah     2       Number of columns on screen
40h:4Ch     2       Video buffer length (bytes)
40h:4Eh     1       Offset address of current display page
40h:50h     16      Cursor coordinates for 8 pages. Two bytes each page.
                    First byte of each pair is column; second byte is row.
                    (0,0) is upper left corner of screen.
40h:60h     2       Cursor size. 1st byte end scan line; 2nd byte start
                    scan line.
40h:62h     1       Current display-page number.
40h:63h     2       Base I/O address of video controller.
40h:65h     1       Display-controller-mode-select-register copy.
40h:66h     1       Display-controller-pallette-register copy.
40h:67h     4       Reserved.
40h:6Bh     4       Reserved.
40h:6Ch     4       Timer count-number of ticks since midnight.
40h:70h     1       24-hour-rollover flag.
40h:71h     1       Ctrl-Brk flag (bit 7 = 1: [Ctrl][Break] pressed).
40:72h      2       Warm-start flag: 1234h means warmstart.
40h:74h     1       Hard-disk status (not used in the HP 95LX).
40h:75h     1       Number of hard disk drives (set to 0 in the HP 95LX).
40h:76h     1       Hard-disk-control-byte copy (not used in the HP 95LX).
40h:77h     1       Hard-disk-controller-port offset (not used in 95).
40h:78h     3       Parallel-printer-time-out table. Ports 0-2.
40h:7Bh     1       Halt value. Used for return time-out count of Int 15h
                    service 41h.
40h:7Ch     4       Serial port time-out table. Ports 0-3.
                    (Only port 1 is used in the HP 95LX).
40h:80h     2       Offset key buffer.
40h:82h     2       Offset of first byte after key buffer.
40h:84h     1       Number of video rows-1 EGA mode (not used in HP 95LX)
40h:85h     2       Character height EGA mode (not used in the HP 95LX).
40h:87h     1       Video control bits EGA mode (not used in the HP 95LX).
40h:88h     1       EGA/VGA switch data (not used in the HP 95LX).
40h:89h     1       EGA/VGA control bits (not used in the HP 95LX).
40h:8Ah     1       Index into DCC table VGA mode (not used in HP 95LX).
40h:8Bh     1       Last floppy data rate selected (not used in 95)
40h:8Ch     1       Hard-disk-controller-status copy (not used in 95).
40h:8Dh     1       Hard-disk-error-status copy (not used in the HP 95LX).
40h:8Eh     1       Hard-disk-interrupt flag (not used in the HP 95LX).
40h:8Fh     1       Hard-disk-controller flag (not used in the HP 95LX).
40h:90h     2       Floppy drice 0/1 media state (not used in the HP 95LX).
40h:92h     2       Floppy drive 0/1 operation state (not used in HP 95)
40h:94h     2       Floppy drive 0/1 track number (not used in 95)
40h:96h     1       Keyboard flag 3 (not used in the HP 95LX).
40h:97h     1       Keyboard LED flag (not used in the HP 95LX).
40h:98h     4       Vector-to-user wait flag (not used in the HP 95LX).
40h:9Ch     4       User wait count-low word, high word order
                    (not used in the HP 95LX).
40h:A0h     1       Wait active flag (not used in the HP 95LX).
40h:A1h     2       Number of timer ticks until display time-out.
40h:A3h     2       Display time-out reset value.
40h:A5h     1       Printer status flag.
40h:A6h     1       Cursor mevement flag.
40h:A7h     1       Card Detect Register Copy. (from port E304)
                    port E304 = 00 if no card inserted
                    port E304 = 50 if flash (SDP5) or SRAM is inserted
                    port E304 = 40 if Modem card is inserted.
                    i.e. b6 = card inserted
                         b5 = card type is flash, SRAM, linear flash
                    Note that the palmtop refuse to wakeup by pressing
                    [On]-Key when the Ethernet PCMCIA Card Accton EN2216
                    is insrted. So I could not find the value at this
                    port when it is inserted. 1009716520 
40h:A8h     4       Pointer to table of EGA pointers (not used in the HP 95LX).
40h:ACh     2       CPU register checksum.
40h:AEh     2       User RAM checksum.
40h:B0h     2       System Controller register checksum.
40h:B2h     2       Stack Segment register save location.
40h:B4h     2       Stack Pointer register save location.
40h:B6h     2       Day Counter. This word contains the count of times the
                    software clock at 40h:06Ch has been set to zero.
40h:B8h     1       RTC century value in bcd.
40h:B9h     1       RTC year value in bcd.
40h:BAh     1       RTC month value in bcd.
40h:BBh     1       RTC day of month value in bcd.
40h:BCh     1       RTC hour value in bcd.
40h:BDh     1       RTC minute value in bcd.
40h:BEh     1       second value in bcd.
40h:BFh     1       RTC daylight savings time flag.
40h:C0h     1       RTC alarm hour value in bcd.
40h:C1h     1       RTC alarm minute value in bcd.
40h:C2h     1       RTC alarm second value in bcd.
40h:C3h     1       RTC alarm status.
40h:C4h     2       RTC timer value (the last value written to RTC register).
40h:C6h     1       NCE[1] RAM FLAG, where:
                    32 indicates 2048 kbytes
                    16 indicates 1024 kbytes
                    08 indicates 512 kbytes
                    04 indicates 256 kbytes
                    02 indicates 128 kbytes
                    01 indicates 64 kbytes
                    00 indicates 0 kbytes
40h:C7h     1       NCE[2] RAM FLAG, where:
                    32 indicates 2048 kbytes.
                    16 indicates 1024 kbytes.
                    08 indicates 512 kbytes.
                    04 indicates 256 kbytes.
                    02 indicates 128 kbytes.
                    01 indicates 64 kbytes.
                    00 indicates 0 kbytes.
40h:C8h     1       Low Battery flags.
40h:C9h     1       Voltage Reference value.
40h:CAh     2       Keyboard output register copy.
40h:CCh     1       Port Locked & System Manager Media Changed flags, where:
                    bit 7 set indicates port 1 locked.
                    bit 6 set indicates port 0 lockes.
                    bits 2-5 unused.
                    bit 1 set indicates port 1 media changed.
                    bit 0 set indicates port 0 media changed.
40h:CDh     1       Shift Annunciator flag.
40h:CEh     8       Shift Annunciator save location.
40h:D6h     1       Unused.
40h:D7h     11      OLD BIT MAP (the last bit map collected by INT 0Bh).
40h:E2h     22      Keyboard work area.
40h:F8h     1       Last key pressed.
40h:F9h     1       Key repeat counter.
40h:FAh     1       Miscellaneous Key flags.
40h:FBh     1       Mute Key flags.
40h:FCh     1       Number of 33 msec ticks after key press before key
                    repeat starts.
40h:FDh     1       Number of 33 msec ticks between 'keys' during typematic key
                    repeat.
40h:FEh     1       Unused.
40h:100h    1       Print Screen status byte, where:
                        00h = No Print-Screen activity.
                        01h = Print-Screen operation in progress.
                        FFh = Previous-Print Screen operation failed.
           

===== HP 95LX BIOS ID BLOCK =====

The BIOS ROM contains a block of information which encodes the
identification of the machine, and indicates the date the BIOS was created.
The BIOS ID Block begins at FFFF:5.

FFFF:5        Date of BIOS release formatted as MM/DD/YY (8 bytes).
FFFF:D        Unused.
FFFF:E        System model id (FEh for the HP 95LX).
FFFF:F        Unused.


===== BATTERY CHECK =====

There are two batteries in the HP 95LX: the Main battery and the Backup
battery. In addition, each RAM card has its own battery.

Checks are performed on each battery to detect low voltage. If a battery is
has low voltage, the approprate message is shown. The low-battery messages
are:

    MAIN BATTERY LOW

    BACKUP BATTERY LOW

    CARD BATTERY LOW


MAIN BATTERY
---------------------

The main battery is checked at power on and once per minute while the
HP 95LX is running. If the battery is low, the "MAIN BATTERY LOW"
message is displayed each time the computer is powered on. Also, if the
battery drops below 2.0 volts while the machine is running, the "LOW MAIN
BATTERY" message is displayed the first time the voltage is found below
this threshold. The thresholds for the main battery are:

    2.5 Volts        LOW MAIN BATTERY message disabled.
    2.0 Volts        LOW MAIN BATTERY message enabled.
    1.8 Volts        System Shutdown to backup mode.

In other words, the LOW MAIN BATTERY message is disabled until the voltage
drops below 2.0 volts. Once the message is enabled, it will be displayed each
time the HP 95LX is powered on. The message is disabled if the main battery
voltage goes above 2.5 volts.

If the main battery voltage drops below 1.8 volts, the computer's hardware
causes a system shut down to backup mode.


BACKUP BATTERY
---------------------

The backup battery status is checked and displayed only at power on. The
voltage from the backup battery is passed through a voltage divider, so that
the thresholds measured by the System Controller Chip are shifted downwards.
The thresholds are:

TERMINAL VOLTAGE    VOLTAGE DIVIDER OUTPUT
    3.05 Volts      2.77 Volts          LOW BACKUP BATTERY message disabled.
    2.78 Volts      2.49 Volts          LOW BACKUP BATTERY message enabled.

The "LOW BATTERY" message is disabled until the backup battery terminal
voltage drops below 2.78 volts. Once the message is enabled, it will be
displayed each time the HP 95LX is powered on until the terminal voltage
goes above 3.05 volts.


CARD BATTERY
---------------------

The plug-in card battery status is tested and displayed only at power on.
The thresholds are:

TERMINAL VOLTAGE
    2.60 Volts      LOW CARD BATTERY message disabled.
    2.40 Volts      LOW CARD BATTERY message enabled.


===== POWER MANAGEMENT =====

The HP 95LX is unique among Hewlett-Packard CMOS calculators in that power
to the CPU is completely shut off when the machine is turned off. This
means that the CPU registers are reset to default values whenever the
machine is turned on. Furthermore the CPU starts executing instructions at
a different address when it is powered on, compared to where it was running
when it was powered off.

However, it is desirable from the user's viewpoint to be able to turn off the
machine, then later turn it on and have it continue in the same application
that was previously running. The purpose of the power-management code is to
perform that function. In addition, the power-management code performs several
quick checks to verify that the saved CPU registers, the
System-Controller-Memory-Management registers, the USER RAM, and the built-In
RAM DISK were not corrupted while power was off. If any of these were
corrupted, the power management-code will perform either a warm start or a
cold start.


POWER OFF
---------------------

Deep Sleep is invoked when any of the following events occur:

    * The [ON] key is pressed when the HP 95LX is ON.

    * The System Timer times out because the HP 95LX was idle during the
      timeout interval.

    * A Very Low Battery Interrupt.

    * An Application program invokes INT 15h function 42h.

The Power-Down Code behavior is described by the following flowcharts:

    HP 95LX Power-Down Code Behavior <Missing Figure>

This is the normal power-down sequence. All CPU registers except SS and SP
are saved on the user's stack; SS and SP are saved in the BIOS data.
Checksums are computed for the stack area containing the CPU registers, the
System Controller memory configuration registers, and user RAM. These are
saved for use when the machine is powered back on. The checksums of the
built-in RAM disk and plug-in RAM disk are computed each time the disk is
written to.


NORMAL POWER UP BEHAVIOR
------------------------

The code that controls power on is accessed by the reset vector
(0FFFFh:0000h). This is invoked when the ON key is pressed while the
computer is off.


WARM START BEHAVIOR
---------------------

Warm Start is normally invoked by pressing the [CTRL] [ALT] [DEL] keys
simultaneously. Warm Start is also invoked if the user RAM is found to be
corrupted during normal power on initialization. It initializes user RAM,
then invokes Int 19h bootstrap loader.


COLD START BEHAVIOR
---------------------

Cold Start is invoked by pressing the [SHIFT] [CTRL] [ON] keys
simultaneously or, if the Built-In RAM disk is found to be corrupted during
normal power on. It initializes the User RAM and built in RAM DISK, but not
the plug-in RAM DISK. The user is prompted to verify whether or not to blow
away the built-in RAM disk. After all initializations are completed, Cold
Start invokes Int 19h bootstrap loader.


INITIALIZATION FLOW CHARTS
--------------------------

The following flow charts describe the behavior of the HP 95LX during
Normal Power On, Warm Start and Cold Start:

    HP 95LX Power On A  <Missing Figure>

    HP 95LX Power On B  <Missing Figure>

    HP 95LX Power On C  <Missing Figure>

    HP 95LX Power On D  <Missing Figure>

    HP 95LX Warm Start  <Missing Figure>

    HP 95LX Cold Start  <Missing Figure>


===== INTERRUPTS =====

The remainder of this chapter describes the interrupt protocols built into
the HP 95LX.

==============================================================================
    H A R D W A R E    I N T E R R U P T S
==============================================================================

INT 02H - NONMASKABLE INTERRUPT
-------------------------------

The hardware-nonmaskable interrupt is invoked when either a module pulled or
low battery event occurs. The Nonmaskable-Interrupt routine handles these two
events:

  -- Low Battery

If a low battery event occurs, the HP 95LX goes into deep sleep as quickly as
possible. The checksums for User RAM, CPU registers, and hopper registers are
not computed. A warm start will always occur on the next wake up after a low
battery shut down.

  -- Module Pulled Interrupt

The behavior of the module pulled event depends on whether the machine is in
deep sleep or not. If the machine is in deep sleep, the module pulled
interrupt is disabled, and the module pulled event is not detected until the
next time the machine powers on. If the machine is not in deep sleep (i.e.
CPU running or in light sleep), an interrupt is generated. 

The behavior of the non-maskable interrupt code is shown in the following
flow charts:

    HP 95LX NMI (Non-Maskable Interrupt)    <Missing Figure>

    HP 95LX Low Battery                     <Missing Figure>

    HP 95LX Module Pulled                   <Missing Figure>

==============================================================================

INT 05h - PRINT SCREEN INTERRUPT
---------------------------------

This interrupt executes the BIOS print-screen function, causing the current
screen contents to be written to serial printer port 0. The cursor position
is saved before the operation is begun, and restored once the printout has
been completed. The Print-Screen service routine can be initiated by pressing
the [Print Screen] key on the keyboard or by issuing an Int 05h in a
program. When executed, the Print-Screen service routine updates a status
byte at address 40h:100h. The value of this byte is interpreted as follows:

* 00h No Print Screen activity.

* 01h A Print Screen operation is in progress.

* FFh The previous Print Screen operation terminated with an error.

The Print-Screen routine is not re-entrant. Additional Print Screen calls are
ignored while a Print Screen operation is in progress. This prevents multiple
screen printouts from being queued (for example, if the [Print Screen] key
is quickly pressed more than once). 

Print Screen prints characters in the active display window. It will not
print the entire contents of display memory.

==============================================================================

INT 06h - LOW POWER HOOK
------------------------
 
This interrupt is called by the system:

* Just before entering deep sleep. (AH=0).

* Just after leaving deep sleep. (AH=1). When this hook is called, the value
  in AL indicates the cause of the wakeup:

    AL      Wakeup Cause
    --      -----------------------
    1       ON key press.
    2       UART wake up.
    4       Real Time Clock Alarm.
    8       XINT wake up.

* Just before entering light sleep. (AH=2).

* Just after leaving light sleep. (AH=3).

==============================================================================

INT 08H - TIMER HARDWARE INTERRUPT
----------------------------------

A periodic hardware-timer interrupt occurs on hardware-interrupt level 0
(IRQ0) at a rate of 18.2 times per second. IRQ0 maps to interrupt vector 08h.
The BIOS-Interrupt service routine for Int 08h performs several
housekeeping duties for the BIOS. As part of the routine, Int 1Ch (Timer Tick)
is called for each hardware timer interrupt. If an application needs a
periodic interrupt, it should take over the Timer-Tick interrupt hook
(Int 1Ch). (The default Int 1Ch service routine is just an IRET.) The
application program should not attempt to take over the Int 08h service
routine directly. The Timer-Tick-Interrupt service routine does the following: 

* Increments the BIOS software clock in the double word at 40:6C. If the count
  equals 1800B0h then the count at 40:6C is reset and the rollover flag at
  40:70 is set to 1.

* Timer-Tick Int 1Ch is called, so that a user routine can obtain a periodic
  call. The default handler for Int 1C is just a dummy IRET in the BIOS.

* When control is returned from Int 1C, Int 08 resets the 8259 programmable
  interrupt controller and enables interrupts. 

* The Timer routine handles automatic windowing of the display. If the
  hardware indicates that the cursor has moved, the Timer routine attempts to
  move the display window so it contains the cursor.

* The Timer routine decrements two counters that measure the time until
  display timeout (deep sleep) and the next battery measurement. However, the
  Timer routine does not invoke either the deep sleep code or the battery
  measurement code. This is done by the light sleep code (Int 16h) when the
  display timeout timer or battery measurement timer has counted down to 0.

* The routine returns with an IRET.

==============================================================================

INT 09h - KEYBOARD TRANSLATE INTERRUPT
--------------------------------------

Three interrupt service routines are used to input keyboard data and to
process scancodes - Int 0Bh, Int 09h and Int 16h. 

* Int 0Bh is invoked when a key is pressed - it performs a software scan of
  the keyboard and computes the scan code each time a key is pressed or
  released. It places the scan code in an I/O port (060h) and invokes the
  Int 09h service routine. 

* Int 09h obtains a single byte scancode from I/O port 060h and translates
  it into a two-byte key code based on the state of the control, shift and
  alt keys. It inserts the two-byte code into the keybuffer. 

* Int 16h reads the two-byte key code from the buffer. When key
  information is desired, the operating system or an application calls
  Int 16h, which returns the key codes in a register.

The BIOS Interrupt service routine for Int 09h processes the incoming
scancode as follows:

* The routine reads the scancode from the keyboard I/O port (060h).

* The routine calls the Keyboard-Translation-Hook function (Int 15h,
  AH = 4Fh). An application can take over this hook and insert its own
  handler. If this call returns with carry clear, Int 09h stops processing
  and returns. If carry is set, Int 09h proceeds with step 3.

* The routine checks for a Break. If the Break is detected, Int 09h clears
  the keyboard input buffer and calls Int 1Bh. (A "dummy" scancode of
  "00h/00h" is entered into the keyboard input buffer.)

* The Int 09h routine translates the scancode and enters the scancode and
  its ASCII equivalent into the keyboard-input buffer. Some scancodes have
  no ASCII equivalent. In these cases Int 09h does one of the following:

  - Discard the scancode (enter no data into the keyboard input buffer). If a
    [Shift], [Ctrl], [Alt], [Caps Lock], [Char] or [Scroll Lock]
    keypress is detected, the state of the keyboard is updated, but the
    scancode is discarded. 

  - Enter a two-byte pair "00h/XXh" into the keyboard input buffer. "XXh" may
    be the original scancode, or it may be a translated hexadecimal code for
    the key or key combination pressed. 

Once a scancode/ASCII pair has been entered into the keyboard input buffer, an
application can read the data by calling Int 16h.

  -- Char Key

The [Char] key works like a special function key which changes the operation
of the alphabet keys. If the Char function is active, several alphabet keys
return non-English characters. See the character code tables at the end of
this section for a list of character codes returned when the CHAR function is
active.

The [Char] key also activates 'Mute' functions. These are special key
sequences that return many non-English charaters - see the table of Mute
functions at the end of this section.

The [Char] key is `sticky'. Pressing and releasing the [Char] key causes
the CHAR function to stay on. Pressing and releasing [Char] a second time
causes the CHAR function to turn off. If the Char state is on but the [Char]
key is released, then pressing and releasing any other key causes the CHAR
state to turn off. The sticky CHAR is hard coded. There is no user option to
disable the sticky CHAR.

 -- Sticky Shift

The [Shift] key is also `sticky'. It works much like the [Char] key.
Pressing and releasing the [Shift] key causes the SHIFT state to stay on.
Pressing and releasing the [Shift] key a second time causes the SHIFT state
to turn off. If the SHIFT state is on but the [Shift] key is released, then
pressing and releasing any other key causes the SHIFT state to turn off. 

When the [Shift] key is released and the SHIFT State is ON, an annunciator
is displayed in the lower right portion of the display. The annunciator is
removed on the next key press.

Key Cap Legends

The following diagram shows key cap legends for the HP 95LX keyboard.

    HP 95LX Key Cap Legends <Missing Figure>

 -- Scancode Conversion Tables

Int 09h translates scancodes to ASCII character codes or other hexadecimal
codes as shown in the following tables. The first table shows scancodes
returned when the CHAR function is OFF. The second table shows scancodes
returned when the CHAR function is ON. For each scancode, the tables give the
equivalent character codes for each keyboard state: normal, shifted, [Ctrl]
active, and [Alt] active. If a scancode has an ASCII equivalent, the ASCII
character is returned in register AL. If a converted code of the form "xxh/00"
is shown, a zero value is returned in register AL to indicate that there is no
ASCII value for the key combination. BIOS Int 16h returns the value "XXh" in
register AH. 

************
* NOTE !!! *
************
  Some shifted characters on the HP 95LX are non-shifted on standard IBM
  keyboards and some non-shifted characters on the HP 95LX are shifted on
  standard IBM keyboards. For example,

  * The [(] key is non-shifted on the HP 95LX and shifted on IBM.

  * The [Home] key is shifted on the HP 95LX and non-shifted on IBM.

  On these non-compatible key mappings, Int 0Bh will force the status of the
  shift bits in 40h:17h to the state used by a compatible keyboard, regardless
  of the actual state of the shift keys. For example:

  * The [(] key is reported to Int 09h as a shifted character even though
    it is non-shifted on the HP 95LX.

  * The [Home] key is reported to Int 09h as a non-shifted character even
    though it is shifted on the HP 95LX.
************
* NOTE !!! *
************

In IBM-compatible machines, the [Shift], [Ctrl], and [Alt] keys effect
the interpretation of a scancode with ascending priority. That is, [Alt]
has the highest priority. If the [Alt] key is pressed, the [Shift] and
[Ctrl] keys have no effect. Likewise, if the [Ctrl] key is pressed, the
[Shift] key has no affect. The only valid combination involving both the
[Ctrl] and [Alt] keys is the Warm Start sequence [CTRL] [ALT] [DEL]. 

In the HP 95LX, however, there are some valid combinations of [Shift] and
[Ctrl]. In particular:

* [Shift] [Ctrl] [PGUP] yields the compatible keycode for [Ctrl]
  [PGUP].

* [Shift] [Ctrl] [HOME] yields the compatible keycode for [Ctrl]
  [HOME].

* [Shift] [Ctrl] [PGDN] yields the compatible keycode for [Ctrl]
  [PGDN].

* [Shift] [Ctrl] [END] yields the compatible keycode for [Ctrl]
  [END].

* [Shift] [Ctrl] [ [ ] yields the compatible keycode for [Ctrl]
  [ [ ].

* [Shift] [Ctrl] [ ] ] yields the compatible keycode for [Ctrl]
  [ ] ].


Scancodes when CHAR Function Off

KEY LEGEND          SCANCODE      CHARACTER CODES (hex, ah/al     Shift+
Normal    Shifted Normal  Shift   Normal  Shift   Ctrl    Alt     Ctrl
------    ------- ------  -----   ------  -----   ----    -----   ----- 
ESC       PrtScr  01      37      01/1B   PrtScr  01/1B
TAB               0F      0F      0F/09   0F/00   94/00   A5/00   94/00
F1                3B      3B      3B/00   54/00   5E/00   68/00   5E/00
F2                3C      3C      3C/00   55/00   5F/00   69/00   5F/00
F3                3D      3D      3D/00   56/00   60/00   6A/00   60/00
F4                3E      3E      3E/00   57/00   61/00   6B/00   61/00
F5                3F      3F      3F/00   58/00   62/00   6C/00   62/00
F6                40      40      40/00   59/00   63/00   6D/00   63/00
F7                41      41      41/00   5A/00   64/00   6E/00   64/00
F8                42      42      42/00   5B/00   65/00   6F/00   65/00
F9                43      43      43/00   5C/00   66/00   70/00   66/00
F10               44      44      44/00   5D/00   67/00   71/00   67/00
(UArrow)  PGUP ** 48      49      48/00   49/00   8D/00           84/00
ON/OFF    ON/OFF  70      70                      A2/00
FILER     SET UP  72      71      A8/00   A4/00   AE/00   AB/00   AA/00
COMM      ` **    73      29      AC/00   29/60   B2/00   AF/00
APPT      ~       74      29      B0/00   29/7E   B6/00   B3/00
PHONE     !       75      02      B4/00   02/21   BA/00   B7/00
MEMO      #       76      04      B8/00   04/23   BE/00   BB/00
123       $       77      05      BC/00   05/24   C2/00   BF/00
&pm;      &       78      08      C0/00   08/26   C6/00   C3/00
( *       |       0A      2B      0A/28   2B/7C           80/00    2B/1C
) *       \ **    0B      2B      0B/29   2B/5C           81/00    2B/1C
<--       <--     0E      0E      0E/08   0E/08   BREAK   0E/00
        ||BREAK        
DEL       INS **  53      52      53/00   52/00   93/00            92/00
(LArrow)  HOME ** 4B      47      4B/00   47/00   73/00            77/00
(DArrow)  PGDN ** 50      51      50/00   51/00   91/00            76/00
(RArrow)  END **  4D      4F      4D/00   4F/00   74/00            75/00
Q                 10      10      10/71   10/51   10/11   10/00    ||10/11
W                 11      11      11/77   11/57   11/17   11/00    11/17
E                 12      12      12/65   12/45   12/05   12/00    12/05
R                 13      13      13/72   13/52   13/12   13/00    13/12
T                 14      14      14/74   14/54   14/14   14/00    14/14
Y                 15      15      15/79   15/59   15/19   15/00    15/19
U                 16      16      16/75   16/55   16/15   16/00    16/15
I                 17      17      17/69   17/49   17/09   17/00    17/09
O                 18      18      18/6F   18/4F   18/0F   18/00    18/0F
P                 19      19      19/70   19/50   19/10   19/00    19/10
7         [ **    08      1A      08/37   1A/5B                    1A/1B
8         ] **    09      1B      09/38   1B/5D                    1B/1D
9         {       0A      1A      0A/39   1A/7B                    1A/1B
/         }       35      1B      35/2F   1B/7D                    1B/1D

*  Character code reported to INT 09h as a shifted character.
** Character code reported to INT 09h as an unshifted character.


Scancodes when CHAR Function Off (continued)

KEY LEGEND          SCANCODE      CHARACTER CODES (hex, ah/al)    Shift+
Normal    Shifted Normal  Shift   Normal  Shift   Ctrl    Alt     Ctrl
------    ------- ------  -----   ------  -----   ----    -----   ----- 
                                  ah/al   ah/al   ah/al   ah/al   ah/al
A                 1E      1E      1E/61   1E/41   1E/01   1E/00   1E/01
S                 1F      1F      1F/73   1F/53   1F/13   1F/00   1F/13
D                 20      20      20/64   20/44   20/04   20/00   20/04
F                 21      21      21/66   21/46   21/06   21/00   21/06
G                 22      22      22/67   22/47   22/07   22/00   22/07
H                 23      23      23/68   23/48   23/08   23/00   23/08
J                 24      24      24/6A   24/4A   24/0A   24/00   24/0A
K                 25      25      25/6B   25/4B   25/0B   25/00   25/0B
L                 26      26      26/6C   26/4C   26/0C   26/00   26/0C
4         ; **    05      27      05/34   27/3B
5         :       06      27      06/35   27/3A                        
6         ' **    07      28      07/36   28/27   07/1E
*         "       37      28      37/2A   28/22   96/00   37/00   ||
CTRL              1D      1D                                        
Z                 2C      2C      2C/7A   2C/5A   2C/1A   2C/00   2C/1A
X                 2D      2D      2D/78   2D/58   2D/18   2D/00   2D/18
C                 2E      2E      2E/63   2E/43   2E/03   2E/00   2E/03
V                 2F      2F      2F/76   2F/56   2F/16   2F/00   2F/16
B                 30      30      30/62   30/42   30/02   30/00   30/02
N                 31      31      31/6E   31/4E   31/0E   31/00   31/0E
M                 32      32      32/6D   32/4D   32/0D   32/00   32/0D
ENTER             1C      1C      1C/0D   1C/0D   1C/0A   1C/00   1C/0A
1         <       02      33      02/31   33/3C
2         >       03      34      03/32   34/3E   03/00
3         ?       04      35      04/33   35/3F
-         ^       4A      07      4A/2D   07/5E   8E/00           07/1E
Shift             2A      2A
ALT               38      38
Char              79      79
[space]           39      39      39/20   39/20   39/20   39/20   ||39/20
,         , **    33      33      33/2C   33/2C           33/00        
@ *       @       03      03      03/40   03/40   03/00   79/00   03/00
MENU              7A      7A      C8/00   C9/00   CA/00   CB/00   CA/00
Shift             36      36
0         CAPS ** 0B      3A      0B/30
.         SCRL ** 34      46      34/2E                   34/00   BREAK
=        _        0D      0C      0D/3D   0C/5F           83/00   0C/1F
+        %        4E      06      4E/2B   06/25   90/00

*  Character code reported to INT 09h as a shifted character.
** Character code reported to INT 09h as an unshifted character.


Scancodes when CHAR Function ON

KEY LEGEND          SCANCODE      CHARACTER CODES (hex, ah/al)    Shift+
Normal    Shifted Normal  Shift   Normal  Shift   Ctrl    Alt     Ctrl
------    ------- ------  -----   ------  -----   ----    -----   ----- 
ESC       PrtScr  01      37      01/1B   PrtScr  01/1B         
TAB               0F      0F      0F/09   0F/00   94/00   A5/00   94/00
F1                3B      3B      DB/00   F4/00   5E/00   68/00   5E/00
F2                3C      3C      DC/00   F5/00   5F/00   69/00   5F/00
F3                3D      3D      DD/00   F6/00   60/00   6A/00   60/00
F4                3E      3E      DE/00   F7/00   61/00   6B/00   61/00
F5                3F      3F      DF/00   F8/00   62/00   6C/00   62/00
F6                40      40      E0/00   F9/00   63/00   6D/00   63/00
F7                41      41      E1/00   FA/00   64/00   6E/00   64/00
F8                42      42      E2/00   FB/00   65/00   6F/00   65/00
F9                43      43      E3/00   FC/00   66/00   70/00   66/00
F10               44      44      E4/00   FD/00   67/00   71/00   67/00
(UArrow)  PGUP ** 48      49      48/00   49/00   8D/00           84/00
ON/OFF    ON/OFF  70      70                      A2/00   ||
FILER     SET UP  72      71                      AE/00   AB/00   AA/00
COMM      ` **    73      29      04/EF   29/60   B2/00   AF/00
APPT      ~       74      29      05/F9   29/7E   B6/00   B3/00
PHONE     !       75      02      06/AD   02/AD   BA/00   B7/00
MEMO      #       76      04      07/EE   04/23   BE/00   BB/00
123       $       77      05      08/B8   05/24   C2/00   BF/00
HP CALC   &       78      08      09/A9   08/26   C6/00   C3/00
( *       |       0A      2B      0A/DD   2B/7C           80/00    2B/1C
) *       \ **    0B      2B      0B/29   2B/5C           81/00    2B/1C
<-        <-      0E      0E      0E/08   0E/08   BREAK   0E/00    BREAK
DEL       INS **  53      52      53/00   52/00   93/00            92/00
(LArrow)  HOME ** 4B      47      4B/00   47/00   73/00            77/00
(DArrow)  PGDN ** 50      51      50/00   51/00   91/00            76/00
(RArrow)  END **  4D      4F      4D/00   4F/00   74/00            75/00
Q                 10      10      10/A6   10/A6   10/11   10/00    10/11
W                 11      11      11/A7   11/A7   11/17   11/00    11/17
E                 12      12      12/91   12/92   12/05   12/00    12/05
R                 13      13      *****   *****   13/12   13/00    13/12
T                 14      14      *****   *****   14/14   14/00    14/14
Y                 15      15      *****   *****   15/19   15/00    15/19
U                 16      16      *****   *****   16/15   16/00    16/15
I                 17      17      *****   *****   17/09   17/00    17/09
O                 18      18      18/9B   18/9D   18/0F   18/00    18/0F
P                 19      19      19/E7   19/E8   19/10   19/00    19/10
7         [ **    08      1A      08/AC   1A/5B                    1A/1B
8         ] **    09      1B      09/AB   1B/5D                    1B/1D
9         {       0A      1A      0A/F3   1A/7B                    1A/1B
/         }       35      1B      35/F6   1B/7D                    1B/1D

*    Character code reported to INT 09h as a shifted character.
**   Character code reported to INT 09h as an unshifted character.
**** Mute function enabled.

Scancodes when CHAR Function ON (continued)

KEY LEGEND          SCANCODE      CHARACTER CODES (hex, ah/al)    Shift+
Normal    Shifted Normal  Shift   Normal  Shift   Ctrl    Alt     Ctrl
------    ------- ------  -----   ------  -----   ----    -----   ----- 
A                 1E      1E      1E/86   1E/8F   1E/01   1E/00   1E/01
S                 1F      1F      1F/E1   1F/E1   1F/13   1F/00   1F/13
D                 20      20      20/D0   20/D1   20/04   20/00   20/04
F                 21      21      21/9F   21/9F   21/06   21/00   21/06
G                 22      22      22/CF   22/CF   22/07   22/00   22/07
H                 23      23      23/BE   23/BE   23/08   23/00   23/08
J                 24      24      24/24   24/24   24/0A   24/00   24/0A
K                 25      25      25/BD   25/BD   25/0B   25/00   25/0B
L                 26      26      26/9C   26/9C   26/0C   26/00   26/0C
4         ; **    05      27      05/34   27/3B
5         :       06      27      06/35   27/3A
6         ' **    07      28      07/36   28/27   07/1E
*         "       37      28      37/9E   28/22   96/00   37/00
CTRL              1D      1D                            
Z                 2C      2C      2C/F4   2C/F4   2C/1A   2C/00   2C/1A
X                 2D      2D      2D/F8   2D/F8   2D/18   2D/00   2D/18
C                 2E      2E      2E/87   2E/80   2E/03   2E/00   2E/03
V                 2F      2F      2F/F5   2F/F5   2F/16   2F/00   2F/16
B                 30      30      30/FE   30/FE   30/02   30/00   30/02
N                 31      31      31/D5   31/D5   31/0E   31/00   31/0E
M                 32      32      32/E6   32/E6   32/0D   32/00   32/0D
ENTER             1C      1C      1C/0D   1C/0D   1C/0A   1C/00   1C/0A
1        <        02      33      02/AE   33/FB
2        >        03      34      03/AF   34/FD   03/00
3        ?        04      35      04/A8   35/FC
-        ^        4A      07      4A/F0   07/5E   8E/00           07/1E
Shift             2A      2A
ALT               38      38
Char              79      79
[space]           39      39      39/20   39/20   39/20   39/20   39/20
,        , **     33      33      33/F7   33/F7           33/00
@ *      @        03      03      03/40   03/40   03/00   79/00   03/00
MENU              7A      7A              C9/00   CA/00   CB/00   CA/00
Shift             36      36
0        CAPS **  0B      3A      0B/30
.        SCRL **  34      46      34/FA                   34/00   BREAK
=        _        0D      0C      0D/F2   0C/5F           83/00   0C/1F
+        %        4E      06      4E/F1   06/25   90/00

*  Character code reported to INT 09h as a shifted character.
** Character code reported to INT 09h as an unshifted character.


MUTE KEY Sequences  CHARACTER CODES (hex, ah/al)
KEY SEQUENCE        Normal      Shifted     Control     Alt
                    ------      -------     -------     -----
[Char] [r] [a]      1E/A0       1E/B5       1E/01       1E/00
[Char] [r] [e]      12/82       12/90       12/05       12/00
[Char] [r] [i]      17/A1       17/D6       17/09       17/00
[Char] [r] [o]      18/A2       18/E0       18/10       18/00
[Char] [r] [u]      16/A3       16/E9       16/15       16/00
[Char] [r] [y]      15/EC       15/ED       15/19       15/00
[Char] [r] [n]      31/6E       31/4E       31/0E       31/00

[Char] [t] [a]      1E/85       1E/B7       1E/01       1E/00
[Char] [t] [e]      12/8A       12/D4       12/05       12/00
[Char] [t] [i]      17/8D       17/DE       17/09       17/00
[Char] [t] [o]      18/95       18/E3       18/10       18/00
[Char] [t] [u]      16/97       16/EB       16/15       16/00
[Char] [t] [y]      15/79       15/59       15/19       15/00
[Char] [t] [n]      31/6E       31/4E       31/0E       31/00        

[Char] [y] [a]      1E/83       1E/B6       1E/01       1E/00
[Char] [y] [e]      12/88       12/D2       12/05       12/00
[Char] [y] [i]      17/8C       17/D7       1/09        17/00
[Char] [y] [o]      18/93       18/E2       18/10       18/00
[Char] [y] [u]      16/96       16/EA       1/15        16/00
[Char] [y] [y]      15/79       15/59       1/19        15/00
[Char] [y] [n]      31/6E       31/4E       3/0E        31/00        

[Char] [u] [a]      1E/84       1E/8E       1E/01       1E/00
[Char] [u] [e]      12/89       12/D3       12/05       12/00
[Char] [u] [i]      17/8B       17/D8       17/09       17/00
[Char] [u] [o]      18/94       18/99       18/10       18/00
[Char] [u] [u]      16/81       16/9A       16/15       16/00
[Char] [u] [y]      15/98       15/59       15/19       15/00
[Char] [u] [n]      31/6E       31/4E       31/0E       31/00        

[Char] [i] [a]      1E/C6       1E/C7       1E/01       1E/00
[Char] [i] [e]      12/65       12/45       12/05       12/00
[Char] [i] [i]      17/69       17/49       17/09       17/00
[Char] [i] [o]      18/E4       18/E5       18/10       18/00
[Char] [i] [u]      16/75       16/55       16/15       16/00
[Char] [i] [y]      15/79       15/59       15/19       15/00
[Char] [i] [n]      31/A4       31/A5       31/0E       31/00
        

The following table lists the HP 95LX key sequences to obtain character codes
80h through 0FFh. Most characters are assigned to a CHAR sequence. However
the drawing characters are not; they must be entered via [ALT] [decimal
keycode] sequences. 

************
* NOTE !!! *
************
  Some CHAR sequences require the [SHIFT] key to be pressed. In these
  sequences, the [CHAR] and [SHIFT] keys may be pressed in either order.
************
* NOTE !!! *
************

HP 95LX Key Sequences for Character Codes 80h - 0FFh

Character Code (hex)    Character Name      Key Sequence
--------------------    --------------      ------------------------
80h                     C cedilla           [CHAR] [SHIFT] [C] 
81h                     u diaresis          [CHAR] [U] [u] 
82h                     e acute             [CHAR] [R] [e] 
83h                     a circumflex        [CHAR] [Y] [a] 

84h                     a diaresis          [CHAR] [U] [a] 
85h                     a grave             [CHAR] [T] [a] 
86h                     a ring              [CHAR] [a] 
87h                     c cedilla           [CHAR] [c] 

88h                     e circumflex        [CHAR] [Y] [e] 
89h                     e diaresis          [CHAR] [U] [e] 
8Ah                     e grave             [CHAR] [T] [e] 
8Bh                     i diaresis          [CHAR] [U] [i] 

8Ch                     i circumflex        [CHAR] [Y] [i] 
8Dh                     i grave             [CHAR] [T] [i] 
8Eh                     A diaresis          [CHAR] [SHIFT] [U] [A] 
8Fh                     A ring              [CHAR] [SHIFT] [A] 

90h                     E acute             [CHAR] [SHIFT] [R] [E] 
91h                     a ligature          [CHAR] [e] 
92h                     A ligature          [CHAR] [SHIFT] [E] 
93h                     o circumflex        [CHAR] [Y] [o] 

94h                     o diaresis          [CHAR] [U] [o] 
95h                     o grave             [CHAR] [T] [o] 
96h                     u circumflex        [CHAR] [Y] [u] 
97h                     u grave             [CHAR] [T] [u] 

98h                     y diaresis          [CHAR] [U] [y] 
99h                     O diaresis          [CHAR] [SHIFT] [U] [O] 
9Ah                     U diaresis          [CHAR] [SHIFT] [U] [U] 
9Bh                     o w/ oblique stroke [CHAR] [o] 

9Ch                     Pound               [CHAR] [L] 
9Dh                     O w/ oblique stroke [CHAR] [SHIFT] [O] 
9Eh                     multiply sign       [CHAR] [*] 
9Fh                     Guilder             [CHAR] [F] 

HP 95LX Key Sequences for Character Codes 80h - 0FFh (continued)

Character Code (hex)    Character Name      Key Sequence
--------------------    --------------      ------------------------
A0h                     a acute             [CHAR] [R] [a] 
A1h                     i acute             [CHAR] [R] [i] 
A2h                     o acute             [CHAR] [R] [o] 
A3h                     u acute             [CHAR] [R] [u] 
                        
A4h                     n tilde             [CHAR] [I] [n] 
A5h                     N tilde             [CHAR] [SHIFT] [I] [N] 
A6h                     Feminine ordinal    [CHAR] [q] 
A7h                     Masculine ordinal   [CHAR] [w] 
                        
A8h                     upside down ?       [CHAR] [3] 
A9h                     reg. trademark sign [CHAR] [HP CALC] 
AAh                                         [ALT] [1] [7] [0] 
ABh                     1/2                 [CHAR] [8] 
                        
ACh                     1/4                 [CHAR] [7] 
ADh                     upside down !       [CHAR] [PHONE] 
AEh                     Left French quote   [CHAR] [1] 
AFh                     Right French Quote  [CHAR] [2] 
                        
B0h                                         [ALT] [1] [7] [6] 
B1h                                         [ALT] [1] [7] [7]
B2h                                         [ALT] [1] [7] [8] 
B3h                                         [ALT] [1] [7] [9] 
                        
B4h                                         [ALT] [1] [8] [0] 
B5h                     A acute             [CHAR] [SHIFT] [R] [A] 
B6h                     A circumflex        [CHAR] [SHIFT] [Y] [A] 
B7h                     A grave             [CHAR] [SHIFT] [T] [A] 
                        
B8h                     copyright sign      [CHAR] [LOTUS 123] 
B9h                                         [ALT] [1] [8] [5] 
BAh                                         [ALT] [1] [8] [6] 
BBh                                         [ALT] [1] [8] [7] 
                        
BCh                                         [ALT] [1] [8] [8] 
BDh                     Cents sign          [CHAR] [K] 
BEh                     Yen sign            [CHAR] [H] 
BFh                                         [ALT] [1] [9] [1] 

HP 95LX Key Sequences for Character Codes 80h - 0FFh (continued)

Character Code (hex)    Character Name      Key Sequence
--------------------    --------------      ------------------------
C0h                                         [ALT] [1] [9] [2] 
C1h                                         [ALT] [1] [9] [3] 
C2h                                         [ALT] [1] [9] [4] 
C3h                                         [ALT] [1] [9] [5] 
                                            
C4h                                         [ALT] [1] [9] [6] 
C5h                                         [ALT] [1] [9] [7] 
C6h                     a tilde             [CHAR] [I] [a] 
C7h                     A tilde             [CHAR] [SHIFT] [I] [A] 

C8h                                         [ALT] [2] [0] [0] 
C9h                                         [ALT] [2] [0] [1] 
CAh                                         [ALT] [2] [0] [2] 
CBh                                         [ALT] [2] [0] [3] 

CCh                                         [ALT] [2] [0] [4] 
CDh                                         [ALT] [2] [0] [5] 
CEh                                         [ALT] [2] [0] [6] 
CFh                 general currency sign   [CHAR] [G] 

D0h                     lower case eth      [CHAR] [d] 
D1h                     upper case eth      [CHAR] [SHIFT] [D] 
D2h                     E circumflex        [CHAR] [SHIFT] [Y] [E] 
D3h                     E diaresis          [CHAR] [SHIFT] [U] [E] 

D4h                     E grave             [CHAR] [SHIFT] [T] [E] 
D5h                     i without dot       [CHAR] [N]
D6h                     I acute             [CHAR] [SHIFT] [R] [I] 
D7h                     I circumflex        [CHAR] [SHIFT] [Y] [I] 

D8h                     I diaresis          [CHAR] [SHIFT] [U] [I] 
D9h                                         [ALT] [2] [1] [7] 
DAh                                         [ALT] [2] [1] [8] 
DBh                                         [ALT] [2] [1] [9] 

DCh                                         [ALT] [2] [2] [0] 
DDh                     broken vertical bar [CHAR] [(] 
DEh                     I grave             [CHAR] [SHIFT] [T] [I] 
DFh                                         [ALT] [2] [2] [3] 

HP 95LX Key Sequences for Character Codes 80h - 0FFh (continued)

Character Code (hex)    Character Name      Key Sequence
--------------------    --------------      ------------------------
E0h                     O acute             [CHAR] [SHIFT] [R] [O] 
E1h                     sharp s             [CHAR] [S] 
E2h                     O circumflex        [CHAR] [SHIFT] [Y] [O] 
E3h                     O grave             [CHAR] [SHIFT] [T] [O] 

E4h                     o tilde             [CHAR] [I] [o] 
E5h                     O tilde             [CHAR] [SHIFT] [I] [O] 
E6h                     mu                  [CHAR] [M] 
E7h                     Lower case thorn    [CHAR] [P] 

E8h                     Upper case thorn    [CHAR] [SHIFT] [P] 
E9h                     U acute             [CHAR] [SHIFT] [R] [U] 
EAh                     U circumflex        [CHAR] [SHIFT] [Y] [U] 
EBh                     U grave             [CHAR] [SHIFT] [T] [U] 

ECh                     y acute             [CHAR] [R] [Y] 
EDh                     Y acute             [CHAR] [SHIFT] [R] [Y] 
EEh                     ordinal indicator   [CHAR] [MEMO]
EFh                     acute               [CHAR] [COMM] 

F0h                     minus sign          [CHAR] [-] 
F1h                     plus/minus          [CHAR] [+] 
F2h                     subscript =         [CHAR] [=] 
F3h                     3/4                 [CHAR] [9] 

F4h                     Paragraph sign      [CHAR] [Z] 
F5h                     Section sign        [CHAR] [V] 
F6h                     divide sign         [CHAR] [/] 
F7h                                         [CHAR] [,] 

F8h                     degree sign         [CHAR] [X] 
F9h                     umlaut              [CHAR] [APPT] 
FAh                     middle dot          [CHAR] [.] 
FBh                     superscript 1       [CHAR] [SHIFT] [1] 

FCh                     superscript 3       [CHAR] [SHIFT] [3] 
FDh                     superscript 2       [CHAR] [SHIFT] [2] 
FEh                     block               [CHAR] [B] 
FFh                                         [ALT] [2] [5] [5] 

==============================================================================

INT 0Ah - MISCELLANEOUS HARDWARE INTERRUPT
------------------------------------------

The Miscellaneous-Hardware Interrupt services the following hardware
interrupts:

* Timer1 Interrupt.

* Display Cursor Update Request.

  -- Timer1 Interrupt

The timer1 interrupt implements keyboard peeks if a key is down. It repeatedly
causes keyboard scans to determine which key is pressed. When the keyboard
changes state it issues an INT 09 indicating a new key is down or up.

  -- Display Cursor Update Request Interrupt

This interrupt is normally disabled. The display cursor-update request is
detected by polling in the timer0 interrupt routine (INT 08h).

==============================================================================

INT 0Bh - KEYBOARD HARDWARE INTERRUPT
-------------------------------------

Int 0Bh is invoked whenever a key is pressed. The interrupt  performs a
software scan and debounce delay of the keyboard to detect any newly pressed
or released keys. If a key is newly pressed, it sets a bit that causes timer1
interrupts to call the keyscan code, thereby implementing periodic keyboard
peeks. Whenever a key is newly pressed or released, it computes its one-byte
scan code and places it in an I/O port (060h). Then it invokes the Int 09h
service routine, which is the IBM-compatible keyboard-hardware interrupt. 

==============================================================================

INT 0Fh - REAL-TIME CLOCK INTERRUPT
-----------------------------------

The real-time clock hardware interrupt is intended to implement a software
real time clock. The interrupt can be set to wake up the CPU at time intervals
of 1 second up to 9.1 hours.


==============================================================================
    S O F T W A R E    I N T E R R U P T S
==============================================================================

INT 10h  VIDEO SERVICES INTERRUPT
---------------------------------

The Video Services control the display. These services provide a number of
standard functions for setting the mode of the display, writing characters and
dots to the display, and controlling character attributes. Int 10h supports
two modes:

* Mode 07: 80 x 25 monochrome alphanumeric. Mode 7 is compatible with the
  industry-standard Monochrome Display Adapter (MDA). 

* Mode 20h: 240 x 128 Graphics mode. Mode 20h is a unique graphics mode not
  compatible with ANY IBM mode.

To set the desired mode, use the Set Mode function (Int 10h, AH = 00h). The
power-on default is Mode 7. 

  -- Alphanumeric Mode 7

The physical size of the HP 95LX display is smaller than a standard PC display
(40 characters by 16 lines vs 80 by 25). However, the HP 95LX display RAM is
the same size as the industry standard MDA (4K bytes). There is provision to
window around in the display RAM, so the user can see the contents of all 4K
of display memory.

Windowing is controlled by the BIOS so that the cursor is always in view. When
you move the cursor, the hardware causes an INT 0Ah to occur. The Interupt 0Ah
service routine sets bit 5 of the CurFlag byte in the BIOS data area to
indicate that a cursor movement has recently occurred. The timer0 interrupt
service routine always shifts CurFlag left one bit position; this effectively
debounces the CurFlag byte. If the shift results in CF set and CurFlag = 0, it
indicates that the cursor has been moving, but is now quiet. Timer0 recognizes
this state and moves the display window so that it always contains the cursor.

When configured for mode 7, the display memory is organized into cells
containing 2 bytes each. Byte 0 of each cell contains the 8-bit character code
and byte 1 defines the display attributes for that character. Character cells
are arranged in rows of 80 cells each, and there are 25 rows of cells. There
is only one 80 x 25 page of text. The base address of display memory is B0000h.

    Display Memory Addresses    <Missing Figure>

The attribute byte has the following bit definitions:

    Attribute Byte Definitions  <Missing Figure>

Only four foreground and background field combinations are useful:

Background  Foreground  Definition
Field (hex) Field (hex)
0           0           White on white (does not display).
0           1           Underlined characters.
0           7           Normal video (black characters on a white background).
7           0           Inverse video (white characters on a black background).

  -- Graphics Mode 20h

The graphics mode (mode 20h) is used to display either graphics or alpha
information. When the display is in graphics mode, each bit in display memory
is mapped to a display pixel. The base address of display memory is at
0B0000h.

    Graphics Display Memory Addresses   <Missing Figure>

Within each byte of display memory, bit 7 maps to the leftmost pixel and bit 0
maps to the rightmost pixel. The upper left pixel of the display is bit 7 of
0B0000h.

  -- Video Services

The Video Services are described as follows:

Specify (Input) the desired function code in register AH or AX; also input any
additional parameters passed in other registers as indicated in the table. 

=-----------------------------------------------------------------------------
= * AH = 00h        Set Mode
=-----------------------------------------------------------------------------
    This function sets the display mode. The new mode is
    determined by the value passed in the AL register.

    Input:  AH = 00h.
            AL = 07h selects 80 char x 25 char monochrome adapter mode.
                 20h selects 240 pixel x 128 pixel graphics mode.
    Output: None.
  
    The mode is changed in the BIOS and hardware.
    The screen is cleared as a side effect of changing the mode.
                 
    Errors: None.        

    Modifies: AX.        

=-----------------------------------------------------------------------------
= * AH = 01h        Set Cursor Size
=-----------------------------------------------------------------------------
    This function sets the size of the cursor displayed in the alphanumeric 
    display modes. Each character cell in the alphanumeric display modes
    is eight scan lines high. The cursor size is defined by specifying the
    starting scan line within the character cell. The scan lines are numbered
    from 0 (top of cell) to 7 (bottom). The ending scan line is always fixed
    at 7. The size of the cursor is defined by passing the starting scan line
    in register CH. The default value is CH=7. If bit 5 of CH is set to "1",
    the cursor will be suppressed. In graphics mode bit 5 is automatically
    set, thus no cursor is displayed.

    ************
    * NOTE !!! *
    ************
    This is slightly different from 100% IBM-compatible displays where you can
    define both the starting and ending scan lines for the cursor. In these
    displays, the CIOS accepts the starting scan line in AH and the ending
    scan line in AL.
    ************
    * NOTE !!! *
    ************

    Input:  AH = 01h.
            CH = Starting scan line.

    Output: None.

    Errors: None.

    Modifies: AX.

=-----------------------------------------------------------------------------
= * AH = 02h        Set Cursor Position
=-----------------------------------------------------------------------------
    This function sets the cursor position to the specified row and column
    address on the specified page. For the HP 95LX, the display page should
    be set to 0 (in both graphics and text modes). This function applies to
    both graphics and text modes. In graphics mode, the cursor is invisible,
    but is used to define a position on the screen.

    Input:  AH = 02h.
            BH = Display page number.
            DH = Row address of cursor (0-24 for alpha, 0-15 for graphics).
            DL = Column address of cursor (0-79 for alpha, 0-39 for graphics).

    Output: None.
         
    Errors: None.
         
    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 03h        Read Cursor Position
=-----------------------------------------------------------------------------
    This function returns the current address and size of the cursor on the
    specified page. For the HP 95LX, the display page should be set to 0 for
    graphics or text mode.

    Input:  AH = 03h.
            BH = Display page number.
         
    Output: CH = Starting scan line of the cursor.
            CL = Ending scan line of the cursor.
            DH = Row address of cursor (0-24 for alpha, 0-15 for graphics).
            DL = Column address of cursor (0-79 for alpha, 0-39 for graphics).
         
    Errors: None.
         
    Modifies: AX, CX, and DX.
         
=-----------------------------------------------------------------------------
= * AH = 04h        Read Light Pen Position
=-----------------------------------------------------------------------------
    This function returns the current state and position of a light pen.
    Since the HP 95LX does not support a light pen, the function always
    returns AH = 0 to indicate the light pen is not active.
         
    Input:  AH = 04h.
         
    Output: AH = Light pen state (0 = not activated).
         
    Errors: None.
         
    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 05h        Set Active Display Page
=-----------------------------------------------------------------------------
    This function sets the active display page. In the HP 95LX, the only
    allowed display page is 0.
         
    Input:  AH = 05h.
            AL = Page number: Must be 0.
         
    Output:        None.
         
    Errors: None.
         
    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 06h        Scroll Rectangle Up
=-----------------------------------------------------------------------------
    This function scrolls the contents of a window up a specified number of
    lines. The window is defined by the row and column addresses specified
    in the CX and DX registers. The number of lines to be scrolled is passed
    in register AL. If AL is set to "0", the entire window is blanked. 

    ************
    * NOTE !!! *
    ************
    This video service function operates only display RAM. It is performed
    regardless of the position of the video cursor and has nothing to do with
    the windowing done in the background to keep the cursor always in view in
    the 40 by 16 LCD.
    ************
    * NOTE !!! *
    ************

    Input:  AH = 6h.
            AL = Number of lines to scroll (0 = blanks entire scroll area).
            BH = Attribute of blanked lines (alpha mode) or
                 Fill character for blanked lines (graphics mode).
            CH = Row address of character in upper left corner of window.
            CL = Column address of character in upper left corner of window.
            DH = Row address of character in lower right corner of window.
            DL = Column address of character in lower right corner of window.
          
    Output: None.
          
    Errors: None.
          
    Modifies: AX.
          
=-----------------------------------------------------------------------------
= * AH = 07h        Scroll Rectangle Down
=-----------------------------------------------------------------------------
    This function scrolls the contents of a window down a specified number
    of lines. The window is defined by the row and column addresses
    specified in the CX and DX registers. The number of lines to be scrolled
    is passed in register AL. If AL is set to "0", the entire window is
    blanked. 

    ************
    * NOTE !!! *
    ************
    This video service function operates only display RAM. It is performed
    regardless of the position of the video cursor and has nothing to do with
    the windowing done in the background to keep the cursor always in view in
    the 40 by 16 LCD.
    ************
    * NOTE !!! *
    ************

    Input:  AH = 07h.
            AL = Number of lines to scroll (0 = blanks entire scroll area).
            BH = Attribute of blanked lines (alpha mode) or
                 Fill character for blanked lines (graphics mode).
            CH = Row address of character in upper left corner of window.
            CL = Column address of character in upper left corner of window.
            DH = Row address of character in lower right corner of window.
            DL = Column address of character in lower right corner of window.
                 
    Output: None.
                 
    Errors: None.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 08h        Read Character and Attribute at Cursor Position
=-----------------------------------------------------------------------------
    If the display is in alphanumeric mode, this function returns the
    character and attribute bytes at the current cursor location. If the
    display is in graphics mode, the BIOS attempts to match the bit pattern
    at the cursor position with a character pattern from the graphics
    character font resident in the BIOS ROM. If it finds a match, the
    character is returned in AL. If no match is found, AL is set to zero. No
    attribute is returned when in graphics mode. The display page must be 0
    for alpha mode. Display page is a don't care for graphics mode.
                 
    Input:  AH = 08h.
            BH = Page number (must be 0 alpha mode;
                 don't care for graphics mode).
                 
    Output: AH = Attribute byte (valid for alphanumeric modes).
            AL = Character.
                 
    Errors: AL = 00h if in graphics mode and no match was
                                 found for the current cursor position.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 09h        Write Character and Attribute at Cursor Position
=-----------------------------------------------------------------------------
    If the display is in alphanumeric mode, this function writes character
    and attribute bytes at the current cursor location. The value in BL
    determines the character attributes. 

    If the display is in graphics mode, no page number is required and the
    value in BH is ignored. The attribute byte in BL has a different meaning
    in graphics mode. If bit 7 of BL is set, an exclusive OR (XOR) of the
    pixel data is performed with existing display data. If bit 7 is clear,
    the pixel data overwrites the existing display data. 

    For both the alphanumeric and graphics modes, more than one copy of a
    single character (with attribute) can be written to the display. Specify
    the number of copies desired in register CX. In alphanumeric mode this
    function will cause line wrap and screen wrap to occur if too many
    characters are specified. In graphics mode no wrap-around will occur.
                 
    Input:  AH = 09h.
            AL = Character to write.
            BH = Page number (must be 0 in alpha mode;
                 not used in graphics mode).
            BL = Attribute byte if in alphanumeric mode.
                 (Bit 7 set means XOR pixel data if in graphics mode).
            CX = Number of characters to write.
                 
    Output: None.
                 
    Errors: None.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 0Ah        Write Character at Cursor Position
=-----------------------------------------------------------------------------
    This function writes a character to the current cursor location, but
    leaves the attribute byte at that location unchanged. The function is
    otherwise identical to function 09h (Write Character and Attribute at
    Cursor Position).
                 
    Input:  AH = 0Ah.
            AL = Character to write.
            BH = Page number (must be 0 for alpha mode;
                 not used in graphics mode).
            CX = Number of characters to write.
                 
    Output: None.
                 
    Errors: None.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 0Bh        Set Color Palette
=-----------------------------------------------------------------------------
    Since the HP 95LX's LCD does not support color, this function has no
    effect.
         
=-----------------------------------------------------------------------------
= * AH = 0Ch        Write Pixel.
=-----------------------------------------------------------------------------
    This function writes a pixel on the screen. If bit 7 of register AL is
    set, an exclusive OR (XOR) is performed on the current pixel value in
    display memory and the bit value given in bit 0 of register AL. If bit 7
    is clear, bit 0 of AL is written as the new pixel value.
                 
    Input:  AH = 0C
            AL = Pixel value:
                 Bit 7:
                    If "1", XOR current value with bit 0.
                    If "0", replace current value with value given by bit 0.
                 Bit 0: Pixel value.
            CX = Horizontal pixel address.
            DX = Vertical pixel address.
                 
    Output: None.
                 
    Errors: None.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 0Dh        Read Pixel.
=-----------------------------------------------------------------------------
    This function returns the value of the specified pixel.
         
    Input:  AH = 0Dh
            CX = Horizontal pixel address.
            DX = Vertical pixel address.
         
    Output: AL = value of pixel (0 or 1).
         
    Errors: None.
         
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AH = 0Eh        Write Teletype Character
=-----------------------------------------------------------------------------
    This function writes a character to the display memory, then advances
    the cursor one location. At the end of a line, the cursor will wrap
    to the start of the next line. At the end of the screen, the BIOS will
    scroll the screen up one line, blank a line at the bottom of the screen,
    and place the cursor at the start of that line. Four characters have
    special interpretations: Line Feed (0Ah), Carriage Return (0Dh), Backspace
    (08h), and Bell (07h). The BIOS performs the appropriate actions when it
    senses these characters. When in alphanumeric mode, the current screen
    attributes are unchanged.
         
    Input:  AH = 0Eh.
            AL = Character.
         
    Output: None.
         
    Errors: None.
         
    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 0Fh        Get Video State and Mode
=-----------------------------------------------------------------------------
    This function returns the current state of the display, including the
    current mode, number of characters per line, and current display page.
    Refer to the Set Mode function (AH = 00h) for a description of the modes.
         
    Input:  AH = 0Fh.
         
    Output: AH = Number of characters per line.
            AL = Current mode.
            BH = Current display page.
         
    Errors: None.
         
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AX = 1300h      Write String, Global Attribute
=-----------------------------------------------------------------------------
    This function writes a string with one global attribute. After the write
    is complete, the cursor is restored to its original position on the
    screen. This function uses the Write Teletype Character function (Int 10h,
    AH = 0Eh) to place the characters in display memory.
                 
    Input:  AX = 1300h.
            BH = Display page number.
            BL = String attribute byte.
                 (Bit 7 set means XOR pixel data if in graphics mode).
            CX = Length of string.
            DH = Row address of first character.
            DL = Column address of first character.
            ES:BP = Pointer to start of string. Format of string:
                    Char, Char, ...
                 
    Output: None (display memory is updated).

    Errors: None.

    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AX = 1301h      Write String, Global Attribute, Move Cursor
=-----------------------------------------------------------------------------
    This function operates in the same way as function AX = 1300h, except
    that once the operation is complete, it moves the cursor to the character
    cell following the last character written.
                 
    Input:  AX = 1301h.
            BH = Display page number.
            BL = String attribute byte.
                 (Bit 7 set means XOR pixel data if in graphics mode)
            CX = Length of string.
            DH = Row address of first character.
            DL = Column address of first character.
            ES:BP = Pointer to start of string. Format of string:
                    Char, Char, ...
                 
    Output: None (display memory is updated).
                 
    Errors: None.
                 
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AX = 1302h      Write String, Individual Attributes
=-----------------------------------------------------------------------------
    This function operates like function AX = 1300h, except that it writes
    each character in a string with its own attribute. After the write is
    complete, the cursor is restored to its original position on the screen.
                 
    Input:  AX = 1302h.
            BH = Display page number.
            CX = Length of string.
            DH = Row address of first character.
            DL = Column address of first character.
            ES:BP = Pointer to start of string. Format of string:
                    Char, Attr, Char, Attr ...
                 
    Output: None (display memory is updated).
                 
    Errors: None.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AX = 1303h      Write String, Individual Attributes, Move Cursor.
=-----------------------------------------------------------------------------
    This function operates in the same way as function AX = 1302h, except
    that once the operation is complete, it moves the cursor to the character
    cell following the last character written.
                 
    Input:  AX = 1303h.
            BH = Display page number.
            CX = Length of string.
            DH = Row address of first character.
            DL = Column address of first character.
            ES:BP = Pointer to start of string. Format of string:
                    Char, Attr, Char, Attr ...
                 
    Output: None (display memory is updated).
                 
    Errors: None.
                 
    Modifies: AX.

==============================================================================

INT 11h - EQUIPMENT CHECK INTERRUPT
-----------------------------------

    The BIOS returns a copy of its internal equipment list in the ax register.
    The list is compiled in the word at 40:10.

    Input:  AH = 11h.   Internal Equipment List

    Output: AH: <Missing Figure>
            AL: <Missing Figure>

    ***** From IBM Tech Ref: *****
            AX: Equipment Flags
                Bits 15,14 - # of printers attached
                Bit 13 - Internal modem installed
                Bit 12 - Not used
                Bit 11,10,9 - Number of serial cards
                Bit 8 - Not used
                Bit 7,6 - Number of diskette drives
                          (values are binary)
                        = 00 - 1 drive
                        = 01 - 2 drives
                Bit 5,4 - Video mode
                        = 00 - Reserved
                        = 01 - 40x25 (color)
                        = 10 - 80x25 (color)
                        = 11 - 80x25 (monochrome)
                Bit 3 - Not used
                Bit 2 - Pointing device installed
                Bit 1 - Math coprocessor installed
                Bit 0 - Boot diskette installed

    ***** End IBM Tech Ref: *****

    Errors: None.

    Modifies: AX


==============================================================================

INT 12h - MEMORY SIZE INTERRUPT
-------------------------------

    The Int 12h service, when executed, returns the number of 1K-byte blocks
    of system RAM in register AX.

    ************
    * NOTE !!! *
    ************
    The number returned is the amount of user RAM found in the system during
    the power-on and initialization process. It does NOT include any expanded
    RAM that may be present.
    ************
    * NOTE !!! *
    ************

    The current HP 95LX design has 512K bytes of memory built-in. This can be
    increased by adding a plug-in RAM card. No method is currently provided to
    disable a portion of the 512K RAM. The number returned by Int 12h is
    approximately 512K minus the number of Kbytes in the RAM portion of the
    drive C: disk.

    ************
    * NOTE !!! *
    ************
    An application can use this service to determine the total amount of user
    RAM in the system. However, this service does NOT indicate how much RAM is
    available ("free") for running applications.
    ************
    * NOTE !!! *
    ************


==============================================================================

INT 13h - DISK SERVICES INTERRUPT
---------------------------------

The Int 13h services provide low-level support of the Built-In and Plug-In
RAM disks. These services directly access memory addresses that comprise the
RAM Disks and are responsible for bank selection of the Plug-In RAM disk. They
are also responsible for maintaining a table that contains a checksum of each
sector in the disks.

The Int 13h services provide the ability to read, write, and verify
sectors. The services also perform the formatting of tracks on a disk, and
provide a number of functions to obtain status information about the disks.
Many of the functions are not relevant to a RAM disk, but are included to
maintain compatibility with the IBM XT.

The disk parameter tables are provided for compatibility reasons. There are
two tables, one for plug-in disks (drives A: and B:) and one for the
built-in ROM-RAM disk. The table for drives A: and B: is pointed to by the
Int 1Eh vector. The table for drive C: is pointed to by the Int 41h vector.

The default tables provided in the BIOS ROM are described below.

Plug-In Disk Parameter Table (Drives A: and B:)
Offset      Bytes   Definition
00h         1       FDC Specify command: step rate and head unload time.
01h         1       FDC Specify command: head load time and DMA mode.
03h         1       Bytes per sector: 0 = 128, 1 = 256, 2 =512, 3 = 1024.
04h         1       Last sector number on track.
05h         1       read/write gap length between sectors.
06h         1       Data length for read/write operations.
07h         1       Format gap length between sectors.
08h         1       Format filler byte for sectors.
09h         1       Head-settle time after seek command, in milliseconds.
0Ah         1       Motor-start time in 1/8-second units.

Built-In Disk Parameter Table (Drive C:)
Offset      Bytes   Definition
00h         2       Number of Cylinders
02h         1       Number of Heads
03h         2       Reserved(0)
05h         2       Starting write pre-comp cylinder (0)
07h         1       Max ECC burst len (0)
08h         1       Control Byte (0C0h)
09h         3       Reserved (0,0,0)
0Ch         2       Landing zone (0)
0Eh         1       Sectors/Track (10h)
0Fh         1       Reserved (0)

The Disk Services interrupt (Int 13h) functions are described in the
following table. Specify the desired function code in register AH, with
additional parameters passed in other registers as indicated.

=-----------------------------------------------------------------------------
= * AH = 00h        Reset Disk System
=-----------------------------------------------------------------------------
    This function does nothing in the HP 95LX. It is provided for
    compatibility reasons.
        
    Input:  AH = 00h.

    Output: AH = Return disk drive status. See Function 01 below.

    Errors: As indicated in AH.

    Modifies: AX, Status
        
=-----------------------------------------------------------------------------
= * AH = 01h        Read Status of Last Operation
=-----------------------------------------------------------------------------
    This function returns the error status code that resulted from
    the last disk operation.
    00h is returned if the last operation was successful.

    The function returns with carry clear, even if a non-zero value is
    returned (indicating an error).

    The return codes are defined in the following table.

    Disk Return Codes
    Value       Error

    04h         Requested sector could not be found.
    10h         Checksum error encountered on disk read.
    80h         Invalid Drive.

    Input:      AH = 01h.

    Output:     AL = Return status of last disk operation.
                AH = 0

    Modifies: AX, Status

=-----------------------------------------------------------------------------
= * AH = 02h        Read Disk Sectors
=-----------------------------------------------------------------------------
    Based on the supplied parameters, one or more sectors are transferred
    from the disk into a data buffer system RAM. Application programs
    must ensure that the data area provided is large enough to contain the
    requested data.
                 
    Input:  AH = 02h.
            AL = Number of sectors(1-16).
            CH = bits 0-7 of track number (0-max track).
            CL bits 6-7 = bits 8-9 of track number.
            CL bits 0-5 = Sector number(1-16).
            DH = Head number (always 0).
            DL = Drive number (1 for drive C:, 0 for drive A:, 2 for
                 drive D:, etc.)
                 
            ES:BX = Pointer to buffer in which to put data read from
                    the disk.
                 
    Output: AH = Return status (refer function 01).
            AL = Number of sectors read.

    Errors: Carry flag not set if the operation was successful.
            Carry flag is set on an error condition.

    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 03h        Write Disk Sectors
=-----------------------------------------------------------------------------
    This function is very similar to the Read Disk Sectors function, except
    that it writes data from the data buffer to a disk. See the description
    of Read Disk Sectors (above) for more details.
         
    Input:  AH = 03h.
            AL = Number of sectors (1-16)
            CH = bits 0-7 of track number (0-max track)
            CL bits 6-7 = bits 8-9 of track number.
            CL bits 0-5 = Sector number(1-16).
            DH = Head number (0 for drive C:)
            DL = Drive unit number.
            ES:BX = Pointer to buffer from which to write data to the disk.

    Output: AH = Return status (refer to function 01)
            AL = Number of sectors written.
         
    Errors: Carry flag is not set if the operation was successful.
            Carry flag is set on an error condition.
         
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 04h        Verify Disk Sectors
=-----------------------------------------------------------------------------
    This function performs a read function without transferring any data. This
    function insures that the track, head, and sector can be located on the
    disk, and that the data in the sector can be read. The description of the
    Read Disk Sectors function is applicable, except that no data is
    transferred. The number of sectors verified is returned in AL.
         
    Input:  AH = 04h.
            AL = Number of sectors.
            CH = bits 0-7 of track number (0-max track)
            CL bits 6-7 = bits 8-9 of track number.
            CL bits 0-5 = Sector number(1-16).
            DH = Head number.
            DL = Drive unit number.

    Output: AH = Return status (refer to function 01)
            AL = Number of sectors verified.
         
    Errors: Carry flag is not set if the operation was successful.
            Carry flag is set on an error condition.
         
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 05h        Format a Track
=-----------------------------------------------------------------------------
    This function is a NOP on the HP 95LX.
       
    Input:  AH = 05h.
         
    Output: AH = Return status (Always 0)
         
    Errors: None.
         
    Modifies: AH, Status.
         
=-----------------------------------------------------------------------------
= * AH = 08h        Get Drive Parameters
=-----------------------------------------------------------------------------
    This function returns a set of disk-drive parameters for the drive unit
    specified in register DL. These parameters reflect the recommended
    formatting parameters for the drive.

    The register pair ES:DI, if valid, points to a disk parameter table that
    contains the values recommended for formatting the disk drive.

    If this function is called with a hard disk drive unit number specified in
    register DL That is, the drive unit number is greater or equal to 80h),
    the function sets the carry flag and sets AH to 01h, indicating a bad
    device number.
         
    Input:  AH = 08h.
            DL = Drive unit number.
         
    Output: (If a drive exists for the drive unit number)
            AX = 00h.
            BH = 00h.
            BL = Drive type code = Always 0 for the HP 95LX.
            CH = bits 0-7 of max track number.
            CL bits 6-7= bits 8-9 of max track number.
            CL bits 0-5= Sectors per track (10h).
            DH = Maximum head number (0).
            DL = Number of disk drives in the system (1).
            ES:DI = Pointer to disk parameter table.
         
    Errors: If specified drive does not exist returns Carry Set and AH=80h
         
    Modifies: AX, BX, CX, DX, DI, ES.

=-----------------------------------------------------------------------------
= * AH = 15h        Get Disk Drive Type
=-----------------------------------------------------------------------------
    This function returns the disk drive type code for the specified device.
         
    Input:  AH = 15h.
            DL = Drive unit number.
         
    Output: AH = Disk drive code:
            00h = No drive present.
            01h = Plug-In disk present, no disk change line available.
            02h = Plug-In disk present, disk change line is available.
            03h = built-in disk
            CX:DX = number of fixed disk sectors.
         
    Errors: Carry flag set on any error.
         
    Modifies: AH, Status.

=-----------------------------------------------------------------------------
= * AH = 16h        Disk Change Status
=-----------------------------------------------------------------------------
    This function reports the status of the Disk Change line of the specified
    disk drive.
         
    Input:  AH = 16h.
            DL = Drive unit number (0 - 1).
         
    Output: AH = 00h if Disk not changed.
            AH = 01h and carry flag is set if value in DL is invalid.
            AH = 06h and carry flag is set if Disk changed.
         
    Errors: As given in AH (refer to function 01).
         
    Modifies: AH, Status.
         
=-----------------------------------------------------------------------------
= * AX = 0FF00h     Modify RAM-ROM DISK (drive C:) RAM Partition
=-----------------------------------------------------------------------------
    This function changes the size of the drive C: RAM partition to BX kbytes.
         
    Input:  AH = 0FFh.
            AL = 00h
            DL = 01h
            BX = #kbytes to allocate to RAM portion of Disk
                 (default=384 if BX=0).
         
    Output: BX = -1h if insufficient memory.
            BX = 1h if RAM disk too full for shrink.
            BX = 0h if successful.
         
    Errors: As given in BX.
         
    Modifies: AX, BX, Status.
         
=-----------------------------------------------------------------------------
= * AX = 0FF01h     Initialize RAM-ROM DISK (drive C:)
=-----------------------------------------------------------------------------
    This function initializes drive C:
                 
    Input:  AH = 0FFh.
            AL = 01h
            DL = 1h
            BX = #kbytes to allocate to RAM Disk
                 (default=384 if BX=0).
            CL = # root directory sectors (16 dir entries/sector).
                 (0 = use default of 4 sectors.)
            CH = init data sectors flag. (1= clear to 0's, 0= leave alone.)
                 
    Output: BX = -1h if insufficient memory.
            BX = remaining user memory in kbytes if successful.
                 
    Errors: As given in BX.
                 
    Modifies: AX, BX, Status.
                 
=-----------------------------------------------------------------------------
= * AX = FD00      Find logical page and offset for "filename"
=-----------------------------------------------------------------------------
    Input:  AX = FD00
            ES:BX = Address of filename. The filename is an array of 11 bytes,
                    with the primary portion of the filename in the first 8
                    bytes (blank-filled) and the filename extension in the
                    last 3 bytes (blank-filled).
            DL = BIOS drive # (0=A, 2=D, 3=E, 4=F. drive C is NOT supported).
                 
    Output: If NC : BX = 16K logical page, CX = offset in that 16K page.
            If CY : filename was not found.
                 
=-----------------------------------------------------------------------------
= * AX = FD01      Set checksums/flags for cards in Ports 0 and 1
=-----------------------------------------------------------------------------
    Input:  DL = 0
         
    Output: Nothing

=-----------------------------------------------------------------------------
= * AX = FD02      Check checksums/flags for cards in Ports 0 and 1.
=-----------------------------------------------------------------------------
    Input:  DL = 0
                 
    Output: AL Bit 0 = 0 if no change for PORT 0
               Bit 1 = 0 if no change for PORT 1.
               Bit 2-7 = 0.

==============================================================================

INT 14h - SERIAL PORT SERVICES INTERRUPT
----------------------------------------

This service provides IBM XT-compatible support for the serial port. BIOS
serial port operations are performed only in a polled mode. While the HP 95LX
hardware supports serial-port interrupts, the BIOS provides no support for
interrupt-driven serial operations. However, an application program can
provide interrupt-driven support by writing directly to the serial-port
hardware.

The Serial-Port-Services-Interrupt functions (Int 14h) are described in the
following table. Specify the desired function code in register AH, with
additional parameters passed in other registers as indicated.

=-----------------------------------------------------------------------------
= * AH = 00h       Initialize Serial Port Parameters
=-----------------------------------------------------------------------------
    This service sets the baud rate, parity, number of stop bits, and
    character-frame size for the specified serial port. Register AL is used to
    pass the serial port initialization parameters for the Int 14h, AH = 00h
    function, as shown in figures 5-18 and 5-19:
         
    Input:  AH = 00h.
            DX = Serial port number (Always 0 in the HP 95LX).
            AL = Parameters as shown in figure 5-18:

            Serial Port Parameters  <Missing Figure>

    ***** From IBM Tech Ref: *****
            Bits 7,6,5 - Baud rate (values are binary)
                = 000 - 110
                = 001 - 150
                = 010 - 300
                = 011 - 600
                = 100 - 1200
                = 101 - 2400
                = 110 - 4800
                = 111 - 9600
            Bits 4,3 - Parity (values are binary)
                = 00 - None
                = 01 - Odd
                = 10 - None
                = 00 - Even
            Bits 2 - Stop bit
                = 0 - One
                = 1 - Two
            Bits 1,0 - Word length (values are binary)
                = 10 - 7 bits
                = 11 - 8 bits
    ***** end IBM Tech Ref: *****

    Output: AH : Serial Port Status

            Serial Port Status  <Missing Figure>

    ***** From IBM Tech Ref: *****
            Bit 7 - Time-out
            Bit 6 - Tranmitter shift register empty
            Bit 5 - Tranmitter holding register empty
            Bit 4 - Break detect
            Bit 3 - Framing error
            Bit 2 - Parity error
            Bit 1 - Overrun error
            Bit 0 - Data ready
    ***** end IBM Tech Ref: *****

    Errors: Timeout error (bit 7) is set in AH if DX is not in range.

    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 01h        Transmit One Character
=-----------------------------------------------------------------------------
    This function transmits one character through the serial port. The
    function waits until the UART transmit buffer is empty, then transmits the
    character by loading it into the buffer.

    When transmitting a character, the BIOS service routine loops until the
    serial port indicates that it can transmit the character. If the port does
    not indicate that it is ready within a timeout period, the function
    returns a timeout error.
        
    Input:  AH = 01h.
            AL = Character to transmit.
            DX = Serial port number (always 0 in the HP 95LX).
         
    Output: AH = Status as described for 'Initialize Serial Port Function 00'
         
    Errors: Timeout is indicated by setting bit 7 in AH.
         
    Modifies: AH.
         
=-----------------------------------------------------------------------------
= *AH = 02h         Receive One Character
=-----------------------------------------------------------------------------
    This function returns the character received by the serial port. The
    function waits until the serial port reports any error conditions that may
    have occurred. The character is returned in AL.

    ************
    * NOTE !!! *
    ************
    This function changes the serial-port-interrupt vector to point to a
    dummy-interrupt-service routine (IRET) at 0F000h:0FF53h.
    ************
    * NOTE !!! *
    ************

    Input:  AH = 02h.
            DX = Serial port number (always 0 in the HP 95LX).
                 
    Output: AH = Status as described for 'Initialize Serial Port Function 00'
                 except that only bits 7, 4, 3, 2, and 1 are reported.
            AL = Character received (valid only if AH = 0).
                 
    Errors: If AH is non-zero, an error has occurred and the character in AL
            should be discarded. If bit 7 is set in AH, a timeout occurred,
            and the other bits in AH may not be valid.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 03h        Get Serial Port Status
=-----------------------------------------------------------------------------
    This function reports the status of the serial port and the modem-control
    lines connected to the serial adapter.
                 
    Input:  AH = 03h.
            DX = Serial port number (Always 0 in the HP 95LX).
                 
    Output: AH = Status as described for 'Initialize Serial Port Function 00'
                 
    Errors: Timeout error set in AH if DX is not in range.
                 
    Modifies: AX.
                 
==============================================================================

INT 15h - SYSTEM FUNCTIONS INTERRUPT
------------------------------------

The Int 15h system functions provide a number of general services not
related to a particular hardware function in the HP 95LX.

These functions are described in the following table. Specify the desired
function code in register AH, with additional parameters passed in other
registers as indicated.

Function 4Fh is found universally in all late model PCs; it allows
applications to translate keys easily. Function C0 provides a pointer to a
system description table which describes the machine. This table and
function is also new, and present across the IBM PC line, including the
PS/2 machines.

************
* NOTE !!! *
************
If a call is made to a function code NOT listed in the table, Int 15h will
return with AH = 86h and the carry flag set, indicating an error.
************
* NOTE !!! *
************

=-----------------------------------------------------------------------------
= * AH = 00h, 01h, 02h, 03h, 04h    Cassette Functions.
=-----------------------------------------------------------------------------
    These functions are mentioned for compatibility reasons. The HP 95LX does
    NOT support the cassette drive. Register AH is set to 86h; the carry flag
    is set to indicate an error.

    Input:  AH = 00h, 01h, 02h or 03h

    Output: AH = 86h and CF set to indicate an error.

=-----------------------------------------------------------------------------
= * AH = 41h        WAIT UNTIL EVENT FUNCTION.
=-----------------------------------------------------------------------------

    This function tests a specified byte in either System RAM or in I/O space.
    If the test is true, the function returns. If the test is false, the
    function goes into light sleep. A hardware interrupt or NonMaskable
    Interrupt will then wake up the processor. Control is returned to the
    calling routine if the specified condition becomes true.

    There are two timeouts involved with this function:
    
    -- Return timeout:

    The calling routine can specify a return timeout value in BL. The return
    timeout can vary between 1 and 255 55msec intervals. If BL=0, return
    timeoutis disabled. If return timeout is enabled and the interval is
    exceeded, the function will return to the caller with carry set. The
    timeout value is stored in the BIOS data segment at 40:7b. The timer0
    interrupt decrements this timeout value.

    -- Display timeout:

    This timeout is specified by invoking Int 15h service 46h. If the display
    timeout period is exceeded, the HP 95LX will go to deep sleep. Upon
    subsequent wakeup, it will return to the caller with carry set, just as if
    a return timeout had occurred.

    Input:  AH = 41h
            AL = Type of test to perform:
                 00h = Wait for any interrupt (just goes to light sleep until
                       next interrupt).
                 01h = Compare RAM byte with BH, return when equal to BH.
                 02h = Compare RAM byte with BH, return when not equal to BH.
                 03h = Test RAM byte with BH mask, return when not equal to 0.
                 04h = Test RAM byte with BH mask, return when equal to 0.
                 10h = Wait for any interrupt (just goes to light sleep until
                       next interrupt).
                 11h = Compare I/O byte with BH, return when not equal.
                 12h = Compare I/O byte with BH, return when equal.
                 13h = Test I/O byte with BH, return when not equal to 0.
                 14h = Test I/O byte with BH, return when equal to 0.
            BH = Value or mask.
            BL = Timeout value in 55ms intervals.
                 0 = timeout disabled plus either:
                     ES:DI = Pointer to byte in memory to test (AL=1-4) or
                     DX = I/O port (AL=11h-14h).
         
    Output: Carry Clear if test is true.
            Carry Set if timeout occurred or invalid test type in AL.
                 
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 42h    Deep Sleep
=-----------------------------------------------------------------------------
    This function implements deep sleep. The HP 95LX remains in deep sleep
    until one of the following events has occured:

    1. The ON key is pressed.

    2. Five characters are received by the serial port within approximately
       1.5 seconds of each other and there is at most one framing or parity
       error.

    3. XINT line is asserted for 50 ms.

    4. A Real-Time Clock wake-up alarm occurs.

    When a wake-up occurs, the machine exits from this service and returns to
    the calling program.

    Input:  AH = 42h.
         
    Output: None.

    Modifies: None.

=-----------------------------------------------------------------------------
= * AH = 45h    (De)Activate Window keys and Cursor Tracking
=-----------------------------------------------------------------------------
    This function controls whether ALT-ARROW keys and ALT-SHIFT-ARROW keys
    will cause window movements as well as whether cursor tracking is enabled.
         
    Input:  AH = 45h.
            AL = 0 : Enables ALT-ARROW key windowing, Enables cursor tracking.
            AL = 1 : Disable ALT-ARROW key windowing, Disables cursor tracking.
            AL = 2 : Enables ALT-ARROW key windowing, Disables cursor tracking.
            AL = 3 : Disables ALT-ARROW key windowing, Enables cursor tracking.
            AL > 3 : No Operation.
         
    Output: Windowing and cursor tracking enabled or disabled according to AL.
         
    Modifies: None.
         
=-----------------------------------------------------------------------------
= * AH = 46h    Set Display Timeout
=-----------------------------------------------------------------------------
    This function enables display timeout and sets its interval. Display
    timeout occurs occurs only in light sleep.  See INT 15h. service 41h.
         
    Input:  AH = 46h.
            BX = 1-65535 : time out interval in 55 msec increments.
            BX = 0 : Display timeout disabled.
         
    Output: None.
         
    Modifies: None.

=-----------------------------------------------------------------------------
= * AH = 47h    Set/Read Contrast Register
=-----------------------------------------------------------------------------
    This function sets or reads the contrast register. The range of
    permissible values is 0 - 0Fh. The highest display contrast corresponds to
    a value of 0Fh.
         
    Input:  AH = 47h.
            AL = Subfunction.
                AL = 0 : Set Contrast value in BL.
                AL = 1 : Read Contrast value and return it in AL.
                BL = 0-0Fh : Contrast value (If AL=0).
                BL = > 0Fh : Contrast value set to 0Fh.
         
    Output: AL = contrast value if AL was 1 at entry.
    
    Modifies: AX
         
=-----------------------------------------------------------------------------
= * AH = 48h    Set Digital Beeper Volume
=-----------------------------------------------------------------------------
    Input:  AH = 48h.
            AL = 0-3 : Digital Beep Volume Setting (0=quietest).
            AL > 3 : Volume set to loudest setting.
         
    Output: None.
         
    Modifies: None.

=-----------------------------------------------------------------------------
= * AH = 49h    Set RS-232 Channel
=-----------------------------------------------------------------------------
    This function sets the RS-232 Channel to either WIRE or IR. If IR mode is
    selected, the UART baud rate is changed to 2400.
         
    Input:  AH = 49h.
            AL = 0h : WIRE (default).
            AL = 1h : IR
            AL > 1h : No Operation.
         
    Output: None.
         
    Modifies: None.
         
=-----------------------------------------------------------------------------
= * AH = 4Ah    Set RS-232 Power
=-----------------------------------------------------------------------------
    This function turns power to RS232 device on or off.
         
    Input:  AH = 4Ah.
            AL = 0h : RS232 power turned off.
            AL = 1h : RS232 power turned on.
            AL > 1h : No Operation.
         
    Output: None.
         
    Modifies: None.
         
=-----------------------------------------------------------------------------
= * AH = 4Bh    Init BIOS Time
=-----------------------------------------------------------------------------
    This service loads time from the Real-Time Clock (RTC) and checks for a
    valid value. If the RTC contains an illegal value (such as seconds count
    more than 59), the double word at 40h:6Ch is cleared to 0 and the service
    returns with CF=1. Otherwise, the time value from the RTC is converted to
    the number of 18.2-Hz ticks since midnight. This is stored in the double
    word at 40h:6Ch and the service returns with CF=0.
         
    Input:  AH = 4Bh.
         
    Output: CF = 0 if successful.
            CF = 1 if failed.
         
    Modifies: None.

=-----------------------------------------------------------------------------
= * AX = 4C00h      Select Keyboard
=-----------------------------------------------------------------------------
    This function is a NOP in the current version of the HP 95LX. Future
    versions will use it to select the keyboard types.

    Input:  AX = 4C00h
            BX = Keyboard code:
                0008h = FINLAND
                0010h = FRANCE
                0020h = GERMANY
                0040h = ITALY
                0200h = PORTUGAL
                0400h = SPAIN
                0800h = SWEDEN
                8000h = US

    Output: AH = 0FFh if more than one keyboard requested or keyboard type is
                 NOT supported.
            AH = 000h if keyboard successfully selected.
         
    Modifies: AX

=-----------------------------------------------------------------------------
= * AX = 4C01h  Return Selected Keyboard Type
=-----------------------------------------------------------------------------
    This function returns the selected keyboard type.

    Input:  AX = 4C01h.
         
    Output: AX = Selected keyboard type:
                0008h = FINLAND
                0010h = FRANCE
                0020h = GERMANY
                0040h = ITALY
                0200h = PORTUGAL
                0400h = SPAIN
                0800h = SWEDEN
                8000h = US
         
    Modifies: AX

=-----------------------------------------------------------------------------
= * AX = 4C02h  Return Available Keyboard Types
=-----------------------------------------------------------------------------
    This function returns the types of keyboards available. The return code in
    AX is the sum of keyboard codes listed in service 4C01h. For example, a
    return code of AX=8001h would indicate that US and BELGIUM keyboards are
    supported.
         
    Input:  AX = 4C02h.
         
    Output: AX = available keyboard type(s).
         
    Modifies: AX
         
=-----------------------------------------------------------------------------
= * AX = 4C10h  Select Language
=-----------------------------------------------------------------------------
    This function is used to tell the BIOS whether the selected language is
    English or Non-English.
                 
    Input:  AX = 4C10h.
            BL = Language:
                00h = English.
                > 00h = Non-English.
                 
    Output: None.
                 
    Modifies: AX

=-----------------------------------------------------------------------------
= * AX = 4C11h  Return Language Type
=-----------------------------------------------------------------------------
    This function returns the selected language type.
                 
    Input:  AX = 4C11h.
                 
    Output: AL = Selected language type:
                00h = English.
                01h = Non-English.
                 
    Modifies: AX

=-----------------------------------------------------------------------------
= * AH = 4Dh    Return Model Specific Information        
=-----------------------------------------------------------------------------
    Returns Model Specific Information.
         
    Input:  AH = 4Dh
            AL = D4h
         
    Output: BH = 'H'
            BL = 'P'
            CH = Family type (1).
            CL = Model type (1).
            DL = Code Revision (0)
         
    Modifies: AX, BX, CX, DX
         
=-----------------------------------------------------------------------------
= * AH = 4Eh    Enable Light Sleep In Key Test
=-----------------------------------------------------------------------------
    Enables or disables light sleep in key test. If light sleep is disabled,
    the display time out (shut down) is also disabled.

    This function should be used with caution since it is possible for the
    batteries to run down if light sleep in key test is disabled indefinitely.
         
    Input:  AH = 4Eh
            AL = 00h : light sleep disabled, display time out disabled.
            AL = 01h : light sleep enabled.
            AL > 01h : nop.
         
    Output: Light sleep enabled or disabled depending on value of AL at entry.
         
    Modifies: None.
         
=-----------------------------------------------------------------------------
= * AH = 4Fh    Keyboard Translation Hook
=-----------------------------------------------------------------------------
    The Keyboard Hardware Interrupt (Int 09h) service routine calls this
    function once for each scancode received. It does so after it obtains the
    scancode from the keyboard shift register, but before it does any
    processing on the scancode. This call is provided so that an application
    can take over the function 4Fh "hook" to perform special processing or
    translation of the key. If the application service routine clears the
    carry before it returns to the Int 09h routine, the Int 09h routine will
    discard the scancode. If the carry is set, the Int 09h routine will
    continue with its normal processing. When the Int 9h Keyboard Interrupt
    service routine issues an Int 15h function 4Fh, the stack frame is set as
    shown in figure 5-20 upon entry to the 4Fh function:

    4Fh Stack Frame     <Missing Figure>

    Input:  AH = 4Fh
            AL = Scancode obtained from I/O port 60h.
            DS = 40h (from Int 09h).
         
    Output: None.
         
    Modifies: None.

=-----------------------------------------------------------------------------
= * AH = 50h    Measure Battery
=-----------------------------------------------------------------------------
    This function measures the voltage of the specified battery. The return
    value in AX is in the range from 0-255 if the battery measurement was
    successfully taken. A return value of 255 represents 5.0 volts and 0
    represents 0.0 volts. If an error occurred (such as battery voltage was
    too noisy to measure) then AX=0FFFFh on exit.
                 
    Input:  AH = 50h.
            AL = Battery to measure:
                00 for system battery.
                01 for backup battery.
                ***** Undocumented *****
                02 for card 0 battery.
                03 for card 1 battery (same as 02 on 95LX).
                04 for ????
                ***** End Undocumented *****
    Output: AX = Measured value (0-255): 0 = 0 volts, 255 = 5 volts.
            AX = 0FFFFh if error occured.
                 
    Modifies: AX
                 
=-----------------------------------------------------------------------------
= * AH = C0h        Get Pointer to System Description Table
=-----------------------------------------------------------------------------
    This function returns a pointer to the System Description Table (SDT) for
    the HP 95LX.
         
    Input:  AH = C0h
         
    Output: AH = 00h
            ES:BX = Pointer to the System Description Table.
         
    Errors: None.
         
    Modifies: AH, BX, ES.
         
    The SDT provides an eight byte description of the BIOS capabilities:
    
        HP 95LX BIOS Capabilities <Missing Figure>

    ES:BX-> 08h     No. of bytes in SDT (LSB).
            00h     No. of bytes in SDT (MSB).
            FBh     ID Byte.
            00h     Secondary ID Byte.
            01h     BIOS ROM Version.
            30h     Parameter Byte (see below)
            00h     Reserved
            00h     Reserved
            00h     Reserved
            00h     Reserved

    The parameter byte describes certain hardware and BIOS features:

        HP 95LX Hardware and BIOS Features <Missing Figure>

        ***** From IBM Tech Ref: *****
            Bit 7 = 1 - Fixed disk BIOS uses DMA channel 3
            Bit 6 = 1 - Slave PIC present
            Bit 5 = 1 - RTC present
            Bit 4 = 1 - Keyboard intercept (int 15h fn 4Fh) called in keyboard
                        interrupt (int 9) handler.
            Bit 3 = 1 - Wait (int 15h fn 9xh) supported
            Bit 2 = 1 - Extended BIOS area allocated
            Bit 1 = 1 - Micro Channel machine
            Bit 0 = 1 - Reserved
        ***** End IBM Tech Ref: *****

    The HP 95LX returns 30h as its parameter byte. This indicates that it does
    not use DMA channel 3 and does not have a cascaded interrupt controller,
    but it does have a real-time clock and supports the Keyboard Translation
    Hook function.

==============================================================================

INT 16h - KEYBOARD SERVICES INTERRUPT
-------------------------------------

Int 16h is used to access character information in the keyboard buffer.
Each character is stored in the buffer as a two-byte pair by Int 09h.
Normally, one byte is the scancode for the character and the other byte is
the equivalent ASCII character code. When key information is desired, the
operating system or an application calls Int 16h, which reads the scancode
and character code from the buffer and returns them. The scancode is
returned in AH; the ASCII character code, in AL.

-- Light Sleep

Int 16h services 0, 1, 10h, 11h and 13h invoke light sleep. This is a low
power mode that greatly improves battery life. In addition, light sleep
code handles Shift annunciator updates and performs battery checks and
display timeouts as scheduled by their respective counters.

The low power state is exited by any hardware interrupt. When an interrupt
occurs, it is serviced and control is passed back to the INT 16h code. The
longest interval that can occur between successive interrupts is 55 msecs,
which is the period of the 18.2 Hz timer. Thus the longest interval that
the machine can be in low-power mode is 55 msecs.

When light sleep is exited, control is passed back to INT 16h code. The
behavior of the INT 16h code depends on which service was called by the
application. If service 0 or 10h was called, the INT 16h code checks to see
if a keycode was placed in the key buffer. If no keycode is found, it quickly
returns to light sleep and low power mode.

If service 1 or 11h was called, the behavior is to check the status of the
key buffer (key code present or absent) and return to the caller.

An application that calls service 0 or 10h will save power because the
machine quickly goes back to light sleep after each timer interrupt. The
percentage of time that the machine is low power mode is above 98%.

An application that repeatedly tests for a key down by calling INT 16h
services 1 or 11h will get some power savings, because the machine goes to
low power mode on each call to INT 16h. However, the percentage of time the
CPU is in low power mode will be lower than that of INT 16h services 0h or
10h. For this reason, it is recommended that services 0 or 10h be used
whenever possible.

-- Scancode processing

The scancodes for some keys do not have an ASCII equivalent. Int 09h
processes such scancodes in one of the following ways, depending on the
key:

* Int 09h may discard the scancode (no data is entered into the keyboard input
  buffer). For example, if a scancode for a keyboard state-defining key
  ( [Shift], [Ctrl], [Alt], [Caps Lock], [Num Lock], or [Scroll Lock] ) is
  received, the state of the keyboard is updated, but the scancode is
  discarded.

* Int 09h may enter a two-byte pair "00h/XXh" into the keyboard input buffer.
  "XXh" may be the original scancode, or it may be a translated hexadecimal
  code for the key or key combination pressed. Int 16h returns "XXh" in
  register AH and "00h" in register AL.

* Int 09h may enter a two-byte pair "E0h/XXh" into the keyboard input buffer.
  This occurs if the received scancode "XXh" is prefixed with "E0h". Int 16h
  returns "XXh" in register AH and "E0h" in register AL.

If the [ON] key is pressed with the machine running, INT 16 invokes deep
sleep. No key code is returned to the calling routine.

There are some non-compatible keys on the HP 95LX. These include UTIL, FILER,
COMM, APPT, PHONE, MEMO, LOTUS 123 and HP CALC. There are special key codes
for these keys, which are not part of the IBM compatible key code set.
These key codes are passed on to the calling application the same as
`compatible key codes`. See the keycode table in the INT 09 section for a
complete list of the HP 95LX key codes.

The Keyboard-Services interrupt (Int 16h) functions are described below.
Specify the desired function code in register AH, with additional
parameters passed in other registers as indicated in the table.

* Int 16h functions 00h and 01h discard scancode values greater than 84h.
  These extended scancodes can only be read with Int 16h functions 11h and 12h.

COMPATIBILITY:

The IBM KEYBXX utilities perform the following test to determine if the
BIOS supports function 10h, 11h, and 12h:

    mov     ah,92h
    int     16h
    cmp     ah, 80h
    ja      NoExtendedSupport

Therefore the HP 95LX Int 16h service must make sure that AH is decremented
by 12h when an invalid function code greater than 12h is passed to the
service.

=-----------------------------------------------------------------------------
= * AH = 00h    Read Character From Keyboard Input Buffer
=-----------------------------------------------------------------------------
    This function attempts to read a character from the keyboard input buffer.
    Each character is stored in the buffer as a two-byte pair consisting of
    the scancode and its ASCII equivalent. If a scancode/ASCII pair is
    available, it is removed from the buffer and returned in AX.

    ************
    * NOTE !!! *
    ************
    This function cannot return scancode values greater than 84h. Use
    function 10h for the extended scancodes. The function waits until a
    scancode/ASCII pair is present in the keyboard input buffer. Except for
    hardware interrupts, no other processing occurs until a key is pressed on
    the keyboard.
    ************
    * NOTE !!! *
    ************

    Input:  AH = 00h.
                 
    Output: AH = Scancode.
            AL = ASCII character code, or 00h for a special scancode.
                 
    Errors: None.
                 
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AH = 01h    Report If Character Available
=-----------------------------------------------------------------------------
    This function examines the keyboard input buffer to see if a
    scancode/ASCII pair is available. If a pair is available, it is returned
    without removing it from the buffer. The function returns immediately,
    regardless of whether a scancode/ASCII pair is available. This function does
    not recognize scancode values above 84h. Use function 11h for the extended
    scancodes.
                 
    Input:  AH = 01h
                 
    Output: Zero flag is clear if character is available:
            AH = Scancode.
            AL = ASCII character code, or 00h for a special scancode.
            
            Zero flag is set if no characters are available,
            AX is indeterminate.
                 
    Errors: None.
                 
    Modifies: AX, Status.
                 
=-----------------------------------------------------------------------------
= * AH = 02h    Get Shift Status
=-----------------------------------------------------------------------------
    This function returns the shift status as defined below:
         
    Input:  AH = 02h.
         
    Output: AL = Shift status bits as follows:

        Shift Status <Missing Figure>

        ***** From IBM Tech Ref: *****
            Bit 7 = 1 - Insert locked
            Bit 6 = 1 - Caps Lock locked
            Bit 5 = 1 - Num Lock locked
            Bit 4 = 1 - Scroll Lock locked
            Bit 3 = 1 - Alt key pressed
            Bit 2 = 1 - Ctrl key pressed
            Bit 1 = 1 - Left Shift key pressed
            Bit 0 = 1 - Right Shift key pressed
        ***** End IBM Tech Ref: *****

    Errors: None.
         
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AH = 03h    Set Typematic Rate and Key Delay
=-----------------------------------------------------------------------------
    This function sets the typematic rate and delay between key press and
    when key repeat takes effect.
                 
    Input:  AH = 03h
            AL = 05h : Set typematic rate.
            BH = 00h - 03h for delays of 250ms, 500ms, 750ms, or 1s.
            BL = 00h - 1Fh for typematic rates of 30cps down to 2cps.
                 
                BL=00h -> 30cps        BL=10h -> 7.5cps
                BL=01h -> 30cps        BL=11h -> 7.5cps
                BL=02h -> 30cps        BL=12h -> 6.0cps
                BL=03h -> 30cps        BL=13h -> 6.0cps
                BL=04h -> 30cps        BL=14h -> 5.0cps
                BL=05h -> 30cps        BL=15h -> 5.0cps
                BL=06h -> 30cps        BL=16h -> 4.3cps
                BL=07h -> 30cps        BL=17h -> 4.3cps
                BL=08h -> 15cps        BL=18h -> 3.7cps
                BL=09h -> 15cps        BL=19h -> 3.3cps
                BL=0Ah -> 15cps        BL=1Ah -> 3.0cps
                BL=0Bh -> 15cps        BL=1Bh -> 2.7cps
                BL=0Ch -> 10cps        BL=1Ch -> 2.5cps
                BL=0Dh -> 10cps        BL=1Dh -> 2.3cps
                BL=0Eh -> 10cps        BL=1Eh -> 2.1cps
                BL=0Eh -> 10cps        BL=1Fh -> 2.0cps
                 
    Output: None.
                 
    Errors: None.
                 
    Modifies: None.

=-----------------------------------------------------------------------------
= * AH = 05h    Write Character to Keyboard Input Buffer
=-----------------------------------------------------------------------------
    This function writes the character code and scancode in CX to the keyboard
    input buffer. The character and scancode are placed at the end of the
    buffer. The function will return an error status if the buffer is full. 
                 
    Input:  AH = 05h.
            CH = Scancode to write to buffer.
            CL = ASCII character code to write to buffer, or
                 00h for a special scancode, or
                 E0h for an extended scancode.
                 
    Output: AL = 00h if the write succeeded.
            AL = 01h if the write failed due to a full buffer.
                 
    Errors: The write will fail if the buffer is full.
                 
    Modifies: AX.
                 
=-----------------------------------------------------------------------------
= * AH = 10h    Extended Read Character From Keyboard Input Buffer
=-----------------------------------------------------------------------------
    This function, like function 00h, attempts to read a character from the
    keyboard input buffer. However, function 10h can read both standard
    scancodes and the new extended scancodes. Function 10h reads characters
    just like function 00h, but scancode values above 84h are recognized. If a
    scancode/ASCII pair is available, it is removed from the buffer and
    returned in AX. The function waits until a scancode/ASCII pair is present
    in the keyboard input buffer. Except for hardware interrupts, no other
    processing occurs until a key is pressed on the keyboard. 
                 
    Input:  AH = 10h.
                 
    Output: AH = Scancode.
            AL = ASCII character code, or
                 00h for a special scancode, or
                 E0h for an extended scancode.
                 
    Errors: None.
                 
    Modifies: AX.

=-----------------------------------------------------------------------------
= * AH = 11h        Extended Report if Character Available
=-----------------------------------------------------------------------------
    This function, like function 01h, examines the keyboard input buffer to
    see if a scancode/ASCII pair is available. However, function 11h
    recognizes scancode values above 84h. Thus, it can read the extended
    scancodes. If a scancode/ASCII pair is available, it is returned without
    removing it from the buffer. The function returns immediately, regardless
    of whether a scancode/ASCII pair is available. 
                 
    Input:  AH = 11h.
                 
    Output: Zero flag is clear if character is available:
            AH = Scancode.
            AL = ASCII character code, or
                 00h for a special scancode, or 
                 E0h for an extended scancode.
                 
            Zero flag is set if no characters are available:
            AX is indeterminate.
                 
    Errors: None.
                 
    Modifies: AX, Status.
                 
=-----------------------------------------------------------------------------
= * AH = 12h        Get Extended Keyboard Status
=-----------------------------------------------------------------------------
    This function returns an extended shift status byte in AH. The byte
    returned in AL is the same as that returned by function 02h. 
         
    Input:  AH = 12h.
         
    Output: AH = Status bits as follows:    <Missing Figure>

        ***** From IBM Tech Ref: *****
            Bit 7 = 1 - SysRq key pressed
            Bit 6 = 1 - Caps Lock key pressed
            Bit 5 = 1 - Num Lock key pressed
            Bit 4 = 1 - Scroll Lock key pressed
            Bit 3 = 1 - Right Alt key pressed
            Bit 2 = 1 - Right Ctrl key pressed
            Bit 1 = 1 - Left Alt key pressed
            Bit 0 = 1 - Left Ctrl key pressed
        ***** End IBM Tech Ref: *****

            AL = Status bits as follows:    <Missing Figure>

        ***** From IBM Tech Ref: *****
            Bit 7 = 1 - Insert locked
            Bit 6 = 1 - Caps Lock locked
            Bit 5 = 1 - Num Lock locked
            Bit 4 = 1 - Scroll Lock locked
            Bit 3 = 1 - Alt key pressed
            Bit 2 = 1 - Ctrl key pressed
            Bit 1 = 1 - Left Shift key pressed
            Bit 0 = 1 - Right Shift key pressed
        ***** End IBM Tech Ref: *****

    Errors: None.
         
    Modifies: AX.
         
=-----------------------------------------------------------------------------
= * AH = 13h        Wait for keyboard event
=-----------------------------------------------------------------------------
    This function waits until a key has been pressed or the keyboard shift
    flags change. If a new key code is found in the key buffer, it returns
    with ZF = 0 and AX = key code/ASCII code for the key. If any of the
    keyboard shift flags change, it returns with ZF = 1 and AX = shift flags.

    This routine times out after 9 timer ticks (4950 seconds) and returns even
    if there have been no keyboard events. If timeout occurrs, the routine
    returns with ZF = 1 and AX = shift flags.
                 
    Input:  AH = 13h
            BX = current keyboard shift flags (same format as service 12h)
                 
    Output: Zero flag is clear if character is available:
            AH = Scancode.
            AL = ASCII character code, or
                 00h for a special scancode, or
                 E0h for an extended scancode.
                 
            Zero flag is set if timeout or keyboard flags changed.
            AX is loaded with the keyboard flags as described in service 12h.
                 
    Errors: None.
                 
    Modifies: AX, flags

==============================================================================

INT 17h - PRINTER SERVICES INTERRUPT
------------------------------------

The Int 17h service routine supports one serial printer. This is different
from the standard PC-XT BIOS where Int 17h drives a set of up to three
parallel printers. However, it is similar to the situation when the DOS
command 

    MODE LPT1:=COM1:

is used to redirect LPT1 output of a PC to a serial printer. In this case,
MS-DOS redirects the INT 17h interrupt vector to point to an interrupt service
routine that supports a serial printer.

This service performs several general tests before performing a specified
function. It checks to make sure that the port number requested is in the
range (0 - 1). It also checks the value of the function requested to
make sure it is in range (0 - 2). If any of the tests fail, the service
will set AH to 29h and return. The carry flag is not affected by any of the
functions.

The printer timeout values are stored at 40h:78h.

The Printer Services interrupt (Int 17h) functions are described below.
Specify the desired function code in register AH, with additional parameters
passed in other registers as indicated in the table.

************
* NOTE !!! *
************
The printer services change the serial port interrupt vector (INT 0Ch) to
point to its own serial port interrupt service routine.
************
* NOTE !!! *
************

=-----------------------------------------------------------------------------
= * AH = 00h        Write a Byte to a serial Printer
=-----------------------------------------------------------------------------
    This function checks to see whether an XOFF character has been received.
    If no XOFF was received, the routine writes a byte to the serial port and
    returns.

    If an XOFF was received, it waits until an XON is received, or the timeout
    period is elapsed. If the XON is received before the timeout period
    elapsed, the routine writes a byte of data to a serial printer port and
    returns. If the timeout period is elapsed before an XON is received, the
    routine simply returns with bit 0 of AH set.
                 
    Input:  AH = 00h.
            AL = Data byte to be written.
            DX = Port number (0 - 1).
                 
    Output: AH = Printer status as shown below.

    Modifies: AH.

        Printer Status <Missing Figure>

        ***** From IBM Tech Ref: *****
            Bit 7 = 1 - Not busy
            Bit 6 = 1 - Acknowledge
            Bit 5 = 1 - Out of paper
            Bit 4 = 1 - Selected
            Bit 3 = 1 - I/O error
            Bit 2 = 1 - Reserved
            Bit 1 = 1 - Reserved
            Bit 0 = 1 - Time-out
        ***** End IBM Tech Ref: *****

    Errors:  None.

=-----------------------------------------------------------------------------
= * AH = 01h        Initialize Printer
=-----------------------------------------------------------------------------
    This function initializes a serial printer port. It clears the XOFF
    received flag. It does not set the baud rate or parity. This should be
    done with INT 14h function 00.
         
    Input:  AH = 01h.
            DX = Port number (0 - 1).

    Output: AH = Printer status (see function AH=00h)
         
    Modifies: AH.

=-----------------------------------------------------------------------------
= * AH = 02h        Get Printer Status
=-----------------------------------------------------------------------------
    This function returns the status of the specified serial printer port.
         
    Input:  AH = 02h.
            DX = Port number (0 - 1).

    Output: AH = Status byte (see function AH =00h).
         
    Errors: As indicated in AH.
         
    Modifies:      AH.

==============================================================================

INT 19h - BOOT INTERRUPT
------------------------

This service boots the MS-DOS operating system.


==============================================================================

INT 1Ah - TIME-OF-DAY SERVICES
------------------------------

The Time-of-Day services provide access to the real-time clock and
the BIOS clock. The BIOS clock is a software tool that is incremented
by the Int 08h service routine once every timer "tick" (hardware timer
interrupt). This occurs 18.2065 times per second. The software clock
consists of a count of the timer "ticks."

The Time-of-Day Services interrupt (Int 1Ah) functions are described
below. Specify the desired function code in register AH, with
additional parameters passed in other registers as indicated in the
table. If an unsupported function is requested, Int 1Ah will return
with the carry flag set. 

Compatibility: For compatibility, the Int 1A services does the following:

* Immediately enable interrupts upon entry into the Int 1A services.

* All functions in the 1Ah set of services return via a RET 2 instruction.

* Interrupts are NOT be disabled while processing functions 0 and 1.

=-----------------------------------------------------------------------------
= * AH = 00h        Read the Current Clock Count
=-----------------------------------------------------------------------------
    This function returns the number of BIOS clock ticks since midnight.
    If AL is non-zero, the application should increment the date by one day. 
                
    Input:  AH = 00h.
                
    Output: AH = 00h.
            CX = Timer "tick" count, most significant word.
            DX = Timer "tick" count, least significant word.
            AL is nonzero if the timer has not been read in 24 hours.
            The carry flag is cleared in the Status register.
                 
    Errors: None.

    Modifies: AX, CX, DX, Status.

=-----------------------------------------------------------------------------
= * AH = 01h        Set Current Clock Count
=-----------------------------------------------------------------------------
    This function sets the number of timer "ticks" in the software clock.
                 
    Input:  AH = 01h.
            CX = Timer "tick" count, most significant word.
            DX = Timer "tick" count, least significant word.
                 
    Output: AH = 00h : the carry flag is cleared in the Status register.
                 
    Errors: None.
                 
    Modifies:  AH, Status

=-----------------------------------------------------------------------------
= * AH = 02h        Read the Time From the Real-Time Clock
=-----------------------------------------------------------------------------
    This function reads the time from the real-time clock (RTC).
                 
    Input:  AH =        02h.
                 
    Output: AH = 00h.
            CH = Hours in BCD.
            CL = Minutes in BCD.
            DH = Seconds in BCD.
            The carry flag is cleared if the RTC is operating.
                 
    Errors: The carry flag is set if the RTC is not operating.
                 
    Modifies: AX, CX, DX, Status.

=-----------------------------------------------------------------------------
= * AH = 03h        Set the Time in the Real-Time Clock
=-----------------------------------------------------------------------------
    This function sets the time in the real-time clock.
                 
    Input:  AH = 03h.
            CH = Hours in BCD.
            CL = Minutes in BCD.
            DH = Seconds in BCD.
            DL = 01h if daylight saving time,
                 00h if standard time.
            The carry flag is cleared in the Status register.
                 
    Output: AH = 00h.
                 
    Errors: None.
                 
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 04h        Read Date From the Real-Time Clock
=-----------------------------------------------------------------------------
    This function reads the date from the real-time clock.
                 
    Input:  AH = 04h.
                 
    Output: AH = 00h.
            DL = Day in BCD.
            DH = Month in BCD.
            CL = Year in BCD.
            CH = Century:
                 19 if 20th century.
                 20 if 21st century.
                 
    Errors: Carry flag set if the real-time clock is not operating,
            otherwise the carry flag is cleared.
                 
    Modifies: AX, CX, DX, Status.

=-----------------------------------------------------------------------------
= * AH = 05h        Set Date in Real-Time Clock
=-----------------------------------------------------------------------------
    This function sets the date in the real-time clock.
                 
    Input:  AH = 05h.
            DL = Day in BCD.
            DH = Month in BCD.
            CL = Year in BCD.
            CH = Century:
                 19 if 20th century.
                 20 if 21st century.
            The carry flag is cleared in the Status register.
                 
    Output: AH = 00h.
                 
    Errors: None.
                 
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 06h        Set Alarm
=-----------------------------------------------------------------------------
    This function sets the alarm to generate an Int 4Ah at the specified
    time. The user must place a pointer to an appropriate interrupt handling
    routine in the Int 4Ah vector. The alarm will reoccur every 24 hours if
    not reset using AH = 07h. 
                 
    Input:  AH = 06h.
            CH = Hours in BCD.
            CL = Minutes in BCD.
            DH = Seconds in BCD.
                 
    Output: AH = 00h.
                 
    Errors: Carry flag set if the alarm is already set or the real-time clock
            is not operating, otherwise the carry flag is cleared.
                 
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 07h        Reset Alarm
=-----------------------------------------------------------------------------
    This function resets the alarm hardware and clears any pending alarm.
    (An alarm, when set, will reoccur every 24 hours until it is reset.)
                 
    Input:  AH = 07h.
                 
    Output: AH = 00h.
            The carry flag is cleared in the Status register.
                 
    Errors: None.
                 
    Modifies: AX, Status.

=-----------------------------------------------------------------------------
= * AH = 08h        Set Alarm to Power-On the System
=-----------------------------------------------------------------------------
    This function sets an alarm in the Real-Time Clock. When the alarm time
    is reached with the system in the powered-down state, the system powers
    on and boots. If the system is powered on when the alarm time is reached,
    the alarm interrupt routine will issue an Int 4Ah. The Int 4Ah call is
    made as if the alarm had been set up by Int 1Ah function 06h. 
         
    Input:  AH = 08h.
            CH = Hours in BCD.
            CL = Minutes in BCD.
            DH = Seconds in BCD.
         
    Output: AH = 00h.
         
    Errors: Carry flag set if the alarm is already set or the
            real-time clock is not operating.
         
    Modifies: AX, Status.
         
=-----------------------------------------------------------------------------
= * AH = 09h        Get the Current Alarm Setting
=-----------------------------------------------------------------------------
    This function returns the alarm setting currently in the Real-Time Clock.
                 
    Input:  AH = 09h.
                 
    Output: CH = Hours in BCD.
            CL = Minutes in BCD.
            DH = Seconds in BCD.
            DL = Status of the alarm:
                00h: The alarm is not enabled.
                01h: The alarm is enabled but will not power on the system.
                02h: The alarm is enabled and will power on the system.
                 
    Errors: The carry flag is set if the real-time clock is not operating.
            Otherwise, the carry flag is cleared.
                 
    Modifies: AX, CX, DX, Status.

=-----------------------------------------------------------------------------
= * AH = 0Ah        Read Day Counter
=-----------------------------------------------------------------------------
    The HP 95LX BIOS maintains a count of the number of times the software
    clock has accumulated 24 hours worth of timer "ticks." This variable
    allows an application to determine how many days have passed since it
    last read the date. 
                 
    Input:  AH = 0Ah
                 
    Output: AH = 00h.
            CX = Day count(number of times the software clock has overflowed).
                 The carry flag is cleared in the Status register.
                 
    Errors: None.
                 
    Modifies: AX, CX, Status.

=-----------------------------------------------------------------------------
= * AH = 0Bh        Write Day Counter
=-----------------------------------------------------------------------------
    This function writes CX into the day counter.
                 
    Input:  AH = 0Bh.
            CX = Value to write to the day counter.
                 
    Output: AH = 00h. The carry flag is cleared in the Status register.
                 
    Errors: None.
                 
    Modifies: AX, Status.

==============================================================================

INT 1Bh - KEYBOARD BREAK INTERRUPT
----------------------------------

The Keyboard Break Interrupt is called when the [Ctrl] [Break] keys are
pressed simultaneously. It is called from the Keyboard Hardware interrupt
(Int 09h) via an Int 1Bh instruction. Applications may chain into the Keyboard
Break interrupt. Interrupts are enabled when Int 1Bh is called (the BIOS
points the Int 1Bh vector to an Iret instruction). Just prior to calling
Int 1Bh, the Int 09h routine clears the keyboard buffer. When the Int 1Bh
routine returns, the Int 09h routine puts the pseudo scancode/ASCII pair
"00h/00h" into the keyboard buffer, then returns. 

When the Int 1Bh routine is entered, the BIOS has established a stack frame as
shown below:

    Int 1Bh Stack Frame <Missing Figure>

The register contents are as shown below when Int 1Bh is called:

    AH: Undefined
    AL: Break scancode (46h)
    BX: copy of Keyboard buffer read pointer word at 40h:1Ah 
    DS: 40h
    ES: Undefined

==============================================================================

INT 1Ch - TIMER TICK INTERRUPT
------------------------------

The Timer-Tick interrupt is called from the Timer-Hardware interrupt (Int 08h)
via an Int 1Ch instruction. The interrupt is called every time the hardware
timer issues an interrupt (a timer "tick"). This occurs at a nominal rate of
18.2 Hz (once every 55 ms). Applications may chain into the Timer Tick
interrupt. Interrupts are enabled when the Int 1Ch is issued. (The BIOS points
the Int 1Ch vector to an Iret instruction.) When the Int 1Ch routine is
entered, the BIOS has established a stack frame as shown in figure 5-28:

    Int 1Ch Stack Frame <Missing Figure>

The register contents are as shown below when Int 1Ch is called:

    DS: 40h
    AX, BX, CX, DX, BP, SI, DI, ES: undefined.

==============================================================================

INT 1Dh - VIDEO PARAMETER TABLE POINTER
---------------------------------------

Int 1Dh is a pointer to a video-parameter table. This table contains
parameters used to initialize the display controller for a particular display
mode. The modes are described in the section on Int 10. The video-parameter
table is structured into fields as follows:

    Size    Description
    16      Alphanumeric 40 x 25 initialization parameters.
    16      Alphanumeric 80 x 25 initialization parameters.
    16      Graphics initialization parameters.
    16      Monochrome 80 x 25 initialization parameters.
    8*      Video buffer size.
    8       Number of columns for each video mode.
    8       Video mode parameter bytes.

    * The video buffer size field consists of 4 two-byte words.

The initialization parameters can be used to set up the horizontal and
vertical size of the display, and to establish the cursor size and position. 

The video buffer size parameter can set the size of the graphics buffer for the
graphics modes. This parameter should not be used in monochrome mode 7. 

The number of columns parameter can be used to indicate the number of columns
to display. This parameter can be used for subsequent display address
calculations.

The video mode parameter bytes are written to the display hardware to set it
up appropriately for a given mode. 

==============================================================================

INT 1Fh - GRAPHICS CHARACTER TABLE POINTER
-------------------------------------------

This is a pointer to the font table for Code Page 850 characters 128 thru 255.
Each character in the character table is defined by eight bytes. The first
byte defines eight dots along the top row of the character. The next byte
defines eight dots along the next row down, and so on. The character is
defined as an 5-by-7 font. 


For example, this is the bit representation for the "A acute" character taken
out of the font file:

    db  02h     ;        . . . . X .
    db  04h     ;        . . . X . .
    db  0Eh     ;        . . X X X .
    db  11h     ;        . X . . . X
    db  1Fh     ;        . X X X X X
    db  11h     ;        . X . . . X
    db  11h     ;        . X . . . X
    db  00h     ;        . . . . . .

The HP 95LX BIOS also has a built in character font table for Code Page 850
characters from 00h through 7Fh. THERE IS NO INTERRUPT VECTOR POINTING TO
THIS TABLE, but it is fixed in location at 0F000h:0FA6Eh.

==============================================================================

INT 4Ah - USER ALARM INTERRUPT
------------------------------

Int 4Ah is called from the real-time clock interrupt service routine
(Int 70h) when an interrupt is issued by an alarm. Applications may chain into
this interrupt so that they may be alerted when an alarm is active. (The
HP 95LX BIOS points the Int 4Ah vector to an Iret instruction.) When the
Int 4Ah routine is entered, the BIOS has established a stack frame as shown in
figure 5-29:

    Int 4Ah Stack Frame <Missing Figure>

The register contents are as shown below when Int 4Ah is called:

    AL: 0Dh
    DS: 40h
    AH, BX, CX, DX, BP, SI, DI, ES: undefined

==============================================================================

INT 63h - eXecute In Place (XIP) SERVICES INTERRUPT
---------------------------------------------------

The Int 63h XIP services provide low-level program location and bank
switching capabilities which can be used to run code directly from
a plug-in ROM card.

Plug-in card ports 0 and 1 are supported. However, since the HP 95LX has 
only one card port, a custom card or a custom extender board would be
required to access two cards. When a PCMCIA standard card is inserted into
the HP 95LX, that card resides in Port 0.

The term "logical page" will refer to memory in a plug-in card and the
term "physical page" will refer to memory in the address space of the CPU.

Memory on a plug-in card is viewed as a sequence of 16 KB logical pages.
The logical pages start on successive 16 KB boundaries starting with
logical page 0 which starts at card physical address 0. 

The HP 95LX has four 16 KB physical pages and two 64 KB physical pages. The
physical page numbers, starting addresses, and sizes are:


    Physical Page Number        Starting Address        Size
              3                      EC000              16 KB
              2                      E8000              16 KB
              1                      E4000              16 KB
              0                      E0000              16 KB
              8                      D0000              64 KB
              4                      C0000              64 KB

The XIP Services interrupt (Int 63h) functions are described in the following
table. Specify the desired function code in register AH, with additional
parameters passed in other registers as indicated.

=-----------------------------------------------------------------------------
= * AH = 80h        Return File Location and Lock Card Port
=-----------------------------------------------------------------------------
    This function searches the root directory of plug-in card drives A, D, E,
    and F (in that order) for the specified file. If the file is found, the
    card port containing the file is locked.

    This function is intended to be used by an XIP loader program to
    locate an XIP program on a plug-in ROM card. If successful, the
    port is locked which means that a warm start will result if the
    card is removed prior to unlocking the port. Thus, the program
    is assured that the logical pages containing the file are available
    for mapping until the program explicitly unmaps the pages and unlocks
    the port.
                 
    Input:  AH = 80h.
            ES:BX = Pointer to an 11-byte buffer containing the file name in
                    the same format used in a DOS disk directory. That is, the
                    file name left justified and blank filled in bytes 0
                    through 7 and the extension left justified and blank
                    filled in bytes 8 through 10.
                 
    Output: AH = Return status.
                00h = Success.
                A2h = File not found.
                BX = logical page which contains the beginning of the file.
                CX = offset from beginning of logical page to beginning of file
                DX = port number of card that contains the file.
         
    Errors: As given in AH.
         
    Modifies: AH, BX, CX, DX.
         
=-----------------------------------------------------------------------------
= * AH = 81h        Unlock Card Port
=-----------------------------------------------------------------------------
    This function unlocks a card port which has been previously locked by
    function 80h. Prior to unlocking, all the mapped pages of the port
    must be unmapped.

    This function is intended to be used by the XIP loader's exit processing
    so that the card port will be available for use by other programs.
         
    Input:  AH = 81h.
            DX = port number to unlock.
         
    Output: AH = Return status.
                00h = Success.
                A0h = Invalid port number.
                A1h = Port not locked.
                A3h = Port has mapped pages.
         
    Errors: As given in AH.
         
    Modifies: AH
         
=-----------------------------------------------------------------------------
= * AH = 82h        Map/Unmap Card Port Pages
=-----------------------------------------------------------------------------
    This function maps a logical page from a plug-in card memory into the
    physical address page frames. This function operates on 16-KB
    pages when requested to map into physical pages 0, 1, 2, or 3, and
    operates on 64-KB pages when requested to map into physical pages 4 or 8.

    For physical page numbers 4 and 8, the logical page number must be a
    multiple of 4 so that the logical page starts on a 64-KB boundary. In
    this case four consecutive logical pages are mapped into the C or D bank
    corresponding to physical pages 4 or 8, respectively.

    This function can also unmap physical pages, which makes the previously
    mapped logical pages inaccessible for reading or writing. You unmap a
    physical page by setting its associated logical page to FFFFh.

    This function is intended to be used by the XIP loader to map XIP code and
    data into CPU address space for execution. It is subsequently used to
    unmap card pages prior to unlocking a port.
                 
    Input:  AH = 82h.
            AL = Physical page number, 0, 1, 2, 3, 4, or 8
            BX = Logical page number.
            DX = Port number.
          
    Output: AH = Return Status.
                00h = Success.
                8Ah = Invalid logical page number.
                      (Physical page is 4 or 8, but logical page is not a
                       multiple of 4).
                8Bh = Invalid physical page number.
                A0h = Invalid port number.
                A1h = Port not locked.
          
    Errors: As given in AH.
                 
    Modifies: AH
                 
=-----------------------------------------------------------------------------
= * AH = 83h        Get/Set Page Map
=-----------------------------------------------------------------------------
    This function is composed of four subfunctions which perform general
    saving and restoring of the page mapping state. The state is saved to
    or restored from a save array provided in the calling program. One of
    these subfunctions is used to determine the required length for the array.

    These functions are intended to be used to save or restore the HP 95LX's
    page-map state as a unit; the internal representation of the page map
    state should not be manipulated.

=-----------------------------------------------------------------------------
= * AX = 8300h      Get Page Map Subfunction
=-----------------------------------------------------------------------------
    Input:  AX = 8300h
            ES:DI = pointer to destination save array.
         
    Output: AH = Return Status.
            00h = Success.
         
    Modifies: AH

=-----------------------------------------------------------------------------
= * AX = 8301h      Set Page Map Subfunction
=-----------------------------------------------------------------------------
    Input:  AX = 8301h
            DS:SI = pointer to source save array.
         
    Output: AH = Return Status.
            00h = Success.
         
    Modifies:  AH
         
=-----------------------------------------------------------------------------
= * AX = 8302       Get and Set Page Map Subfunction
=-----------------------------------------------------------------------------
    Input:  AX = 8302h
            ES:DI = pointer to destination save array.
            DS:SI = pointer to source save array.
         
    Output: AH = Return Status.
            00h = Success.
         
    Modifies: AH
         
=-----------------------------------------------------------------------------
= * AX = 8303       Get Size of Page Map Save Array Subfunction
=-----------------------------------------------------------------------------
    Input:  AX = 8303h.
         
    Output: AH = Return Status.
            00h = Success.
            AL = Save array size in bytes.
         
    Modifies: AH

==============================================================================

===== COMPATIBILITY ISSUES =====

BIOS SPECIAL COMPATIBLE SUBROUTINE
----------------------------------

To be compatibile with the Industry Standard, the following code fragment must
be present at the address indicated:

    ; This subroutine must be placed here for compatibility.

    F000:E00D 204942    AND [BX+DI+42],CL   ; a subroutine. right.
    F000:E010 4D        DEC BP 
    F000:E011 C3        RET        

    F000:E00D DB        20h, 49h, 42h, 4Dh  ; " IBM" (reality)


COMPATIBILITY ADDRESSES
-----------------------

The following table shows the compatible entry points and data-table addresses
that the HP 95LX BIOS supports: 

Int     Rom Entry   Type    Function        
---     ---------   ----    --------------------------------------------------
        F000:E05B   code    Reset.
02      F000:E2C3   code    ||Nonmaskable Interrupt.
19      F000:E6F2   code    Boot.
-       F000:E729   data    Baud rate divisor table.
14      F000:E739   code    Serial.
16      F000:E82E   code    Keyboard.
09      F000:E987   code    Keyboard interrupt service routine.
13      F000:EC59   code    Disk.
0E      F000:EF57   code    Disk int svc routine (Not used in the HP 95LX).
-       F000:EFC7   data    Disk parameter table (Not found in the HP 95LX).
17      F000:EFD2   code    Printer.
10      F000:F065   code    Video.
1D      F000:F0A4   code    Video parameter table.
12      F000:F841   code    Memory size.
11      F000:F84D   code    Equipment check.
15      F000:F859   code    System functions.
-       F000:FA6E   data    Character table (lower 128 chars only).
1A      F000:FE6E   code    Time and date.
08      F000:FEA5   code    Timer interrupt service routine.
-       F000:FEF3   data    Interrupt Vector Table.
-       F000:FF23   data    Default Interrupt handler. Handles interrupts not
                            specifically handled by the BIOS.
-       F000:FF53   data    Dummy IRET.
05      F000:FF54   code    Print screen.
-       F000:FFF0   code    Hardware reset point.
-       F000:FFF5   data    BIOS date stamp.
-       F000:FFFE   data    Hardware ID byte.


===== BIOS MESSAGES =====

The following is a list of messages displayed by the HP 95LX BIOS. Most
messages will be localized (translated to foriegn languages), but a few
messages will not be localized.


MESSAGES THAT WILL BE LOCALIZED:
--------------------------------

CR,LF,"RAM Disk Corrupted"

CR,LF,"Initialize RAM Disk?  Enter Y or N: "

CR,LF,"Initializing RAM Disk",CR,LF

" MAIN BATTERY LOW "        

" BACKUP BATTERY LOW "

" CARD BATTERY LOW "        

"Exiting Backup Mode",CR,LF

CR,LF,"Card changed in locked port."

CR,LF,"No stack for NMI."

CR,LF,"Press any key to warm start ..."

CR,LF,"All files on drive C: will be erased!"

CR,LF,"Continue?  Enter Y or N:"


MESSAGES THAT WILL NOT BE LOCALIZED:
------------------------------------

"(C)Copyright Lotus Development Corp 1990",cr,lf

"(C)Copyright Hewlett-Packard 1990",cr,lf

"Copyright 1984,1985",cr,lf,

"    Phoenix Software Associates Ltd",CR,LF

"Version @.QA.02",CR,LF
