Section 1 Index Section 3

2.0 Firmware

This section describes the Amstrad PC1640 Resident Operating System (ROS) and the Internal Graphics Adapter (IGA) ROM BIOS. It defines the interfaces to all the interrupt service routines provided by the Amstrad PC1640 ROS firmware (ROM) and all RAM locations used by the ROS.

The following copyright message is stored at the beginning of the ROS starting at location 0003 (relative to its origin at FC000):

(C) Copyright 1987 AMSTRAD plc

The ROS physically occupies the highest 16K bytes (in the address range FC000 to FFFFF) in the 1 Mega Byte addressing range of the 8086-2 CPU (See Figure 1.1). The total 64K byte address range from hexadecimal F0000 to FFFFF is reserved for system ROM and this contains the reset and initialization address FFFF0. The PC1640 address decoding for the system ROM area is such that the ROS ROM which actually resides at FC000 is repeated four times in the address space starting at F0000.

Note that all address constants in this document are in hexadecimal form unless otherwise noted.

All calls to the ROS and IGA BIOS firmware should be made through the software interrupts disclosed in this manual. Application programs must not attempt to access the locations within the ROM area directly. Amstrad reserves the right to modify the coding within the Resident Operating System ROM and the IGA BIOS ROM as it sees fit.

The firmware provides a set of resident software routines which perform various services and I/O functions:

  1. Power-Up initialization and Self Test.
  2. Keyboard input.
  3. Video display of characters and pixels.
  4. Video buffer screen dumping.
  5. Character I/O to the printer and serial ports.
  6. System clock and real time clock support.
  7. Floppy Disk I/O including format, read and write.

To ensure hardware independence of application programs all I/O processes should be done using the ROM firmware software interrupts. This avoids possible problems due to any hardware modifications and/or enhancements.

2.1 Power-Up initialization and Self Test

The Power-Up initialization and Self Test function is entered at location FFFF0, the CPU reset entry point. This is a collection of routines which perform all necessary hardware initialization and self tests, setting up of the BIOS RAM variable area, initialization all the interrupt locations used by the ROS, initialization of expansion slot peripheral ROMs and the running of floppy diskette or hard disk bootstrap.

The ROS does not use the System RAM (User RAM Area) for stack or program variables until it has been successfully tested. If a RAM error is found an error message should be displayed correctly, assuming there is no other fault that may result in incorrect operation of the CPU or Video Circuitry.

The Power-Up initialization and Self Test process proceeds as follows:

  1. Disable maskable and non-maskable interrupts.
  2. Run self test which include the following:

    After a system reset all the self tests except the RAM tests are rerun. If the three option links in the least significant part of the system printer status register are set to all ones then diagnostic mode is selected and if the diagnostic test ROM pack is found, it is entered, otherwise only the keyboard and disk tests are run before external ROM initialization and system startup is attempted.

    Refer to section 2.2 for the individual power-up self test details.

3. Checksum the NVR.

If the checksum of the NVR is incorrect then it is loaded with its default values (See page 169).

4. Initialise the 8253 Programmable Interval Timer.

Set up counter 0 to interrupt every 54.9337 milliseconds. Set up counter 1 to generate an output signal with a period of 15.13 microseconds. Disable counter 2.

5. Initialise the 8237 DMA controller.

Set up DMA channel 0 for memory refresh. Disable channel 1, 2 and 6.

6. Initialise the 8259 Programmable Interrupt Controller.

Disable (mask) all interrupt levels. Note that levels 0, 1 and 3 are enabled (unmasked) later.

7. Initialise the Write Status Registers.

Write Status-1 is initialised from a byte in the NVR defining the number of drives fitted and the default Video Mode. The ROS also sets or resets bit 1 in the status register depending on whether or not an 8087 NDP is installed. See section 1.8 for further System Status-1 information.

Write Status-2 is initialised according to the amount of memory installed. The ROS assumes a minimum of 512K bytes and that additional RAM may be added in contiguous 32k byte increments up to the maximum of 640K bytes. The additional memory is sized according to the following procedure. The segment address of each of the four 32K byte RAM blocks is written to the first two bytes of each respective block. The segments are then verified from low to high until a non matching segment address or the last block is encountered. The setting of the Write Status-2 register is according to the RAM0-RAM4 table in section 1.8.3.

8. Initialise the ROS variable area in system RAM.

The ROS uses variables in the address range of 00300 to 00500. Refer to section 2.4 (RAM Variables) for a complete description of these variables and their respective initialised values.

9. Initialise the first 32 Interrupt Vectors.

The first 32 interrupt vectors are set up to reference the ROS routines as listed below. Software interrupt routines which do not perform any function reference a dummy routine that simply does a return from interrupt (IRET) instruction. Hardware service interrupts which do not perform any function reference a dummy (HWIRET) routine which issues a nonspecific end-of-interrupt to the 8259 interrupt controller and then executes an IRET instruction.

InterruptPurposeType
0Divide by ZeroHardware (HWIRET)
1Single StepHardware (HWIRET)
2Parity error routine (NMI)Hardware
3BreakHardware (HWIRET)
4OverflowHardware (HWIRET)
5Print ScreenSoftware
6ReservedSoftware
7ReservedSoftware
8System Clock interruptHardware
9Keyboard interruptHardware
10RTC interruptHardware (HWIRET)
11COMMSHardware (HWIRET)
12COMMSHardware (HWIRET)
13Hard DiskHardware (HWIRET)
14Floppy Disk interrupt routineHardware
15Printer interruptHardware (HWIRET)
16Video I/OSoftware
17System ConfigurationSoftware
18Memory SizeSoftware
19Disk I/OSoftware
20Serial I/OSoftware
21Enhanced function(s)Software
22Keyboard I/OSoftware
23Printer I/OSoftware
24System RestartSoftware
25Disk BootstrapSoftware
26System Clock and RTC I/OSoftware
27Keyboard BreakSoftware (IRET)
28External Ticker interruptSoftware (IRET)
29Video parameter tableSoftware Vector
30Disk Parameter tableSoftware Vector
31 External 8x8 Char Matrix table Software Vector

The interfaces to the above routines are detailed in section 2.3.

The 8259 PIC is programmed such that its IRQ0 - IRQ7 interrupt levels use CPU interrupt vectors 8 - 15 as indicated in the above table.

10. Initialise and Test the Disk interface.

The initialise function of interrupt 19 in invoked followed by the disk test (see 2.2.12).

11. Keyboard Self Test.

The Keyboard microcontroller returns 0AAh upon successful completion of its power-up self test (See 2.2.15).

12. Initialise the Video Display.

The initial video testing is done by IGA BIOS ROM if it is enabled else the ROS performs testing as described in section 1.8.2

13. Initialise the 8259 Interrupt controller.

Enable 8259 interrupt controller on levels 0 (8253 counter 0), 1 (keyboard scan code receiver) and 6 (765 floppy disk controller). All other 8259 interrupt levels are masked.

14. Display the ROS sign-on message.

During power-up the ROS checksums the NVR. After the sign-on message has been displayed, the ROS outputs a warning message if the NVR sum was incorrect. In the case that the NVR is OK (and last startup data are valid) the time and date of last switch-on are displayed.

15. Enable the NMI.

If a NMI occurs the default ROS interrupt handler displays a RAM parity error message and hangs the system. This condition can only be rectified by switching the machine off.

16. Initialise all external ROMs.

The ROS checks for external ROMs between addresses C0000 and F4000 in 800h (2k) byte increments. An external ROM which conforms to the following specification will be initialised by the ROS:

  1. The first two bytes contain the hexadecimal value 55AA.
  2. The next two bytes contain the size in 512 (1/2K) byte increments.
  3. The next byte is the initialization routine entry point.
  4. The LS byte of the byte sum of the ROM is zero.

When a ROM conforming to this specification is located then the initialization entry is called.

If the checksum test fails then an error message is displayed and initialization is not called.

The IGA BIOS ROM conforms to above standard and if it is enabled, it is entered (at C0000) and its Power-On Self Test (POST) initialisation will perform testing and initialise:

17. Diskette Bootstrap.

The ROS attempts to load the bootstrap sector (from drive A, side 0, track 0, sector 1) into memory at 07C00h. If the bootstrap sector loads successfully it is given control (far jump to segment 0000 offset 7C00). If after 10 retrys the bootstrap sector cannot be loaded then the ROS displays a message prompting the user to insert a system disk into drive A and press a key. The ROS then waits for the key press and repeats the bootstrap procedure.

2.2 Power-Up Self Tests

On Power-Up or following a system reset, the ROS performs a series of self tests on the hardware to verify proper operation. When a test failure occurs, the ROS displays an error message on the primary display device and the system is locked up. The keyboard interface is treated differently in that the ROS repeats keyboard self test until it is successful.

The ROS executes all self tests except when the option links (LK1 - LK3) are all set (See section 1.10.3), the ROS will only run the keyboard interface test and the disk test. If either of these two tests fail an error message is displayed but the error is ignored. This allows the system to be brought up for diagnostic testing.

When a soft reset (Control, Alt and Del) is issued the ROS performs all the self tests except the system RAM (User Area RAM) test and the video RAM test. The program calling the ROS initialization after a soft reset must store the value 1234h in system location 0:478h and this value notifies the ROS firmware that a soft reset was requested. When the 1234h value is recognized a full hardware reset is performed and this will reset all external peripheral cards in the expansion bus. A special entry flag value, 1235h performs the ROS Power-Up testing as described above but inhibits the full hardware reset from occurring. The ROS sets the contents of the word location at 0:488 to 1234h when it completes its testing.

2.2.1 Test Procedure.

Upon entry the ROS performs the necessary functions to start video output from the IGA or any other primary display adapter, and then stores the message ("Please wait") on the first line of the screen to indicate that self testing is in progress and as each successive self test is started a dot is displayed on the screen.

The tests are run in the following order:

  1. ROS checksum test.
  2. Direct Memory Access (8237) Controller test.
  3. Programmable Interval timer (8253) test.
  4. Programmable Peripheral Interface (8255) test.
  5. Real Time Clock (HD146818) test.
  6. Asynchronous Communications Element (8250) test.
  7. Parallel Printer Port test.
  8. Mouse X and Y count register test.
  9. System RAM test.
  10. Programmable Interrupt Controller (8259) test.
  11. Disk test.
  12. Keyboard Interface test.

The ROS uses the stack during the Disk test, the Keyboard interface test and the Programmable Interrupt Controller test. All other self tests are executed without using either the stack or any RAM variables.

2.2.2 Test Methods.

Most of the device diagnostic tests consist of a Data Path test and a Waveform test as described below:

Data Path test.

The data path test checks the read/write path between the CPU and a particular device. A pattern is written to a device and then read back to verify the integrity of the data path. The patterns are as follows:

All zeros.
All ones.
Sliding single bit and complement across 8 bits.

Waveform test.

The waveform test detects address decoding errors in a hardware device. The waveform test consists of selecting a specific address in a device, writing a test pattern (usually 0FFFFh) and verifying that the same pattern can be read back. The waveform test is done in both ascending sequential order (upwards) and descending sequential order (downwards) in order to check that the address decoding logic works correctly.

2.2.3 ROS Checksum Test.

All bytes in the Resident Operating System ROM are summed and then checked that the least significant byte of the sum is zero. If the check fails then an error message indicating faulty ROM checksum is displayed.

2.2.4 Direct Memory Access Controller test.

The upwards/downwards waveform test is used to confirm that the registers in the DMA controller chip can be addressed. Any failure will cause the faulty DMA error message to be displayed.

2.2.5 Programmable Interval Timer test.

The fiest 8253 test is a read/write data path test to counter 2 followed by a check that counter 1 counts at the correct rate. If either test fails an interval timer error message is displayed.

2.2.6 Programmable Peripheral Interface test.

The 8255 PPI tests consists of a data path test on each of the two system status channels (Status-1 and Status-2). The 8253 PIT OUT2 (Status-2) bit is also checked for proper operation. If either test fails the faulty real time clock error message is displayed.

2.2.7 Real Time Clock test.

The RTC seconds counter is tested to be counting at the correct rate. Next a data path test on the checksum byte of the NVR is run (and the checksum byte is restored). If either test fails the faulty real time clock error message is displayed.

2.2.8 Asyncronous Communications Element test.

This test confirms that the transmitter and receiver of the 8250 (i. e. the system serial port) are functioning correctly (at least in diagnostic mode).

The 8250 is configured in loop mode, 9600 baud, 8 data bits, 1 stop bit and no parity. Two test patterns are transmitted and the received patterns are checked. The status register is monitored for no parity, framing or overrun errors. If either received pattern does not equal the sent pattern or an error is set in the status register the faulty system serial port error message is displayed.

2.2.9 Printer Parallel Port test.

