The ROM BIOS (ROS)
The ROS in Amstrad XTs tends, for the most part, to be very compatible with the genuine IBM ROM BIOS. However, some systems do provide extra services, usually on the 'cassette' interrupt (INT 15h).
The ROS in all Amstrad XTs except the PC5086 appears to have evolved gradually from one model to the next, and so various features remain constant. The PC5086 has a BIOS written by Chips & Technologies, which shares no code with the other models.
PC1512
The 1512 ROS provides these functions:
- AH=0
- Read mouse X and Y counters.
- AH=1
- Read a byte from the non-volatile RAM.
- AH=2
- Write a byte to the non-volatile RAM.
- AH=3
- Set plane read mask in 640x200 graphics mode.
- AH=4
- Set plane read mask in 640x200 graphics mode.
- AH=5
- Set border colour in 640x200 graphics mode.
- AH=6
- Get ROS version number (check for PC1512/PC1640 ROS).
For full details of these calls, see the technical manual, section 2.3.12.
PC1512 versions
Three versions of the PC1512 ROS are known to exist. Changes in version 2 include:
- Fixes a bug with the midnight rollover flag returned by INT 1Ah; this was only getting set every 1475 days, not once a day.
- Adds support for displaying BIOS messages on an external EGA or MDA card, rather than just the built-in screen.
- Various other changes in initialisation code, keyboard support and IBM compatibility.
The third version (3.2) is nearly identical to the 3.0 supplied with the PC1640 below, and almost certainly supports both types of hardware.
PC1640
The PC1640 ROS provides the same INT 15h functions as the PC1512:
- AH=0
- Read mouse X and Y counters.
- AH=1
- Read a byte from the non-volatile RAM.
- AH=2
- Write a byte to the non-volatile RAM.
- AH=3
- Set plane read mask (on PC1512 hardware).
- AH=4
- Set plane read mask (on PC1512 hardware).
- AH=5
- Set border colour (on PC1512 hardware).
- AH=6
- Get ROS version number (check for PC1512/PC1640 ROS).
For full details of these calls, see the technical manual, section 2.3.13. Note that AH=3 to AH=5 are implemented even though they have no effect on PC1640 video hardware. The PC1640 ROS is very nearly identical to version 2 of the PC1512 ROS, and by the look of it ought to work if fitted in a PC1512 (just as the later 3.2 does). I have not, however, put this to the test.
PPC512, PPC640, PC20, PC200
These systems do not provide any services on INT 15h. The interrupt returns leaving all registers untouched.
PPC512/640 versions
Three versions of the PPC ROS are known to exist (1.8, 1.9 and 2.1). The differences are minor and appear to be bugfixes.
PC200 versions
Two versions of the PC200 ROS are known to exist (1.2 and 1.5). Version 1.5 has the following differences:
- Supports booting from an external floppy drive.
- Assigns LPT ports in a different order; if there is an MDA card present, it will become LPT1 and the system printer port will be LPT2.
- Precautions are taken against CGA 'snow', presumably in case the IDA is disabled and a plug-in CGA card is fitted.
PC2086, PC3086
The ROS supports INT 15h with AH=0C0h ("Get configuration table"). The table it returns is as follows:
dw 8 ;Size of table (8 bytes). db 0FAh ;Model (PS/2 model 25 or 30) db 0 ;Submodel (PS/2 model 30) db 1 ;BIOS revision (2nd) db 0B0h ;Feature byte 10110000b ; * DMA channel 3 used by hard drive BIOS ; * RTC installed ; * INT 15h/AH=4Fh called on INT 09h
Bug: Although the table claims to be 8 bytes long, it is in fact only 4 bytes. The next 4 are a subroutine. If the subroutine is interpreted as feature bytes, it looks as if the PC2086/3086 support 32-bit DMA, data streaming, various INT 15h/INT 16h functions, SCSI, loading the BIOS from floppy, flash EPROM and so on. None of these is actually supported.
2086 / 3086 notes
- There are very few changes between the 2086 and 3086 ROS, so the 2086 ROS may well work in a 3086 or vice versa. The main difference is the meaning the ROS assigns to the motherboard links LK1 and LK2; on the 3086, they specify whether the floppy drives have changelines.
- Although INT 15h with AH=6 (get ROS version) no longer works, the code to return the version number is still present in the ROM. It just can't be called.
- As on the later PC200 ROM, precautions are taken against CGA 'snow' and an add-on MDA card will be assigned to LPT1.
- At the end of the table of error messages is one reading 'IBMUS NON CARBORUNDUM'.
PC5086
The ROS supports INT 15h with AH=0C0h ("Get configuration table"). The table it returns is as follows:
dw 8 ;Size of table (8 bytes). db 0FAh ;Model (PS/2 model 25 or 30) db 0 ;Submodel (PS/2 model 30) db 0 ;BIOS revision (1st) db 20h ;Feature byte 00100000b ; * RTC installed db 0,0,0,0 ;Other feature bytes
It also supports INT 15h with AH=0C2h (PS/2 mouse control) and AH=80h-92h (joystick support and OS hooks).
BIOS identifiers
PCs have a machine type at 0FFFFEh and a BIOS date at 0FFFF5h. For Amstrad XTs, these are:
- PC1512, PC1640, PPC, PC20: Machine type code is 0FFh. The byte at 0FFFF5h seems to be used to make the ROS checksum come out right; it varies from ROM to ROM. There is no BIOS date, except in the PC1512 3.2 BIOS, where it is 11/01/89.
- PC2086: BIOS date is 08/30/88, machine type code is 0FFh (PC).
- PC3086: BIOS date is 03/01/90, machine type code is 0FFh (PC).
- PC5086: BIOS date is 04/23/91, machine type code is 0FEh (XT).
Multilingual messages
The PC1512/1640/PPC/PC20 all have seven sets of localised messages, selected using option links LK1-LK3 on the motherboard. At FC00:3EAA is a (near) pointer to the master table of these messages, with eight entries, one for each possible combination of the option links.
The PC2086/3086, despite only having English messages, still retain the master table. All eight entries now point to the same set of messages.
The following entry points are present in all systems bar the PC5086:
- FC00:0000
- Cold start, as FFFF:0000
- FC00:205B
- Cold start, as FFFF:0000
- FC00:2833
- Process a scancode, as if in INT 9 handler. AH = scancode. Will return as from INT 9, by popping AX, BX, CX, DX and DS and doing an IRET.
- FC00:2838
- Beep. BX=frequency, CX=duration. Call with a far call.
- FC00:283D
- Reboot, as if CTRL+ALT+DEL pressed.
-
- FC00:3EAC
- Display a system error message. Enter with
AX = message ID, other parameters in BX, CX, DX, DS as needed. This is
called with a far call.
0 => "Amstrad PC nnnk" DX = memory size in K 1 => "hh:mm on dd mmm yyy" BH = hours BCD, BL = minutes BCD CH = day BCD, CL = month 0-11 DX = year BCD 2 => "Last used at hh:mm on dd mmm yyy" Parameters as for AX=1 3 => "Please set time and date" 4 => "Please fit new batteries" 5 => "Please check keyboard and mouse" 6 => "Insert a system disk into drive A" 7 => "Error: External ROM checksum incorrect" DS:BX = address of ROM 8 => "Error: Faulty"
- FC00:3EB0: Report faulty hardware.
AX = Message ID, 0 - 0Fh. DS:BX = address of message table for current language (one of the eight entries from the master table mentioned above). ES:DI = destination address of message in video RAM. ES should always be 0B000h, since some versions write the message at ES:DI and ES:(DI XOR 8000h).
CGA font
All machines bar the PC5086 use the PC1512 sans-serif font in CGA graphics modes.
The PC5086 has a serif font that's similar to, but not the same as, the original IBM PC.
John Elliott 13 June 2011