Amstrad XT pages
Home -> Amstrad XTs -> The ROM BIOS

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:

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:

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

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:

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