A data path test is performed on the printer data latch. If any incorrect test pattern is returned, the faulty printer port error message is displayed.

2.2.10 Mouse X and Y Count Register test.

The X and Y registers are cleared and then read to verify that they both contain zero. If the test fails the faulty mouse coordinate register error message is displayed.

2.2.11 System RAM test.

The amount of System (User Area) RAM is determined using the procedure described in section 2.1 (This should always produce 640K as the answer). The data path test is run on all available RAM followed by an upwards/downwards waveform test. If either test fails the faulty RAM error message is displayed.

2.2.12 Programmable Interrupt Controller test.

The 8259 tests consist of a data path test on the interrupt mask register and an interrupt acknowledge test to confirm that interrupts can occur and be serviced. If the test fails the faulty interrupt controller message is displayed.

2.2.13 Disk test.

The disk test attempts to establish whether the drives fitted to the system seek correctly. The test moves the read/write heads to track 10 on each drive. The ROS does not verify that the correct track was attained. If any errors are reported then a floppy disk controller error message is displayed.

2.2.14 Keyboard Interface test.

Upon power-up or reset, the keyboard self test is performed by the keyboard controller firmware. The keyboard returns keycode 0AAh to signify the successful completion of its testing. If any key code other than 0AAh is returned the keyboard error message is displayed amd keyboard reset is issued (which reruns the keyboard self test). The Keyboard test is repeated until the keyboard test passes. When test pass is received, the error message is removed from the screen and the test is exited as normal. During the keyboard test a short beep is sounded every five seconds to indicate that the test is in progress.

2.3 ROM Firmware Interrupts.

The first 32 interrupt vectors are initialised by Power-Up initialization. The software IRET and hardware HWIRET entries are dummy routines which require no entry or exit conditions and are not detailed here.

Any application program which replaces a default interrupt vector with its own entry point must not invoke any ROS interrupts from within its own interrupt service routine.

2.3.1 Interrupt 2: Parity Error (NMI).

The Interrupt 2 routine deals with system RAM parity error. The screen is switched to the default display mode, cleared and a RAM parity error message is displayed. The machine cannot be used until the power switch is cycled off and on again.

This routine does not use RAM for stack or program variables.

An application program which makes use of the 8087 NDP must supply an interrupt 2 service routine for the 8087 NDP.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
Doesn't exist.

2.3.2 Interrupt 5: Print Screen.

The Interrupt 5 routine dumps the screen in character mode to the primary printer port. Since the screen dump is character based, attempting to dump graphic pictures to the printer may produce incorrect results. Characters that cannot be read back from the screen in graphics mode (using the video interrupt 16 read character function) are printed as spaces.

If a screen print is already in progress the interrupt takes no action.

The Print Screen Status variable (at address 00500) is set to 1 while the screen dump is in progress. When complete the variable is set to zero. If the screen dump is abandoned due to printer port timeout, the variable is set to 255.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
All flags and registers preserved.

2.3.3 Interrupt 6: Mouse Button Control.

The ROS interrupt 6 routine provides default mouse button services. The keyboard firmware generates a set of make/break keycodes when either of the two mouse buttons is pressed and released. When the keyboard interrupt routine recognizes a mosue button keycode it invokes interrupt 6. The default ROS routine will either obtain the appropriate keycode from the NVR and return with the carry flag set in the case of a make code or return with the carry flag clear in response to a mouse button break code.

CPU registers are used as follows:

Entry:
Register AL = Mouse Key Code
Bit 0 specifies which mouse button: Bit 7 specifies whether make or break:
Exit:
Carry Flag & Register Ax specify action:
Carry SET:
Insert a key token into the keyboard buffer.
AX = Key Token to be inserted.
Carry CLEAR:
No action to be taken.
AX is corrupt.
All other flags corrupt. (also BX, CX & DX may be corrupt.)
All other registers preserved.

Note: A key token value of FFFFh is ignored and is not put in the keyboard buffer.

2.3.4 Interrupt 8: System Clock Interrupt.

The interrupt 8 routine is invoked by the system clock (counter 0 of the 8253). The default ROS routine does the following:

  1. Increment the 32-bit system clock count held in RAM (location 0046C). If the clock reaches the 24 hour time (0001855000h) then the count is reset to zero and the 24 hour flag (location 00470) is set to 0FFh.
  2. If the least significant byte of the system clock count is zero then the current time and date in the real time clock (RTC) is copied to the NVR. The time that is last copied from the RTC before the machine is switched off is displayed when the machine is next switched on.
  3. If the disk motor timeout count is not zero then it is decremented by one. If the count reaches zero all the drive motors are turned off.
  4. Invoke interrupt 28. Application programs that want to be interrupted by the system clock should use interrupt 28.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
All flags and registers preserved.

2.3.5 Interrupt 9: Keyboard Interrupt.

The ROS Keyboard hardware interrupt reads a key code from the keyboard interface, translates the key code into a 16-bit key token using an internal translation table and the key token is put into the key token buffer. If the buffer is full the key token is discarded and a bleep is output on the speaker. The key tokenization for the most part consists of the high byte being the key number and the lower byte being the ASCII for the keycap. Those keys for which there is no ASCII equivalent the token consists of a unique high byte value with the low byte cleared.

Entry:
No conditions.
Exit:
All flags and registers preserved.

The ROS Keycode translation table is as follows (all values are hexadecimal) and the key names are the USA versions:

Key Code Key Cap (US) Normal Num Lock ALT CTRL SHIFT
01ESC 011B 01F0 011B 011B N/A
021 and ! 0231 7800 Ignored0221 N/A
032 and @ 0332 7900 0300 0340 N/A
043 and # 0433 7A00 Ignored0423 N/A
054 and $ 0534 7B00 Ignored0524 N/A
065 and % 0635 7C00 Ignored0625 N/A
076 and ^ 0736 7D00 071E 075E N/A
087 and & 0837 7E00 Ignored0826 N/A
098 and * 0938 7F00 Ignored092A N/A
OA9 and ( 0A39 8000 Ignored0A28 N/A
0B0 and ) 0B30 8100 Ignored0B29 N/A
0C- and _ 0C2D 8200 0C1F 0C5F N/A
0D= and + 0D3D 8300 Ignored0D2B N/A
0E<-Del 0E08 0EF0 0E7F 0E08 N/A
0FTab 0F09 A500 9400 0F00 N/A
10Q 1071 1000 1011 1051 N/A
11W 1177 1100 1117 1157 N/A
12E 1265 1200 1205 1245 N/A
13R 1372 1300 1312 1352 N/A
14T 1474 1400 1414 1454 N/A
15Y 1579 1500 1519 1559 N/A
16U 1675 1600 1615 1655 N/A
17I 1769 17000 1709 1749 N/A
18O 186F 1800 180F 184F N/A
19P 1970 1900 1910 1950 N/A
1A[ and { 1A5B 1AF0 1A1B 1A7B N/A
1B] and } 1B5D 1BF0 1B1D 1B7D N/A
1CReturn Key 1C0D 1CF0 1C0A 1C0D N/A
1DCtrl IgnoredIgnored---- IgnoredN/A
1EA 1E61 1E00 1E01 1E41 N/A
1FS 1F73 1F00 1F13 1F53 N/A
20D 2064 2000 2004 2044 N/A
21F 2166 2100 2106 2146 N/A
22G 2267 2200 2207 2247 N/A
23H 2368 2300 2308 2348 N/A
24J 246A 2400 240A 244A N/A
25K 256B 2500 250B 254B N/A
26L 266C 2600 260C 264C N/A
27; and : 273B 27F0 Ignored273A N/A
28' and " 2827 28F0 Ignored2822 N/A
29# and ~ 2960 29F0 Ignored297E N/A
2ALeft Shift IgnoredIgnoredIgnoredIgnoredN/A
2B\ and | 2B5C 2BF0 2B1C 2B7C N/A
2CZ 2C7A 2C00 2C1A 2C5A N/A
2DX 2D78 2D00 2D18 2D58 N/A
2EC 2E63 2E00 2E03 2E43 N/A
2FV 2F76 2F00 2F16 2F56 N/A
30B 3062 3000 3002 3042 N/A
31N 316E 3100 310E 314E N/A
32M 326D 3200 320D 324D N/A
33, and < 332C 33F0 Ignored333C N/A
34. and > 342E 34F0 Ignored343E N/A
35/ and ? 352F 35F0 Ignored353F N/A
36Right Shift IgnoredIgnoredIgnored---- N/A
* 37* 372A 37F0 9600 372A N/A
38Alt Ignored---- IgnoredIgnoredN/A
39Space Bar 3920 3920 3920 3920 N/A
* 3ACaps Lock IgnoredIgnoredIgnoredIgnoredN/A
3BF1 3B00 6800 5E00 5400 N/A
3CF2 3C00 6900 5F00 5500 N/A
3DF3 3D00 6A00 6000 5600 N/A
3EF4 3E00 6B00 6100 5700 N/A
3FF5 3F00 6C00 6200 5800 N/A
40F6 4000 6D00 6300 5900 N/A
41F7 4100 6E00 6400 5A00 N/A
42F8 4200 6F00 6500 5B00 N/A
43F9 4300 7000 6600 5C00 N/A
44F10 4400 7100 6700 5D00 N/A
* 45Num Lock IgnoredIgnoredPAUSE IgnoredN/A
* 46Scroll Lock IgnoredIgnoredIgnoredIgnoredN/A
47Key Pad 7 4700 Ignored7700 N/A 4737
48Key Pad 8 4800 IgnoredIgnoredN/A 4838
49Key Pad 9 4900 Ignored8400 N/A 4939
4AKey Pad - 4A2D IgnoredIgnoredN/A 4A2D
4BKey Pad 4 4B00 Ignored7300 N/A 4B34
4CKey Pad 5 IgnoredIgnoredIgnoredN/A 4C35
4DKey Pad 6 4D00 Ignored7400 N/A 4D36
4EKey Pad + 4E2B IgnoredIgnoredN/A 4E2B
4FKey Pad 1 4F00 Ignored7500 N/A 4F31
50Key Pad 2 5000 IgnoredIgnoredN/A 5032
51Key Pad 3 5100 Ignored7600 N/A 5133
* 52Key Pad 0 5200 IgnoredIgnoredN/A 5230
53Key Pad . 5300 IgnoredIgnoredN/A 532E
54 - 6FUndefined IgnoredIgnoredIgnoredIgnoredIgnored
* 70Del -> N/A N/A N/A N/A N/A
71 - 73Undefined IgnoredIgnoredIgnoredIgnoredIgnored
* 74Enter N/A N/A N/A N/A N/A
75 - 76Undefined IgnoredIgnoredIgnoredIgnoredIgnored
* 77Joy Fire2 N/A N/A N/A N/A N/A
* 78Joy Fire1 N/A N/A N/A N/A N/A
* 79Joy Right 4D00 4D00 4D00 4D00 4D00
* 7AJoy Left 4B00 4B00 4B00 4B00 4B00
* 7BJoy Down 5000 5000 5000 5000 5000
* 7CJoy Up 4800 4800 4800 4800 4800
* 7DMouse M2 N/A N/A N/A N/A N/A
* 7EMouse M1 N/A N/A N/A N/A N/A
7FUndefined IgnoredIgnored IgnoredIgnoredIgnored

Joystick keys produce their respective cursor keys.

Key codes marked with '*' cause special actions as explained below.

The table positions marked 'Ignored' are physically marked in the table by a value with the MS bit set and this causes the keyboard processor to ignore these keystroke combinations.

2.3.5.1 Special Key Actions.

Some keys or set of keys invoke a special action as detailed below. Unless otherwise stated they do not result in any key tokens being inserted into the buffer.

1. [Ctrl]+[Alt]+[Del]: Reset.
When reset is detected, a system hardware reset is issued. The power-up initialisation process is entered but System RAM and video RAM tests are not run.
2. [Ctrl]+[Nun Lock]: Pause.
The ROS waits for another key to be pressed (except [Ctrl]+[Num Lock]), thus suspending any application that is running. Since the keyboard firmware lights the light on the Num Lock key the ROS toggles the Num Lock flag so that the system ROS and the keyboard firmware are in step with each other. Note that programs such as KEYBUK do not perform this extra function so there may be some confusion in these cases.
3. [Ctrl]+[Scroll Lock]: Break.
When break is detected, interrupt 27 is invoked and the keyboard buffer is cleared. Key token 0000h is then inserted into the buffer.
4. [Shift] + [PrtSc]: Print Screen.
When print screeen is detected interrupt 5 is invoked, the ROS print screen function. If this entry point is maintained screen dump will continue to work. Some operating systems such as CP/M and Dos Plus install a nul pointer here.
5. [Ins]: Insert Toggle.
Each time the Ins key (keycode 52) is received, except in Num Lock mode, the Ins key toggle bit (bit 7 of RAM location 0:417) is inverted.
6. [Scroll Lock]: Scroll Toggle.
Each time the Scroll Lock key is pressed the scroll key toggle bit (bit 4 of RAM location 0:417) is inverted. Note that Ctrl - Scroll Lock (break) does not flip the scroll toggle.
7. [Caps Lock]: Caps Lock Toggle.
Each time the Caps Lock key is pressed the Caps Lock toggle bit (bit 6 of RAM location 0:417) is inverted.
8. [Num Lock]: Num Lock Toggle.
Each time the NUM LOCK key is pressed the Num Lock toggle bit (bit 5 of RAM location 0:417) is inverted.
9. [Alt]+[Numeric Key Pad 0 to 9]: Absolute Key Token.
When the [Alt] key is held down, an absolute key token may be entered via the numeric keypad. Pressing any other key resets the absolute key token to zero (and inserts the associated Alt-key token for the key pressed). When [ALT] is released the absolute key token modulo 256 is placed into the keyboard buffer, unless the token is zero, in which case it is discarded.
10. [Enter] and Fire Buttons.
When the Enter key code (74) or one of the two Joystick Fire button key codes (78 or 79) is received an associated key token is obtained from the NVR and inserted into the key token buffer.
11. Mouse buttons.
The keyboard firmware generates four key codes to indicate when the two mouse buttons are pressed or released. When the ROS receives one of these codes from the keyboard it does a far call to the address held in the Mouse Button interrupt vector (Interrupt 6). A default ROS routine is loaded into this vector upon power-up or system reset. This routine requests the ROS to insert a key token held in the NVR into the keyboard buffer, the token used depends on which mouse button (M1 or M2) is received. The mouse button release codes are ignored.
12. [Del ->]: Forward Delete.
When the forward delete key code (code 70) is received a key token is obtained from the NVR and placed in the key token buffer.
13 [Alt], [Ctrl], [Shift], [Caps Lock] & [Num Lock].

The translation of various key codes into their respective tokens is affected by the current states of these keys (which is stored in location 00417). The Shift key, while pressed, reverses the current state of the CAPS LOCK and Num Lock. If more than one of Alt, Ctrl, Shift, Num Lock or CAPS LOCK is active at one time then the order of precedence for key code translation is Alt, then Ctrl, then Shift, then Caps Lock or Num Lock.

Caps Lock, when active, converts the key tokens for the lower case alphabetic keys (a - z) to their upper case counterparts.

Note that some operating systems (such as DOS Plus) install their own entry points into the interrupt vectors and these interrupt routines may exhibit different characteristics than those of the ROS routines described here.

2.3.6 Interrupt 14: Floppy Disk Controller.

The ROS service routine for interrupt 14 sets bit 7 of the RAM DRIVE RESTORE FLAG, to indicate that the Floppy Disk Controller interrupt has occurred.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
All flags and registers preserved.

2.3.7 Interrupt 16: '6845 Compatible' Video I/O (int 10h).

The ROS interrupt 16 service routine provides a set of routines for reading and writing characters in alpha and graphics mode. In graphics mode the characters are constructed using a character matrix table (see section 2.3.21). It also provides facilities for scrolling the screen up or down, reading and writing pixels (CGA graphics only) and reading the light pen.

It is important to note that this interrupt entry point is only active in '6845 Compatible' modes or when an external CGA or MDA or Hercules display adapter is active and the IGA ROM BIOS is not involved. The EGA emulation mode compatible calls are covered in section 2.3.8. It should be noted that the Int 16 call registers are much the same for the video mode calls and video character and string display. This is because the EGA compatible mode which was implemented later is designed to be software compatible with the earlier (this entry point's) call register setups. When the '6845 compatible' display modes are entered either as a result of the sw5 setting (ON) or by the DISPLAY utility program, the video int 16 vector (at 0:40h) is set to point to the ROS's video interrupt's fixed entry point (at F000:F065) and this set of service routines becomes active. Additional hardware setups must also be performed within the IGA to support the 6845 compatibility.

CPU registers for '6845 Compatible' Video Int 16 are used as follows:

Entry:
AH = Function Selector as follows:

All other registers as required by the function.

Exit:

If selector is greater than 15 then carry is set, else carry is clear.

All other flags and registers as specified by the function.

Alpha modes 0 and 1 require 2000 bytes of video RAM while alpha modes 2 and 3 require 4000 bytes of the video RAM. The ROS takes advantage of all the video RAM available in alpha modes by supporting multiple display pages. This means that application programs can set up a number of display pages and switch them as required.

In general parameters passed to ROS routines are not checked and care should be taken when choosing unusual parameters as unexpected results may occur. In particular be careful of boundary conditions such as setting the top of the display window equal to the bottom of the display window (for functions 6 and 7) effectively creating a one line display. In this instance the screen scrolling may not perform as expected.

ROS Video Int 16 Function 0: Set Video Mode.

CPU registers are used as follows:

Entry:
AH = 0
AL = Mode Selector as follows:

0 - Alpha 25 Rows by 40 Columns.
1 - Same as Mode 0.
2 - Alpha 25 Rows by 80 Columns.
3 - Same as mode 2.
4 - Graphics 200 pixels by 320 pixels using palette 1.
5 - Graphics 200 pixels by 320 pixels using palette 2.
6 - Graphics 200 pixels by 640 pixels - 2 colors.
7 - Alpha 25 Rows by 80 Columns using Monochrome Adapter.
Exit:
All flags and registers preserved.

In mode 4 palette 0 may be selected by writing the color select register using Video Int 16 Function 11. The definition of the palettes is contained in Section 1.11.2.2, Low Resolution (320x200) Graphics.

When mode 5 is selected it must be followed by a selection of palette zero (Color select register - See 1.11.5.2) in order to enable palette 2.

If the default display mode indicates an external monochrome adapter, then mode 7 is selected regardless of the mode in AL.

To select the Video mode the ROS does the following:

  1. Disable video output.
  2. Reset the Cursor Addresses for all pages to row 0 column 0.
  3. Output the mode to the Mode select register (3B8/3D8).
  4. Reload the 6845 CRTC registers from the Video Parameter table (which is supplied by interrupt 31).
  5. Clear the video RAM. If an alpha mode is selected, the video RAM is filled with white space, i.e. ASCII space (020h) and the default attribute byte held in the NVR. The graphics mode fill is zeros.
  6. If color display then set up the Color Select register (3D9h):

    Set the border color to the default background color.
    In graphics modes set intensified foreground colors.
    In mode 6 (Graphics 640 Mode) set white foreground color.

  7. For text modes select page zero.
  8. Set the cursor size to start cursor from the video parameter table.
  9. Enable video output.

ROS Video Int 16 Function 1: Set Cursor Size.

This function is only relevant in alpha modes as the cursor is not supported in graphics modes. It sets the start and end scan numbers of the cursor.

CPU registers are used as follows:

Entry:
AH = 1
CH = Starting scan of cursor in range 0 to 31.
CL = Ending scan of cursor in range 0 to 31.
Exit:
All flags and registers preserved.

The ROS interprets a start value of 31 with the special meaning "turn the cursor off". In addition the 6845 hardware cursor disable function is enabled when cursor start bit register 5 is set.

ROS Video Int 16 Function 2: Set Cursor Address.

This function sets the current row and column addresses of the cursor in the specified page.

CPU registers are used as follows:

Entry:
AH = 2
BH = Page number for modes 0 to 3.
DH = Cursor Row Address.
DL = Cursor Column Address.
Exit:
All flags and registers preserved.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

ROS Video Int 16 Function 3: Get Cursor Address.

This function returns the current row and column address of the cursor in the specified page.

CPU registers are used as follows:

Entry:
AH = 3
BH = Page number for modes 0 to 3.
Exit:
DH = Cursor Row Address.
DL = Cursor Column Address.
CH = Starting scan of cursor.
CL = Ending scan of cursor.
All flags and other registers preserved.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

ROS Video Int 16 Function 4: Get Light Pen Address.

This function returns the address of the light pen.

CPU registers are used as follows:

Entry:
AH = 4.
Exit:
If Light Pen switch set then If Light Pen switch clear then Always

ROS Video Int 16 Function 5: Set Display Page.

This function sets the active display page.

CPU registers are used as follows:

Entry:
AH = 5.
BH = Page number to be displayed.
Exit:
All flags and registers preserved.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

ROS Video Int 16 Function 6: Scroll Screen Up.

This function scrolls the active display page, or part of the active display page up a specified number of lines.

CPU registers are used as follows:

Entry:
AH = 6.
DH = Bottom Row of area to scroll.
DL = Right most Column of area to scroll.
CH = Top Row of area to scroll.
CL = Left most Column of area to scroll
BH = Attributes for blank lines scrolled onto the bottom of the scroll area.
AL = Number of lines to roll up.
Exit:
All registers preserved.
Carry is clear and all other flags corrupt.

Scrolling always takes effect on the current active display page.

Hardware scrolling is not supported. Scrolling is achieved by copying areas of Video Display RAM.

In graphics modes blank lines are filled with zeros to display the current background color.

Note this function will fail to operate properly if on entry CH equals DH and AL is not zero. This is also true for all other compatible ROM environments.

ROS Video Int 16 Function 7: Scroll Screen down.

This function scrolls the active display page, or part of the active display page down a specified number of lines.

CPU registers are used as follows:

Entry:
AH = 7.
DH = Bottom Row of area to scroll.
DL = Right most Column of area to scroll.
CH = Top Row of area to scroll.
CL = Left most Column of area to scroll
BH = Attributes for blank lines scrolled onto the top of the scroll area.
AL = Number of lines to roll down.
Exit:
All flags and registers preserved.

Scrolling always takes effect on the current active display page.

Hardware scrolling is not supported. Scrolling is achieved by copying areas of Video Display RAM.

Note this function will fail to operate properly if on entry CH equals DH and AL is not zero.

ROS Video Int 16 Function 8: Read Character and Attributes.

This function reads the character and its associated attribute byte at the current cursor address in a specified display page.

In graphics modes, the character pixel data is generated either from an internal character matrix table for characters 0 to 127 or from an external character matrix table for characters 128 to 255, the address of which is held in interrupt vector 31. See 2.3.23 for additional details.

CPU registers are used as follows:

Entry:
AH = 8.
BH = Page to read for alpha modes 0 to 3.
Exit:
AL = Character. (0 if no match found in Graphics Modes).
AH = Attributes byte. (Unchanged in graphics modes).
All flags and registers preserved.

Refer to 1.11.1 and 1.11.2 for the definition of the character attributes bytes.

ROS Video Int 16 Function 9: Write Character and Attributes.

This function writes a character (or a block of the same character) and its associated attribute byte to the current cursor position in a specified display page.

In graphics modes, the character pixel data is generated either from an internal character matrix table for characters 0 to 127 or from an external character matrix table for characters 128 to 255, the address of which is held in interrupt vector 31. See 2.3.23 for additional details.

CPU registers are used as follows:

Entry:
AH = 9.
AL = Character to write.
BH = Page to write for alpha modes 0 to 3.
BL = In alpha modes In graphic modes CX = Repeat Count.
Exit:
All flags and registers preserved.

The repeat count specifies the number of consecutive locations to which the character and attributes are written. In graphics modes all characters must fit on the current line.

In graphics mode if bit 7 of BL is set then the data for the specified character is exclusive ORed with the data already in the display RAM at the cursor address.

ROS Video Int 16 Function 10: Write Character Only.

This function writes a character (or a block of the same character) to the current cursor position in a specified display page. In alpha modes the attribute bytes for all characters written remains unchanged.

In graphics modes, the character pixel data is generated either from an internal character matrix table for characters 0 to 127 or from an external character matrix table for characters 128 to 255, the address of which is held in interrupt vector 31. See 2.3.23 for additional details.

CPU registers are used as follows:

Entry:
AH = 10.
AL = Character to write.
BH = Page to write for alpha modes 0 to 3. BL = In alpha modes In graphic modes CX = Repeat Count.
Exit:
All flags and registers preserved.

The repeat count specifies the number of consecutive locations to which the character is written.

In graphics mode if bit 7 of BL is set then the data for the specified character is exclusive ORed with the data already in the display RAM at the cursor address.

ROS Video Int 16 Function 11: Write Color Select Register.

This function writes the CGA compatible Color Select Register IRGB bits or the Palette select bits.

CPU registers are used as follows:

Entry:
AH = 11.
BH = Function select:
Exit:
All flags and registers preserved.

Changing the palette number (BH non-zero) only has effect in modes 4 and 5 (320 pixel graphics mode). Refer to section 1.11.3 for further details.

ROS Video Int 16 Function 12: Write a Pixel.

This function writes an individual pixel (only valid in graphics modes).

CPU registers are used as follows:

Entry:
AH = 12.
DX = Pixel Row (0 to 199)
CX = Pixel Column (0 to 639)
AL = Write Mode:
Exit:
All flags and registers preserved.

The pixel color specified in AL should be in the range 0 to 3 in modes 4 and 5 (graphics 320 pixel mode) and in the range 0 to 1 for mode 6 (graphics 640 pixel mode).

ROS Video Int 16 Function 13: Read a Pixel.

This function is used for reading an individual pixel (only in graphics modes).

CPU registers are used as follows:

Entry:
AH = 13.
DX = Pixel Row (0 to 199)
CX = Pixel Column (0 to 639)
Exit:
AL = Color of the specified pixel.
All flags and other registers preserved.

ROS Video Int 16 Function 14: Write in TTY Emulation Mode.

This function writes the specified character in Teletype emulation mode at the current cursor address in the active display page.

CPU registers are used as follows:

Entry:
AH = 14.
AL = Character to write.
BL = In alpha modes In graphic modes
Exit:
All flags and registers preserved.

Upon completion of the write the cursor column is incremented by one. If the column address is greater than the line length then the column address is set to zero and the cursor row address is incremented by one.

If the incremented row address is greater than the last visible line then it is decremented to its original value and the entire page is scrolled up one line. In alpha modes the line added to the bottom of the page is cleared to spaces with the attributes the same as the first character in previous line. In graphic modes the bottom line is cleared to zeroes.

The following display characters are executed rather than displayed symbolically:

BEL (07h)
Sounds a short (bleep) tone on the speaker.
BS (08h)
Decrements the cursor column one character position unless the column is already zero in which case it is ignored.
CR (0Dh)
Sets the cursor column address to zero.
LF (0Ah)
Increments the cursor row address by one and follows the scroll up procedure as detailed in the paragraph above.

All other control characters are displayed.

ROS Video Int 16 Function 15: Get Current Video Parameters.

This function returns the current Video Mode, the current display page and number of visible columns.

CPU registers are used as follows:

Entry:
AH = 15.
Exit:
BH = Current active display Page (or zero if in graphics modes or alpha mode 7).
AH = Number of visible columns (40 or 80).
AL = Current video mode (0 to 7).

All flags and other registers preserved.

2.3.8 IGA BIOS Interrupt 16: 'EGA Compatible' Video I/O (int 10h).

The IGA BIOS interrupt 16 service routine provides an extended set of service routines similar in many respects to those in the ROS ROM but with extra function selections to support the enhancements in the graphics hardware environment.

It is important to note that this interrupt entry point is active for 'EGA Compatible' display modes and that there are some differences in the standard call parameters. It is therefore important to use the correct section when reference is made to video interrupt 16. The CGA and MDA or Hercules Monochrome emulation mode compatible calls are covered in section 2.3.7. It should be noted that the Int 16 call registers are much the same for the video mode calls and video character display. When the 'EGA compatible' display modes are entered either as a result of the sw5 setting (OFF) or by the DISPLAY utility program, the video int 16 vector (at 0:40h) is set to point to the IGA BIOS's video interrupt's entry point and this set of service routines becomes active. Additional hardware setups must also be performed in the IGA to support the EGA compatibility.

CPU registers for 'EGA Compatible' Video Int 16 are used as follows:

Entry:
AH = Function Selector as follows:

All other registers as required by the function.

Exit:

If selector is greater than 19 then the call is rejected and has no effect.

All flags preserved and registers as specified by the selected function.

In general parameters passed to these routines are not checked and care should be taken when choosing unusual parameters as unexpected results may occur.

IGA Video Int 16 Function 0: Set Video Mode.

CPU registers are used as follows:

Entry:
AH = 0
AL = Mode Selector as follows:

0 - Alpha 25 Rows by 40 Columns B/W.
1 - Alpha 25 Rows by 40 Columns Color.
2 - Alpha 25 Rows by 80 Columns B/W.
3 - Alpha 25 Rows by 80 Columns Color.
4 - Graphics 320 pixels by 200 lines using palette 1.
5 - Graphics 320 pixels by 200 lines using palette 2.
6 - Graphics 640 pixels by 200 lines, 2 colors.
7 - Alpha 25 Rows by 80 Columns in Monochrome.
13 - Graphics 320 pixels by 200 lines, 16 colors.
14 - Graphics 640 pixels by 200 lines, 16 colors.
15 - Graphics 640 pixels by 350 lines, Monochrome.
16 - Graphics 640 pixels by 350 lines, 16/64 colors.
Exit:
All flags and registers preserved.

The major difference between the 'B W' and 'Color' designations in the mode 0 - 3 selections is not the displayable colors but that there is a 'flicker wait' incorporated into the color modes to eliminate a 'snowing' effect in certain devices. In actual fact the IGA BIOS Int 16 can drive a CGA card device when it is the secondary display (refer to 1.22 - Switch Settings).

If the default display mode indicates monochrome a display , then mode 7 is selected regardless of the mode in AL unless AL = 15d in which case monochrome 640x350 graphics is selected.

Modes 0 - 7 are the 'Compatible' modes and modes 13 - 16 are for extended mode support. The gap between 8 and 12 are not user selectable display modes some of which are internal modes used for RAM font loading.

IGA Video Int 16 Function 1: Set Cursor Size.

This function is only relevant in alpha modes as the cursor is not supported in graphics modes. It sets the CRTC cursor start and cursor end values.

CPU registers are used as follows:

Entry:
AH = 1
CH = Starting scan of cursor.
CL = Ending scan of cursor.
Exit:
All flags and registers preserved.

Values greater between 32 and 64 turn the cursor off. Setting cursor start greater than cursor end usually turns the cursor off and other combinations give strange cursors.

IGA Video Int 16 Function 2: Set Cursor Address.

This function sets the current row and column addresses of the cursor in the specified page.

CPU registers are used as follows:

Entry:
AH = 2
BH = Page number.
DH = Cursor Row Address.
DL = Cursor Column Address.
Exit:
All flags and registers preserved.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

IGA Video Int 16 Function 3: Get Cursor Address.

This function returns the current row and column address of the cursor in the specified page.

CPU registers are used as follows:

Entry:
AH = 3
BH = Page number.
Exit:
DH = Cursor Row Address.
DL = Cursor Column Address.
CH = Starting scan of cursor.
CL = Ending scan of cursor.
All flags and other registers preserved.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

IGA Video Int 16 Function 4: Get Light Pen Address.

This function returns the address of the light pen.

CPU registers are used as follows:

Entry:
AH = 4.
Exit:
If Light Pen switch set then If Light Pen switch clear then Always

IGA Video Int 16 Function 5: Set Display Page.

This function sets the active display page.

CPU registers are used as follows:

Entry:
AH = 5.
BH = Page number to be selected.
Exit:
All flags and registers preserved.

Pages are numbered from 0 to n-1, where 'n' is the number of pages available. Refer to table 1.11.2.5 for valid page numbers and page addressing details.

IGA Video Int 16 Function 6: Scroll Screen Up.

This function scrolls the active display page, or part of the active display page up a specified number of lines.

CPU registers are used as follows:

Entry:
AH = 6.
DH = Bottom Row of area to scroll.
DL = Right most Column of area to scroll.
CH = Top Row of area to scroll.
CL = Left most Column of area to scroll
BH = Attributes for blank lines scrolled onto the bottom of the scroll area.
AL = Number of lines to roll up.
Exit:
All registers and flags preserved.

Scrolling always takes effect on the current active display page.

Hardware scrolling is not supported. Scrolling is achieved by copying areas of Video RAM.

In graphics modes blank lines are filled with zeros to display the current background colour.

IGA Video Int 16 Function 7: Scroll Screen down.

This function scrolls the active display page, or part of the active display page down a specified number of lines.

CPU registers are used as follows:

Entry:
AH = 7.
DH = Bottom Row of area to scroll.
DL = Right most Column of area to scroll.
CH = Top Row of area to scroll.
CL = Left most Column of area to scroll
BH = Attributes for blank lines scrolled onto the top of the scroll area.
AL = Number of lines to roll down.
Exit:
All flags and registers preserved.

Scrolling always takes effect on the current active display page.

Hardware scrolling is not supported. Scrolling is achieved by copying areas of Video Display RAM.

IGA Video Int 16 Function 8: Read Character and Attributes.

This function reads the character and its associated attribute byte at the current cursor address in a specified display page.

In graphics modes, the character pixel data is generated either from an internal character matrix table for characters 0 to 127 or from an external character matrix table for characters 128 to 255, the address of which is held in interrupt vector 31. See 2.3.23 for additional details.

CPU registers are used as follows:

Entry:
AH = 8.
BH = Page to read.
Exit:
AL = Character. (0 if no match found in Graphics Modes).
AH = Attributes byte. (Unchanged in graphics modes).
All flags and registers preserved.

Refer to 1.11.1 and 1.11.2 for the definition of the character attributes bytes.

Refer to table 1.11.2.5 for valid page numbers and page starting address details.

IGA Video Int 16 Function 9: Write Character Attributes.

This function writes a character (or a block of the same character) and its associated attribute byte to the current cursor position in a specified display page.

In 'CGA compatible' graphics modes (3 - 5), the character pixel data is generated either from an internal character matrix table for characters 0 to 127 or from an external character matrix table for characters 128 to 255, the address of which is held in interrupt vector 31. See 2.3.23 for additional details.

For the extended 'EGA compatible' modes (13 - 16) the full 256 character matrix is pointed to by interrupt vector 67 (at address 10Ch). This vector is initialised by the IGA ROM BIOS during Power-On Self Testing and points to a set of ROM character sets in the C2000-C7FFF address range.

CPU registers are used as follows:

Entry:
AH = 9.
AL = Character to write.
CX = Repeat Count.
BH = Page to write.
BL = In alpha modes In graphic modes
Exit:
All flags and registers preserved.

The repeat count specifies the number of consecutive locations to which the character and attributes are written. In graphics modes all characters must fit on the current line.

In graphics mode if bit 7 of BL is set then the data for the specified character is exclusive ORed with the data already in the display RAM at the cursor address.

The character color specified in BL should be in the range 0 to 3 in 320 x 200 graphics modes, in the range 0 to 1 for mode 640 wide B/W graphics modes, and in the range 0 to 15 for 640 wide 16 color graphics modes.

IGA Video Int 16 Function 10: Write Character Only.

This function writes a character (or a block of the same character) to the current cursor position in a specified display page. In alpha modes the attribute bytes for all characters written remains unchanged.

See graphics character vector details in function 9 (Write Char/Attribute) above.

CPU registers are used as follows:

Entry:
AH = 10.
AL = Character to write.
CX = Repeat Count.
BH = Page to write.
BL = In alpha modes In graphic modes
Exit:
All flags and registers preserved.

The repeat count specifies the number of consecutive locations to which the character is written.

In graphics mode if bit 7 of BL is set then the data for the specified character is exclusive ORed with the data already in the display RAM at the cursor address.

The character color specified in BL should be in the range 0 to 3 in 320 x 200 graphics modes, in the range 0 to 1 for mode 640 wide B/W graphics modes, and in the range 0 to 15 for 640 wide 16 color graphics modes.

IGA Video Int 16 Function 11: Write Color Palette.

This function writes the CGA compatible Color Palette.

CPU registers are used as follows:

Entry:
AH = 11).
BH = Function select:
Exit:
All flags and registers preserved.

The palette number setting (BH non-zero) only applies to 320 x 200 graphics mode. Refer to section 1.11.2 for hardware details.

IGA Video Int 16 Function 12: Write a Pixel.

This function writes an individual pixel (only valid in graphics modes).

CPU registers are used as follows:

Entry:
AH = 12.
DX = Pixel Row.
CX = Pixel Column.
AL = Write Mode:
Exit:
All flags and registers preserved.

The pixel data specified in AL should be in the range 0 to 3 in 320 x 200 graphics modes, in the range 0 to 1 for mode 640 wide B/W graphics modes, and in the range 0 to 15 for 640 wide 16 color graphics modes.

IGA Video Int 16 Function 13: Read a Pixel.

This function is used for reading an individual pixel (only in graphics modes).

CPU registers are used as follows:

Entry:
AH = 13 (0Dh).
DX = Pixel Row.
CX = Pixel Column.
Exit:
AL = Specified pixel's color.
All flags and other registers preserved.

The specified pixel's color will be the same as the pixel data written by function 12 above.

IGA Video Int 16 Function 14: Write in TTY Emulation Mode.

This function writes the specified character in Teletype emulation mode at the current cursor address in the active display page.

CPU registers are used as follows:

Entry:
AH = 14.
AL = Character to write.
BL = In alpha modes In graphic modes
Exit:
All flags and registers preserved.

The character color bits are the same as for the write character (function 10) above.

Upon completion of the write the cursor column is incremented by one. If the column address is greater than the line length then the column address is set to zero and the cursor row address is incremented by one.

If the incremented row address is greater than the last visible line then it is decremented to its original value and the entire page is scrolled up one line. In alpha modes the line added to the bottom of the page is cleared to spaces with the attributes the same as the first character in previous line. In graphic modes the bottom line is cleared to zeroes.

The following display characters are executed rather than displayed symbolically:

BEL (07h)
Sounds a short (bleep) tone on the speaker.
BS (08h)
Decrements the cursor column one character position unless the column is already zero in which case it is ignored.
CR (0Dh)
Sets the cursor column address to zero.
LF (0Ah)
Increments the cursor row address by one and follows the scroll up procedure as detailed in the paragraph above.

All other control characters are displayed.

IGA Video Int 16 Function 15: Get Current Video Parameters.

This function returns the current Video Mode, the current display page and number of visible columns.

CPU registers are used as follows:

Entry:
AH = 15.
Exit:
AH = Number of visible columns (40 or 80).
AL = Current video mode).
BH = Active Display Page Number.

All flags and other registers preserved.

IGA Video Int 16 Function 16: Set Palette Register(s).

This function enables setting individual Palette registers, the Hi-Res Border (overscan) register, all Palette registers at once or setting the Intensity/Blink mode bit.

CPU registers are used as follows:

Entry:
AH = 16.
AL = Sub-Function Selector as follows:
Exit:
All flags and registers preserved.
For sub-function 0:
BL = Palette register number (0 - 15).
BH = Palette Value (0 - 63).
For sub-function 1:
BH = Hi-Res Border Value (0 - 63).
For sub-function 2:
ES:DX = Pointer to a 17 byte table as follows:
0 to 15 = Palette Registers 0 to 15 Value.
16 = Hi-Res Border Value.
For sub-function 3:
BL = 1 - Enable Blink (Disable Intensified Foreground).
        0 - Disable Blink (Enable Intensified Foreground).

IGA Video Int 16 Function 17: Load Character Generator.

This function enables setting of extended character sets.

CPU registers are used as follows:

Entry:
AH = 16.
AL = Sub-Function Selector as follows:
Exit:
All flags and registers preserved (except function selector 48).

Sub functions 0 to 2 perfomr the same function as sub-functions 16 to 18 except that 0 to 2 initiate a full mode change setup (without clearing the video RAM) and 16 - 18 reprogram the CRTC cursor parameters based on character (points) size. These selections load a selected font table into the font areas on planes 2 & 3. Refer to Character Set Select Register description in section 1 for the alternate character block layouts and how they are selected using attribute bit 3.

For sub-function 0:
AL = 0. (Load User Font Table).
BL = Font Block to load (0 - 3).
DX = Starting Offset into Font Block (0 - 255 characters).
BH = Points (Bytes per Character) (1 - 31).
CX = Number of Characters to load. (1 - 256).
ES:BP = User Font Table Address Pointer.
For sub-function 1:
AL = 1. (Load ROM 8x14 Font Table).
BL = Font Block to load (0 - 3).
For sub-function 2:
AL = 2. (Load ROM 8x8 Font Table).
BL = Font Block to load (0 - 3).
For sub-function 3:
AL = 3. (Set Character Set Select Register).
BL = 4-bit Character Sel A/B setting.

Refer to the Character Set Select Register description in section 1 for the details concerning character selects A & B.

For sub-function 16:
AL = 16. (Load User Font Table).

Refer to function 0 for register requirements for the user font table. As stated earlier, this sub-function differs from its counterpart only in that the current mode setup is maintained with exception that the CRTC cursor is set up based on the current character height (points) selection. This sub-function and the following two sub-functions should be executed immediately following a mode change and the resultant CRTC reprogramming should be fairly close to the original settings else unexpected results may occur.

For sub-function 17:
AL = 17. (Load ROM 8x14 Font Table).
BL = Font Block to load (0 - 3).
For sub-function 2:
AL = 18. (Load ROM 8x8 Font Table).
BL = Font Block to load (0 - 3).

Refer to section 1.11.3 for the Character Set Select Register layout.

For sub-function 32:
AL = 32. (Set Video 8x8 Matrix Table).
ES:BP = User Graphics Font Address Pointer for characters
128 to 255. See 2.3.22 - Video Matrix Table.
For sub-function 33:
AL = 33. (Set User Hi-Res Graphics Characters Vector).
ES:BP = User Graphics Font Address Pointer for characters
CX = Bytes per Character. (1 - 31)
BL = 0 - Rows is specified by DL.
        1 - 14 Rows.
        2 - 25 Rows.
        3 - 43 Rows.

This font table is used to form the characters written to the screen if the current Video Mode is one of the Extended Hi-Res graphics Modes.

The current value of Rows (-1) is stored in system storage location 0:484 and the bytes per character value (Points) is system storage location 0:485. The int 67 vector pointer is system vector location 0:10C.

For sub-function 48:
AL = 48. (Return Character Set Vector).
BH = 0 - Return vector 31 (User 8x8 upper 128 vector).
        1 - Return vector 67 (Extended Hi-Res 256 vector).
        2 - Return 8x14 ROM font address.
        3 - Return 8x8 ROM font address.
        4 - Return upper 128 origin of 8x8 ROM font address.
        5 - Return 9x14 ROM font address.
Upon return from sub-function 48:
CX = Bytes Per Character (Points from 0:485).
DL = ROWS - 1 (from 0:484)
ES:BP = Requested Vector.

The 9x14 table is in the form of a 'fixup' table whereby the first byte is the character number requiring the 9x14 fixup followed by 14 bytes of character redefinition. The table is zero terminated.

IGA Video Int 16 Function 18: Return EGC state/Set PrtSc Vector.

This function either returns the current EGC status or selects the IGA BIOS's alternate print screen routine address to be stored in the PrtSc vector (5) location.

CPU registers are used as follows:

Entry:
AH = 18.
BL = 16 - Return EGC Status.
        32 - Set PrtSc Vector to the IGA ROM BIOS print screen entry.
Exit:
If return EGC status then registers returned as follows:
BH = 0 - Color Mode Set.
        1 - Monochrome Mode Set.
BL = Number of 64Kb Video RAM Blcoks less one j '3' (PC1640 has 256Kb Video RAM installed)
CL = Switch (1 to 4) states (inverted - from 0:488)
CH = Features (0Fh - Features connector not installed on PC1640).

All flags and other registers preserved.

If Set PrtSc then all flags and registers are preserved.

IGA Video Int 16 Function 19: Write String.

This function writes a string to video RAM at a specified cursor position in a specified display page. The supplied string can either consist of characters by themselves (in which case the attribute byte is supplied in BL) or character and attribute byte pairs. Control characters are executed as described in IGA Video Int 16 Function 14 and where they occur they are not associated with an attribute byte within the supplied string. Line wraps occur at the display width specified in the system variable ROWS (at 0:488).

CPU registers are used as follows:

Entry:
AH = 19.
AL = String Function Selector as follows:
0
- String consists of characters only and attribute in BL.
The Cursor stays at the position prior to the string write.
1
- String consists of characters only and attribute in BL.
The Cursor is updated to be the character after the string.
2
- String consists of character and attribute pairs.
The Cursor stays at the position prior to the string write.
3
- String consists of character and attribute pairs.
The Cursor is updated to be the character after the string.

BH = Page to Write.
DH = Cursor Row Address.
DL = Cursor Column Address.
CX = Character Count (not including attribute bytes if supplied with the string).
ES:BP = Address Pointer to the String.
Exit:
All flags and registers preserved.

2.3.9 Interrupt 17: System Configuration.

This software interrupt returns the current system configuration status as defined in RAM locations 00410 and 00411 hex (see section 2.4).

CPU registers are used as follows:

Entry:
No conditions.
Exit:
AX = System Configuration status:
Bit(s)Function
14 & 15Number of printers (1-3).
13 Not used.
12 Set if an optional games adapter is fitted.
11 Always zero.
9 & 10 Number of serial interfaces (1 or 2).
8 Not used.
7 Always zero.
6 Set if second floppy disk drive is fitted.
4 & 5 Default display mode (DDM).
2 & 3 Always set.
1 Set if 8087 NDP is installed.
0Always set.

All flags and other registers preserved.

Section 1.8.2 (Port A - Status-1 Input) contains the default mode states as defined in the DDM1 and DDM0 bits.

2.3.10 Interrupt 18: Memory Size.

This software interrupt returns the system RAM size as held in system locations 00413 and 00414 hex.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
AX = Number of 1K memory blocks fitted.
All flags and other registers preserved.

2.3.11 Interrupt 19: Disk I/O

This software interrupt provides disk read, write, verify, and format functions for the drives fitted to the standard floppy disk controller.

In actual practice by the time the MS-DOS operating system has been loaded and an applications program is activated, the DOS startup process will have saved the ROS's interrupt vector (from location 0:4Ch) and installed its own entry vector. DOS does this so that it can correct for such conditions as DMA over a 64K segment boundary and it will break this sort of I/O requrest into a number of smaller I/O requests. In addition any installed hard disk will have 'chained' itself into the interrupt 19 vector so that requests with the MSB of the drive number set can be serviced by its ROM based hard disk I/O routines (usually in the C8000h address range). In general the call parameters for the hard disks are the same as those described here for read and write, however there are a number of additional services provided by the hard disk BIOS ROM's. The hard disk error return codes are also somewhat extended to the floppy disk group documented here. The typical 'compatible' hard disk function selector list and errors are documentedd following the ROS's functions.

CPU registers are used as follows:

Entry:
AH = Disk I/O Function selector:
Exit:
AH = Status Byte:

All other registers as specified by the selected function.

For all disk functions the Carry Flag (CY) will be clear if no error else it is set if an error (and AH = error number). All other flags are corrupt.

Disk Function 0: Initalise Disk Sub-System.

This function performs a total initialisation of the disk interface as follows:

  1. Reset the FDC (Floppy Disk Controller).
  2. Re-configure the FDC parameters to those specified in the disk parameter table (see interrupt 30).

CPU registers are used as follows:

Entry:
AH = 0.
Exit:
AH/Flags = Status as specified above.
All registers preserved.

When an error is returned by any other Diskette I/O function, the Initialise Disk function should be called prior to the next disk I/O operation.

Disk Function 1: Return Last Status.

This function returns the status byte and Carry Bit of the last disk I/O operation.

CPU registers are used as follows:

Entry:
AH = 1.
Exit:
AH/Flags = Status of last disk I/O as specified above.
All other registers preserved.

Disk Function 2: Read Sector.

This function reads a number of consecutive sectors. All sectors to be read must be on the same track.

CPU registers are used as follows:

Entry:
AH = 2.
DH = Head Number (0 or 1).
DL = Drive Number (0 or 1).
CH = Track Number.
CL = Starting Sector Number.
BX = Offset Address of Read Data Buffer.
ES = Segment Address of Read Data Buffer.
AL = Number of Sectors to Read.
Exit:
AH/Flags = Status as specified above.
AL = Number of Sectors successfully read. All other registers preserved.

Disk Function 3: Write Sector.

This function writes a number of consecutive sectors. All sectors to be written must be on the same track.

CPU registers are used as follows:

Entry:
AH = 3.
DH = Head Number (0 or 1).
DL = Drive Number (0 or 1).
CH = Track Number.
CL = Starting Sector Number.
BX = Offset Address of Write Data Buffer.
ES = Segment Address of Write Data Buffer.
AL = Number of Sectors to Write.
Exit:
AH/Flags = Status as specified above.
AL = Number of Sectors successfully written. All other registers preserved.

Disk Function 4: Verify Sector.

This function verifies a number of consecutive sectors. All sectors to be verified must be on the same track.

CPU registers are used as follows:

Entry:
AH = 4.
DH = Head Number (0 or 1).
DL = Drive Number (0 or 1).
CH = Track Number.
CL = Starting Sector Number.
AL = Number of Sectors to Verify.
Exit:
AH/Flags = Status as specified above.
AL = Number of Sectors successfully verified. All other registers preserved.

Since the verification process is halted upon the first occurrence of an error, AL represents the number of sectors successfully verified prior to the occurrence of an error or total sectors verified if no error.

Disk Function 5: Format Track.

This function formats an entire track.

CPU registers are used as follows:

Entry:
AH = 5.
DH = Head Number (0 or 1).
DL = Drive Number (0 or 1).
CH = Track Number.
BX = Offset Address of Format Buffer.
ES = Segment Address of Format Buffer.
Exit:
AH/Flags = Status as specified above.
All other registers preserved.

The format buffer contains four bytes of information for each sector on the track:

  1. Track Number.
  2. Side Number.
  3. Sector Number.
  4. Sector Size Code:

The gap length, filler byte and sectors per track required by the FDC Format command are obtained from the DPT (See Disk Parameter Table - Section 2.3.22).

2.3.11.1 Hard Disk Call parameters and registers.

As explained in the beginning of the ROS's floppy disk Int 19 calls, the 'compatible' hard disk expansion slot ROM supports a register interface similar to the floppy disk I/O but with extended functions required for the hard disk environment. This section gives the setup registers for this 'compatible' hard disk I/O call.

CPU registers are used as follows:

Entry:
AH = Hard Disk I/O Function selector:
Exit:
AH = Status Byte:

The register call parameters for the function selections are very similar to the equivalent floppy disk I/O calls and are typically as follows:

Function Selector
AH: 0 - 20 & 22 (as per the table above)
Sector Count
AL: 1 - n. (17 Sectors / Track - typical)
Interleave Factor
AL: 1 - 16 Typically 3 to 7 (for the formatting calls)
Drive Number
DL: 80h - FFh (Drive C: is 80h, D: is 81h ... etc).
Sector Number
CL: 1 - 17 (Lower 6 bits of CL).
Head Number
DH: 0 - n (Typically 3 for 20MB drives with 4 heads).
Cylinder Number
CH: 0 - 1023 (8 LS Bits and 2 additional MS bits in the upper 2 MS bits of CL).
Buffer Address
ES:BX --> Segment:Offset value.
Exit:
AH: Return status as listed in the above table.
CF: Carry Flag Clear - No errors. (AH = 0)
Carry Flag Set - Error ccode in AH.

When Drive parameters are requested (Function 8) the return registers are as follows:

Hard disk drive count
DL. (1 to n)
Maximum Head Number
DH. (0 to n-1)
Sectors per Track
CL. (bits 0 - 5)
Maximum Cylinder Number
CH. (10 bits: 8 LSBs in CH and 2 MS bits in the 2 upper bits of CL).

Cylinders and heads are numbered starting from zero, therefore the max numbers are 'n-1'. Sectors are numbered starting at 1 and go to n which is typically 17 for the current 'MFM' technology. Newer 'RLL' technology drives are beginning to appear with 26 sectors per track. The maximum track number is actually one higher than the number reported but the highest track (termed the maintenance cylinder) is reserved for diagnostic software maintenance tests so that applications cannot use this track for storage.

Setting bad track markers is the method used to force DOS to set its 'Bad Sector Markers' during the logical formatting process.

Hard disk formatting is a confusing subject because there are two formatting passes necessary before the disk is ready for usage. The first formatting required is the low level (hard) formatting process which writes the actual sector ID fields on the media. When a hard disk is being prepared for usage by MS-DOS it must then be partitioned (using the FDISK utility) and finally 'Logically Formatted' the using the MS-DOS FORMAT utility. MS-DOS formatting is merely a quick once over verify process to find any areas which are not readable and for which it will mark the unreadable blocks in the DOS File Allocation Table (FAT). MS-DOS then installs its file directory and FATs on the disk and reports disk size and bad sector counts. The initial hard formatting process is a factory process which must take place in a controlled environment (temperature and etc.) and the manufacturer's media defect list is entered and bad tracks marked. User attempts to format hard disks are fraught with difficulties usually because of the media defect problem whereby areas which may appear readable to MS-DOS's formatter but which fail to retain certain data patterns contained in actual data written later and these will cause 'Unrecoverable Read Error' reports to appear and frustrate all concerned. It is generally a good idea to leave the debugger 'g=C800:5' ROM formatter entry point to the experts.

2.3.12 Interrupt 20: Serial I/O.

This software interrupt provides functions for character I/O to one of the two serial channels and functions for configuring the serial parameters.

Two channels are supported, logical serial device 0 (COM1:) which is always configured and logical serial device 1 (COM2:) which is optional. Power-up initialisation determines whether serial device 1 is installed.

CPU registers are used as follows:

Entry:
AH = Serial I/O function selector: DX = Logical Channel Number (0 or 1).
All other registers as required by the specified function.
Exit:
AX = Returned Status/Character as defined by the function.
All flags and other registers preserved.

If logical channel number is out of range (greater than 1) or is not fitted then the function is abandoned and the timeout error status (bit 7 of AH) is returned and all other bits in AX are undefined.

The Logical Serial Device Timeout Count RAM variables (locations 0047C & 0047D) specify the time out delay (in half seconds) used for channel timeout. See section 2.4.

Serial Function 0: Initalise Port.

This function performs a complete reinitialisation of a serial channel. Setting the Baud Rate, Data Bits, Stop Bits and Parity.

CPU registers are used as follows:

Entry:
AH = 0.
DX = Logical Channel Number (0 or 1).
AL = Hardware configuration:
Bit(s)Function
5 - 7Baud Rate Code (0 - 7).
4Set for Even Parity / Clear for Odd Parity.
3Set Parity Enable.
2Set for 2 Stop Bits / Clear for 1 Stop Bit.
1Always set.
0Set for 8 Data Bits/Clear for 7 Data Bits.
Exit:
AH = 8250 Line Status register (See section 3.4).
AL = 8250 Modem Status register.
All flags and other registers preserved.

The Baud Rate code (bits 5 thru 7) is one of the following:

If the hardware flow control bit in the NVR default display mode byte is set then RTS is raised true and DTR is set false. Otherwise the current state of the control lines is preserved.

Serial Function 1: Send Character.

This function performs a character out sequence to the selected port. The character is output when CTS and the 8250 Tx Holding Register Empty status is also true. If the character cannot be sent within the time specified in the logical serial device timeout count RAM variable then the command is abandoned and AH is returned with bit 7 set.

CPU registers are used as follows:

Entry:
AH = 1.
AL = Character to be sent.
DX = Logical Channel Number (0 or 1).
Exit:
AH = 8250 Line Status register bits 0 to 6. Bit 7 is set if the channel timed out else bit 7 is clear and the character was sent.

All flags and other registers preserved.

When this function is called, RTS is raised true.

Upon exit both the RTS and DTR control lines are left in their current state.

The Logical Serial Device Timeout Count RAM variables (locations 0:47C and 0:47D) specify the time out delay (in half seconds) used for channel timeout.

Serial Sub-Function 2: Read Character.

This function attempts to read a character from the specified serial port. The character is not read until both Data Ready (DR) and Data Set Ready (DSR) status bits are both true. If a character is not received within the time specified by the logical device timeout count then the command is abandoned and timeout status is flagged.

CPU registers are used as follows:

Entry:
AH = 2.
DX = Logical Channel Number (0 or 1).
Exit:
If character received from 8250 then
AL = Character received.
AH = Character status:
Bit(s)Meaning
7 - 5Always '0'.
4Break status.
3Set if framing error.
2Set if parity error.
1Set if overrun error.
0Always '0'.
If logical channel timed out then Always

If the character is received with no errors then AH = 0 on exit.

Upon entry, if no character is available at the serial port DTR is set in the Modem Control Register.

If logical channel number is out of range or is not fitted then the function is abandoned and the timeout error status (bit 7 of AH) is returned and all other bits in AX are undefined.

The Logical Serial Device Timeout Count RAM variables (locations 0:47C and 0:47D) specify the time out delay (in half seconds) used for channel timeout.

Serial Function 3: Get Channel Status.

This function returns the status of the specified logical channel.

CPU registers are used as follows:

Entry:
AH = 3.
DX = Logical Channel Number (0 or 1).
Exit:
AH = 8250 Line Status register (See section 3.4).
AL = 8250 Modem Status register.
All flags and other registers preserved.

All flags and other registers preserved.

If logical channel number is out of range or is not fitted then the function is abandoned and the timeout error status (bit 7 of AH) is returned and all other bits in AX are undefined.

2.3.13 Interrupt 21: Enhanced Function Interrupt.

This software interrupt provides access to the enhanced hardware features of the AMSTRAD PC1640.

CPU registers are used as follows:

Entry:
AH = Enhanced function Selector: All other registers as required by specified sub-function.

Functions 3 - 5 are for PC1512 video hardware and should not be used on the PC1640.

Exit:
If sub-function number out of range then If sub-function within range then

Enhanced Function 0: Read/Reset Mouse X/Y Counts.

Read and reset the mouse X and Y count registers. Each register is read twice. If the data from two consecutive reads differs then the process is repeated until two consecutive reads produce the same data. Upon completion of the read procedure the registers are cleared to zero.

CPU registers are used as follows:

Entry:
AH = 0.
Exit:
CX = Signed X count.
DX = Signed Y count.
Carry False.
Other flags corrupt.
All other registers preserved.

Enhanced Function 1: Write NVR Location.

This sub-function writes a specified location in the Real Time Clock Non-Volatile RAM (NVR), re-computes and stores the new checksum value. The location written is then read back and compared with the new value and if different an error code is returned.

CPU registers are used as follows:

Entry:
AH = 1.
AL = NVR Address to be written (0 to 63).
BL = NVR Data to be written.
Exit:
AH = Return Code: Carry false.
All other flags corrupt.
All other registers preserved.

Although locations 0-13 may be accessed using this function, they are used by the RTC hardware and should not be modified with this function.

Section 2.5 (Non Volatile RAM) contains the NVR information layout.

Enhanced Function 2: Read NVR Location.

This sub-function reads a specified location in the Real Time Clock Non-Volatile RAM (NVR). The checksum is computed and compared with the actual value and if the NVR checksum is incorrect an error code is returned.

CPU registers are used as follows:

Entry:
AH = 2.
AL = NVR Address to be read (0 to 63).
Exit:
AH = Return Code: AL = Byte read from NVR.
Carry false.
All other flags corrupt.
All other registers preserved.

Section 2.5 (Non Volatile RAM) contains the NVR information layout.

Enhanced Function 6: Return ROS Version Number.

This sub-function returns the two part ROS version number.

CPU registers are used as follows:

Entry:
AH = 6.
Exit:
BH = Release number.
BL = Issue Number.

Carry false.
All other flags corrupt.
All other registers preserved.

The Release Number is incremented only when the interface to the ROS is changed. The Issue Number is incremented for each version of a particular release. A new release always starts with issue number zero.

Note that this function call can be used to detect whether a program is running on an Amstrad PC. Prior to entry clear the carry flag and set BX to zero. Upon return if carry is set or BX is zero then the program is not running in an Amstrad PC. An additional hardware check (in the printer control port - Section Section 1.10.2) can be used to sort out whether the Amstrad PC is a PC1512 or a PC1640.

2.3.14 Interrupt 22: Keyboard I/O.

This software interrupt provides access to the keyboard buffer and the current toggle status.

CPU registers are used as follows:

Entry:
AH = Keyboard I/O function selector.
Exit:
If function selector out of range then If function within range then

Keyboard I/O Function 0: Get Key Token.

Return the next token from the key token buffer. If no key token is available then wait until a key token is available.

CPU registers are used as follows:

Entry:
AH = 0.
Exit:
AX = Key Token.
All flags and other registers preserved.

Keyboard I/O Function 1: Return Keyboard Buffer Status.

Test whether the key token buffer is empty. If it is not empty return the next key token to be taken out of the buffer without removing it from the buffer.

CPU registers are used as follows:

Entry:
AH = 1.
Exit:
If key token buffer is empty then If one or more tokens in buffer then Always

Keyboard I/O Function 2: Return Shift States.

Return the current value of the shift states (from 00417h).

CPU registers are used as follows:

Entry:
AH = 2.
Exit:
AL = Current shift states:
Bit(s)Function (Set if key active)
7INS
6CAPS LOCK
5NUM LOCK
4SCROLL LOCK
3ALT
2CTRL
1LEFT SHIFT
0RIGHT SHIFT

All flags and other registers preserved.

2.3.15 Interrupt 23: Printer I/O.

This software interrupt provides access to the three printer channels.

CPU registers are used as follows:

Entry:
AH = Printer I/O Function selector: DX = Logical Channel Number (0 - 2).
Other registers as specified by function.
Exit:
AH = Printer Port Status (Bits 1 - 7):
Bit(s)Function (Bit Set True)
7Printer Idle.
6Printer Acknowledge
5Paper Out.
4Printer Selected.
3I/O Error.
1 & 2Always Zero.
0Zero if I/O successful or set if Timeout. (see Printer functions).

All flags and other registers preserved.

Three logical channels are supported. Logical printer device 0 is the system port and is standard to all machines. The power-up initialisation sequence determines if additional external printer ports are present. When both additional printer interfaces are present, device 1 is the external printer port and device 2 is the printer port on the external monochrome VDU controller. If only one additional printer interface is present it is always logical device 1.

Locations 0478h - 047Ah contain the Logical Printer Device timeout counts (see section 2.4).

Printer Function 0: Print Character.

This function attempts to output a character to the specified printer port. If the character cannot be sent within the time specified by the logical printer timout count RAM variable then the command is abandoned and AH is returned with bit 0 set.

CPU registers are used as follows:

Entry:
AH = 0.
AL = Character to be printed.
DX = Logical Channel Number (0 - 2).
Exit:
AH = Printer Port status (as given above) or Timeout (Bit 0) set.
All flags and other registers preserved.

Printer Function 1: Initialise Printer Channel.

This function performs a complete reinitialisation of a specified printer channel (if present). The printer INIT signal is held low for approximately 4 milliseconds. Printer interrupts and auto linefeed are disabled.

CPU registers are used as follows:

Entry:
AH = 1.
DX = Logical Channel Number (0 - 2).
Exit:
AH = Printer Port status (as given above) or Invalid Channel (Bit 0) set.
All flags and other registers preserved.

Printer Function 2: Return Channel Status.

This function returns the status register of the specified logical printer channel (if present).

CPU registers are used as follows:

Entry:
AH = 2.
DX = Logical Channel Number (0 - 2).
Exit:
AH = Printer Port status (as given above) or Invalid Channel (Bit 0) set.
All flags and other registers preserved.

2.3.16 Interrupt 24: System Restart.

If a Hard Disk ROM BIOS was initialized during Power-Up Initialization then it will have installed its entry point into this vector and saved the ROS's vector in its private storage area. Its bootstrap process resembles the process described below (under Int 25) and if successful the system from the active partition of the hard disk will be loaded if not then it executes the ROS's Int 24 whose vector it has saved.

This software interrupt is intended to provide an orderly system restart capability. A message is displayed on the active VDU requesting that the user 1Insert a SYSTEM disk into Drive A1 and 1Then press any key.1 When the keypress is received, the Disk Bootstrap process (Interrupt 25) is invoked.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
Disk Bootstrap.

2.3.17 Interrupt 25: Disk Bootstrap.

This software interrupt to provide access to the disk bootstrap process which is normally executed after power-up initialisation tests.

The ROS attempts to load the bootstrap sector (from drive A, side 0, track 0, sector 1) into memory at 07C00h. If the bootstrap sector is loaded successfully it is given control (far jump to segment 0000 offset 7C00). If the bootstrap sector cannot be loaded after 10 retries, the ROS will display a message prompting the user to "Insert a SYSTEM disk into drive A" and "Then press any key." The ROS then waits for the keypress and repeats the system restart procedure (Int 24).

Useage of this interrupt under MS-DOS 3.2 may fail if there has been any process installed in memory which has connected itself to any active interrupt chains such as the System Clock (ticker) interrupt. The ROS performs the bootstrap without initialising the interrupt vectors and if a process has become resident under MS-DOS it will be removed during the bootstrap process, however the next occurrence of an interrupt will give control to the address of the formerly resident process and as a result the system hangs because the processor is executing random code. Programs such as MOUSE.COM are of this category of resident timer-chained process.

CPU registers are used as follows:

Entry:
No conditions.
Exit:
To program loaded by Disk Bootstrap.

2.3.18 Interrupt 26: System Clock & Real Time Clock.

This software interrupt routine provides access to both the system (software maintained) clock location as well the Real Time Clock (RTC) hardware.

CPU registers are used as follows:

Entry:
AH = Clock Function specifier: All other registers as required by function.
Exit:
All registers as specified by function.

Clock Function 0: Get System Clock.

This function returns the current value of the 32 bit system clock value.

CPU registers are used as follows:

Entry:
AH = 0.
Exit:
DX = Least Significant Word of the clock count.
CX = Most Significant Word of the clock count.
AL = 24 Hour Flag:
All flags and other registers preserved.

The 32 but system clock is incremented every 54.9 milliseconds by the ticker hardware interrupt routine. When the count reaches the 24 hour value (0001800B0h) the 24 Hour flag is set and the system clock count is reset to zero. This 24 hour count is based on the system clock 1.19318 MHz divided by the maximum divisor, 65536. This gives an interrupt rate of 54.92549323 Ms which when divided into the number of seconds in 24 hours gives this 24 Hour time value above.

Note that the 24 hour flag is reset to zero after it has been read.

Clock Function 1: Set System Clock.

This function sets the current value of the 32 bit system clock value.

CPU registers are used as follows:

Entry:
AH = 1.
DX = Least Significant Word of the clock count.
CX = Most Significant Word of the clock count.
Exit:
All flags and other registers preserved.

Clock Function 2: Get RTC Time.

This function gets the current time from the Real Time Clock.

CPU registers are used as follows:

Entry:
AH = 2.
Exit:
If RTC not operating then If RTC operating then Always

Clock Sub-Function 3: Set RTC Time.

This function sets the Real Time Clock time.

CPU registers are used as follows:

Entry:
AH = 3.
CH = Hour (BCD).
CL = Minute (BCD).
DH = Second (BCD).
DL = 1 to enable daylight savings option (otherwise 0).
Exit:
If RTC not operating then If RTC operating then Always

When the daylight savings option is set it enables two special updates of the current time. On the last Sunday in April, the time increments from 1:59:59 AM to 3:00:00 AM. Also on the last Sunday in October the time increments from 1:59:59 AM to 1:00:00 AM.

Note that this option also disables the alarm function.

Clock Function 4: Get RTC Date.

This function gets the current date from the Real Time Clock.

CPU registers are used as follows:

Entry:
AH = 4.
Exit:
If RTC not operating then If RTC operating then Always

The century byte is set to 19 (BCD) if the year is 80 (BCD) or above otherwise it is set to 20 (BCD).

Clock Function 5: Set RTC Date.

This function sets the Real Time Clock time.

CPU registers are used as follows:

Entry:
AH = 5.
CH = Century (BCD) [Ignored].
CL = Year (BCD).
DH = Month (BCD).
DL = Day of Month (BCD).
Exit:
If RTC not operating then If RTC operating then Always

Century is ignored and is computed as described in Clock Function 4.

Clock Function 6: Set RTC Alarm.

This function sets the alarm time and arms the Real Time Clock alarm interrupt. The alarm interrupt will occur then the current time matches the alarm time. An application program which uses this function must first write the address of its alarm interrupt routine into interrupt vector 10.

CPU registers are used as follows:

Entry:
AH = 6.
CH = Hour (BCD).
CL = Minute (BCD).
DH = Second (BCD).
Exit:
If RTC alarm already set then If RTC alarm not already set then Always

Clock Function 7: Kill RTC Alarm.

This function disarms the Real Time Clock alarm function.

CPU registers are used as follows:

Entry:
AH = 7.
Exit:
All flags and registers preserved.

2.3.19 Interrupt 27: Keyboard Break Interrupt.

This software interrupt is invoked by the keyboard hardware interrupt routine when a keyboard break ([CTRL] + [NUM LOCK]) is detected.

The power-up initialisation process loads the address of a dummy break handler routine which does an interrupt return (IRET) instruction.

Application programs which supply a keyboard break interrupt must conform to the following register conventions:

Entry:
DS = 0040h (Spanning the ROS data).
Exit:
All registers must be preserved except AX, BX, CX, DX, DS and Flags which may be corrupt.

The supplied interrupt routine must not invoke any other ROS interrupts from within itself but may modify any of the system RAM locations used by the ROS.

2.3.20 Interrupt 28: External Ticker Interrupt.

This software interrupt is called from within the System Clock hardware interrupt routine. It is initialised by power-up with a dummy handler which returns from interrupt by doing an IRET instruction. It can be used by application programs which require a process to be run at a regular interval.

Application programs which supply an external ticker interrupt must conform to the following register conventions:

Entry:
DS = 0040h (Spanning the ROS data).
Exit:
All registers must be preserved except AX, DX, DS and Flags which may be corrupt.

The supplied interrupt routine must not invoke any other ROS interrupts from within itself but may modify any of the system RAM locations used by the ROS.

2.3.21 Interrupt 29: VDU Parameter Table.

This interrupt vector location contains the 20-bit address of the Video Parameter table used in setting up the 6845 CRTC when changing video mode. Upon power-up or after a reset, the system ROS initialisation process loads the ROM table address into this vector location (0074-0077 hex).

The Video Parameter table consists of four consecutive 16 byte entries. Each entry contains an initialisation quantity for each of the MC6845 CRTC registers (See section 1.11.5). When a new video mode is selected the table entry used for initialisation as follows:

Table EntryVDU Mode
0 0 - Alpha 25 by 40 Chars.
1 - Alpha 25 by 40 Chars.
1 2 - Alpha 25 by 80 Chars.
3 - Alpha 25 by 80 Chars.
2 4 - Graphics 320 by 200 Pixels, palettes 0 or 1.
5 - Graphics 320 by 200 Pixels, palette 2.
6 - Graphics 640 by 200 Pixels.
3 7 - Alpha 25 by 80 chars using monochrome adapter.

The table contains the following initialisation data:

Register Number Function Entry 0 Entry 1 Entry 2 Entry 3
R0 Horizontal Total 56 113 56 97
R1 Horizontal Displayed 40 80 40 80
R2 Horiz. Sync Position 45 90 45 82
R3 Horiz. Sync Width 10 10 10 15
R4 Vertical Total 31 31 127 25
R5 Vertical Total Adjust 06 06 06 06
R6 Vertical Displayed 25 25 100 25
R7 Vertical Sync Position 28 28 112 25
R8 Interlace 02 02 02 02
R9 Max. Raster Address 07 07 01 13
R10 Cursor Start Raster 06 06 06 11
R11 Cursor End Raster 07 07 07 12
R12 Start Address High 00 00 00 00
R13 Start Address Low 00 00 00 00
R14 Cursor Location High 00 00 00 00
R15 Cursor Location Low 00 00 00 00

2.3.22 Interrupt 30: Disk Parameter Table.

This interrupt vector location contains the 32-bit address of the parameter table of configuration parameters for the disk interface. Upon power-up or after a reset, the initialisation process loads the ROM table address into this vector location (0078 - 007B hex).

The Disk Parameter Table consists of 11 bytes as follows:

ByteFunctionValue
0 2nd byte of the disk controller specify command. (6 Ms Step Rate, Head Unload delay = 15) DFh
1 3rd byte of the disk controller specify command. (Head Load delay = 1 & FDC DMA Mode = 0) 02h
2 Motor off timeout (approx 5.4 seconds). 64h
3 Sector size selector (512 bytes) 02h
4 End of Track (sector 9) 09h
5 Gap length for Read/Write commands. 2Ah
6 DTL - Data Length FFh
7 Gap Length for format command. 50h
8 Filler byte for format command. F6h
9 Head Settling Delay (15 Ms) 0Fh
10 Motor on Delay (500 Ms) 04h

2.3.23 Interrupt 31: VDU Matrix Table.

This interrupt vector location contains the 32-bit address of the VDU matrix table used in compatible graphics modes for generating pixel data for characters 128 to 255.

Upon power-up or after a reset, the initialisation process loads this vector (007C-007F) with all zeros to indicate that no external VDU matrix table is loaded. Programs such as GRAFTABL.EXE load a resident upper 128 character matrix which can be used in the 640x200 resolution graphics modes. In addition the IGA ROM BIOS uses another vector, 67 (vector location 0:10Ch) which it initialises to point to its full 256 character ROM table. IGA Video Int 16, function 17, sub-function 48, BH=4, can be used to obtain the upper 128 origin of its 8x8 ROM font address and this resultant value can be used to initialise interrupt vector 31.

When the IGA extended font ROM is enabled for foreign character sets (sw9 ON) then a vector table is available at C7FE8 (C000:7FE8) which contains 12 word size entries. The first four words are for Danish fonts, the next four words are for Portugese and the final four words are for the Greek Fonts. The first pointer in each of these groups is for the 8x8 high 128 character set for the national variant. By using the offset value plus a segment value of C000h, national variant upper 128 character sets can easily be obtained without using any disk based tables.

Each of the 128 character table entries consists of eight bytes, one for each character scan. The first byte is the top scan value and the last byte is the button scan value. The MSB, bit 7, is the left most pixel and the LSB, bit 0, is the right most pixel of the scan. A set bit displays the foreground colour and a reset bit displays the background colour.

2.4 System RAM Variables.

The System RAM address space from 00300 to 00500 is used by the ROS for variable storage. The following table lists the variables and their usage. They are either classified as Byte (8-bit), Word (16-bit), Long Word (32-bit) or Buffer (greater than 32-bit) storage locations. Depending on the CPU's segment register setting, the variables at 004xx can be said to be referenced at 40:XXX or 0:4XX.

Location(s) Usage
00300-003FF Initialisation Stack (Buffer).
Used as stack area only during initialisation.
00400 Logical Serial Device 0 Base I/O Address (Word).
Contains the base address of logical serial device 0.
Initally the System Asynchronous Serial port address.
00402 Logical Serial Device 1 Base I/O Address (Word).
Contains the base address of logical serial device 1.
Initally the external asynchronous serial port or zero if it is not present at initialisation.
0404 - 0407 Reserved.
00408 Logical Printer Device 0 Base I/O Address (Word).
The base address of logical printer device 0.
Initally the System Parallel Printer port.
0040A Logical Printer Device 1 Base I/O Address (Word).
The base address of logical printer device 0.
Initially the external parallel printer port if it is present else it points to the external monochrome VDU controller if it is present. If neither is present it is initialised to zero.
0040C Logical Printer Device 2 Base I/O Address (Word).
Initially points to the external monochrome VDU controller if both the external parallel printer port and the external monochrome VDU controller are present. If either is not installed initialised to zero.
0040E Reserved (Word).
00410 System Configuration Status (Word).
Contains the System Configuration as follows:
Bit(s)Function
14 & 15Number of printers (1-3).
13 Not used.
12 Set if an optional games adapter is fitted.
11 Always zero.
9 & 10 Number of serial interfaces (1 or 2).
8 Not used.
7 Always zero.
6 Set if second floppy disk drive is fitted.
4 & 5 Default VDU mode.
2 & 3 Always set.
1 Set if 8087 NDP is installed.
0Always set.
00412 Reserved (Byte).
00413 Total RAM Size (Word).
Initially set to the number of 1K User (System) RAM Blocks installed. (640 for PC1640).
00415 Extra RAM Size (Word).
Initially set to the number of 1K User (System) RAM Blocks installed minus 64. (576 for PC1640).
00417 Key Toggles and Key States (Byte).
This byte is used to record the state of the Key Toggles (bits 4-7) and Key States (bits 0-3) as follows:
BitKey (Bit set if active)
7INS
6CAPS LOCK
5NUM LOCK
4SCROLL LOCK
3ALT
2CTRL
1LEFT SHIFT
0RIGHT SHIFT
00418 Keys down (Byte).
This byte is used to record the state of the toggle keys so that they do not repeat when the key is held down.
BitKey (Set if down)
7INS
6CAPS LOCK
5NUM LOCK
4SCROLL LOCK
Bit 3 is set when Pause state ([CTRL][NUM LOCK] is active. Bits 0 - 2 are unused and initially zeroed.
00419 Absolute Key Token Number (Byte).
When an absolute key token numbered is entered via ALT and the numeric key pad, this variable holds the current state of the token.
0041A Key Token Buffer Out Pointer (Word).
This variable holds the absolute offset to the next key token to be removed from the key token buffer.
Note that the ROS assumes that the buffer has a segment paragraph address of 0040h.
0041C Key Token Buffer In Pointer (Word).
This variable holds the absolute offset to the next empty position in the key token buffer. The buffer is empty when this location is the same as the Out Pointer.
0041E Key Token Buffer (Buffer).
The Key Token Buffer is a 16 word circular buffer used to store up to 16 key tokens.
0043E Drive Restore Flag (Byte).
Each floppy disk drive has a restore flag associated with it (bit 0 for drive 0 and bit 1 for drive 1).
If the restore flag for the specified drive is reset prior to any disk access (read/write/verify/format), then the restore command is issued to the FDC for that drive. If successful then the associated flag bit is set. When the initialise sub-function of the disk interrupt is called the restore flag is cleared.
Bit 7 is used for handling FDC hardware interrupts.
0043F Drive Motor Flag (Byte).
When a disk drive motor is running then either bit 0 or bit 1 will be set to which drive (0 or 1 respectively) is selected.
00440 Drive Motor Timeout Counter (Byte).
After each disk operation the the motor off timeout count is copied from the Disk Parameter table (See interrupt 30) into this variable. Each time the system clock interrupt is executed, the count is decremented. When it reaches zero the Drive Motor Flag is reset.
00441 Disk Status (Byte).
This byte holds the status returned by the last disk operation. (See section 2.3.11 Disk I/O Interrupt - Function 1.)
00442 FDC Results/HD Parameter Buffer (Buffer).
This seven byte buffer is used for storage of the FDC status information returned upon the completion of a disk I/O operation. It is also used by the Hard Disk BIOS ROM for call parameter storage.
00449 Current Video Mode (Byte).
The current Video mode from the last Int 16 setmode call is stored here.
0044A Visible Display Columns (Word).
The number of visible character columns currently being displayed is stored here.
0044C Video Display Page Size (Word).
This word holds the amount of Video RAM used by the ROM BIOS to display one page as defined below:
Mode(s)Size
0 & 12048
2 & 34096
4 - 616384
74096
138192
1416384
15 - 1632768
0044E Display Page Start Offset (Word).
Contains the origin of the currently active VDU display page.
00450 Cursor Address Buffer (Buffer)
This 16 byte buffer contains the row and column addresses for up to eight display pages. This is the limiting factor is the number of pages which can be supported by the video ROM BIOS routines.
00460 Cursor End Scan (Byte).
This byte contains the current end scan number that was programmed into the CRT controller.
00461 Cursor Start Scan (Byte).
This byte contains the current start scan number that was programmed into the CRT controller.
00462 Active Display Page (Byte).
This byte contains the selected display page number.
00463 CRTC I/O Address (Word).
This word contains the I/O address of the CRTC interface currently in use. (3B4 - Mono / 3D4 - Colour)
00465 Current Video Mode Control Register (Byte).
This byte contains the current contents of the Video Mode Control Register.
00466 Current CGA Colour Select Register (Byte).
This byte contains a copy of the data loaded into CGA colour select register.
0467-046B Reserved
0046C System Clock (Long Word).
The 32 bit system clock count
00470 24 Hour Flag (Byte).
When the system clock reaches 0001800B0h then it is cleared and this flag byte is set to 0FFh.
Note that reading the clock via interrupt 26 clears this flag.
00471 Break (Byte).
This byte is initially set to zero. Each time Break ([CTRL]+[NUM LOCK]) is detected, bit 7 is set. An application program using this bit to detect break must reset bit 7 when it detects the break event.
00472 System Reset Flag (Word).
When soft reset, [CTRL]+[ALT]+[DEL], is detected this location is set to 01234h prior to issuing a system reset. The power-up self test routine then recognizes this pattern and does not repeat the RAM tests. Setting 1235h prevents full hardware reset.
0474 Last Hard Disk I/O Completion Code.
This location is used by the Hard Disk BIOS ROM to store the last I/O operation's completion code.
0475 Hard Disk Drive Count.
This location is used by the Hard Disk BIOS ROM to store the number of drives on line.
0476-0477 Reserved for Hard Disk BIOS ROM.
0478 - 47A Logical Printer Device 0 - 2 Timeout Count (Buffer).
These timeout counts specify how long the ROS should wait in half second multiples, while trying to output a character to a logical printer channel. The are initially set to 20 (10 Second timeout).
0047B Reserved.
047C - 047D Logical Serial Device 0 - 1 Timeout Count (Buffer).
These timeout counts specify the length of the wait time half second intervals for character I/O to a particular logical serial channel. All counts are set to 1 (for a ) second timeout).
0047E Reserved.
00480 Key Token Buffer Start Address (Word).
Offset pointer to the start of the key token buffer.
Note that the assumed buffer segment paragraph address is 0040h.
00482 Key Token Buffer End Address (Word).
Offset pointer to the start of the key token buffer.
00484 Display Rows (Byte).
This location contains the number of character rows (less one) on the display screen.
00485 Character Points (Byte).
This location contains the current character matrix length in bytes.
00487 EGC Status (Byte).
This location is used by the IGA ROM BIOS to hold its current status information (Colour/Mono, Primary/Sec).
00488 Switches (Byte).
This location contains the current switch settings for the EGC control switches 1-4 in bits 0-3 (inverted). The upper four bits are ones.
00500 Print Screen Status (Byte).
ValueMeaning
0Print Screen completed OK.
1Print Screen in progress.
255Print Screen abandoned due to timeout.

2.5 Non-Volatile RAM (NVR)

The first 40 bytes of the battery backed RAM within the RTC hardware are for system parameter storage as follows:

Byte(s)UsageDefault
0-9Time and Date parameters.--
1 RTC Control Register A.070
11RTC Control Register B.002
12RTC Control Register C.--
13RTC Control Register D.--
14 - 19Time and Date when machine last used.--
20User RAM Checksum.
21 - 22Enter Key translation token.1C0D
23 - 24Forward Delete Key translation token.2207
25 - 26Joystick Fire Button 1 translation token.FFFF
27 - 28Joystick Fire Button 2 translation token.FFFF
29 - 30Mouse Button 1 translation token.FFFF
31 - 32Mouse Button 2 translation token.FFFF
33Mouse X direction scaling factor.00A
34Mouse Y direction scaling factor.00A
35Initial VDU mode and drive count020
36Initial VDU Character attributes.007
37Size of RAM disk in 2K blocks.000
38Initial system UART hardware setup byte.0E3
39Initial external UART hardware setup byte.0E3
40-63Unused--

Locations 0 to 13 are RTC hardware registers. Refer to 3.8 for an explanation of their usage and setup values.

After power-up or upon system reset the NVR is checksummed as part of initialisation. If the lower byte of the sum is not 0AAh or if the battery voltage low bit is set in the RTC status register, then the values in the default column are loaded into their respective locations and a warning message is displayed on the VDU. Those locations without defaults (marked with '--') are not changed.

The default key token value in bytes 25 to 32 is a special value (FFFF) which signals the keyboard hardware interrupt to ignore the key press rather than to insert the key token into the buffer.

The initial VDU mode (byte 35) is used to set up by the ROS on Power-Up Initialisation based on switch settings. It is then used to setup the system status-1 channel. (DDM - bits 4 & 5. See 1.8.2 for the valid combinations.) Bits 4 and 5 of byte 35 are set up correspondingly. Bit 6 is set if two drives are fitted else it is cleared. The default version of byte 35 has bit 6 set (two drives) and bits 4 & 5 set to 1 & 0 (Colour, alpha, 80 x 25 chars).

Bit 7 of byte 35 is used to enable or disable the serial I/O flow control option. Refer to section 2.3.12 for serial I/O and flow control details.

The initial VDU character attribute (byte 36) is written to all the attribute bytes of the VDU buffer when one of the alpha modes is selected. The default value selects a white foreground on a black background.

The RAM disk size (byte 37) is used by the MS-DOS operating system to specify RAM disk setup size.

The initial UART parameters (bytes 38 and 39) specifies 9600 baud, 8 data bits, 1 stop bit and no parity. These values are loaded to their respective serial channel by the Serial I/O Initialise sub-function (See Section 2.3.12: Interrupt 20).

2.6 ROS Messages

The ROS outputs a number of messages during Power-Up Self Test initialisation as detailed below. The language in which these messages are displayed is dependent of the three option links connected to the three least significant bits of the system printer port status. (See Table 3.1 for the interpretation of the three link bits.)

2.6.1 Non-Fatal ROS Messages

The following messages are displayed on the primary display screen (in the default display mode as specified by the NVR ) in the situations as described. The initialisation process is allowed to complete even though some of them may represent self test failures.

Please wait
This message is displayed on the top line of the screen after Power-Up or after a Soft Reset ([Ctrl]+[Alt]+[Del]) from the keyboard. A dot is displayed after it for each major hardware self test segment completed successfully.
Amstrad PC nnnK (Vv.i) Last used at hh:mm on dd mn yy
This message is displayed after the successful completion of all self tests, where:
nnn = the RAM size in kilobytes.
v.i = the ROS Version (v) and Issue (i) number.
hh:mm = the hours (hh) and the minutes (mm) of last on time.
dd mn yy = the day (dd), the calendar month (mn) and the year (yy) of the last date used.
Please fit new batteries
This message is displayed below the AMSTRAD PC message when it is noted that the RTC battery voltage low bit is set (indicating that there is either no battery installed or that the battery is very near to failing).
Check keyboard and mouse
This message is displayed when the keyboard self test firmware does not respond with the test pass (0AAh).
Insert a SYSTEM disk into drive A
Then press any key
This message set is displayed when the floppy disk bootstrap is unable to successfully read the bootstrap sector from drive A after 10 retries.
Error: External ROM checksum incorrect: ROM address = nnnnnh
This message is displayed when the checksum on an external ROM is not zero (See section 2.1 - 16). The physical address of the ROM is displayed in five (nnnnn) hexadecimal digits.

2.6.2 Fatal ROS Messages

The following messages indicate that a self test segment has failed and that initialisation cannot continue. In this situation the machine must be switched off and on again in order to reinitiate operations. The display is switched to 80 column alpha mode and cleared prior to displaying any of these messages.

When one of these failures occurs, no other testing is run since further testing may require use of the failing component. For this reason the system is placed in a non-interruptible loop. Failures of this sort are not expected to occur even intermittently. When any self test failure does occur it should be referred to a qualified AMSTRAD service facility for further diagnostic testing.


Section 1 Index Section 3