CP/M pages
Home -> CP/M -> Amstrad XBIOS

Amstrad Extended BIOS calls

The Amstrad extended BIOS is accessed using the USERF BIOS function. To call it, use:

	CALL	USERF
	DEFW	value

The value is a 16-bit address in memory bank 0 (user programs normally run in bank 1). The (documented) XBIOS jumpblock starts at 0080h and runs up to 00EEh.

My implementation of CP/M on the PCW16 supports calls from TE_ASK up to BANK2_RUN_ROUTINE.

Since the address of USERF may vary from computer to computer, the following subroutine should be used to access it in a machine-independent way:

USERF:	PUSH	HL
	PUSH	DE
	LD	HL,(1)
	LD	DE,57h
	ADD	HL,DE
	POP	DE
	EX	(SP),HL
	RET

Frequently, these routines will require an address to be passed to them. Unless they are being called from within Bank 0, the address should be above 0C000h so that it is visible to the routine.

The alternate register set is preserved during the call, but the values of the alternate registers will not be available to the called routine.


DD INIT - 0080h

Initialise the floppy disc driver.

When called, this resets the floppy drives to their default parameters (for 3" or 3.5" drives, depending on computer), and turns the disc motor off. Corrupts AF,BC,DE,HL.


DD SETUP - 0083h

Set up the floppy disc driver.

Entered with: HL=address of parameter block, above 0C000h. Corrupts AF, BC, DE and HL. The parameter block is formed:

	DB	motor on timeout, 10ths of a second
	DB	motor off timeout, 10ths of a second
	DB	write current off time in 10 uS units
	DB	head settle time, milliseconds.
	DB	step rate, milliseconds.
	DB	head unload delay in 32ms units.
	DB	(2*head load delay in 4ms units)+non DMA mode.

In recent PCW versions (roughly, 1.11 / 2.11 or later): If HL=0, set up only one drive — the one whose number is given in C. DE holds the address of the parameter block.


DD READ SECTOR - 0086h

Read a floppy disc sector.

Entered with: B=CP/M bank, C=disc unit(0 or 1), D=track(0 based), E=sector (0 based), HL=load address within bank, IX=address of drive XDPB.

Returns: Carry set if OK, reset if error. A=error number 0-9. BC, DE and HL are corrupted.

Error codes are:

0: Drive not ready
1: Write protected
2: Seek fail
3: Data error
4: No data
5: Missing address mark
6: Bad format
7: Unknown error
8: Media changed
   -- If a disc operation has failed, a secondary check is performed. This
     attempts to read the sector ID of the sector the user was trying to 
     read. If the top 2 bits of the sector number do not match the top 2
     bits of the requested sector, or the cylinder number does not match
     the requested cylinder, then the disc is assumed to have been changed
     (eg: from PCW to CPC, or single-track to double-track) and this error
     is returned. 
9: Unsuitable media

DD WRITE SECTOR - 0089h

Write a floppy disc sector.

Entered with: B=CP/M bank, C=disc unit(0 or 1), D=track(0 based), E=sector (0 based), HL=address within bank of sector, IX=address of drive XDPB.

Returns: Carry set if OK, reset if error. A=error number 0-9. BC, DE and HL are corrupted.


DD CHECK SECTOR - 008Ch

Verify a floppy disc sector.

Entered with: B=CP/M bank, C=disc unit(0 or 1), D=track(0 based), E=sector (0 based), HL=address within bank of sector, IX=address of drive XDPB.

Returns: If error: Carry reset, A=error number 0-9. If no error, Carry set, Zero set if sector matched sector in memory. Otherwise Zero reset. BC, DE and HL are corrupted.


DD FORMAT - 008Fh

Format a floppy disc track.

Entered with: B=CP/M bank, C=disc unit(0 or 1), D=track(0 based), E=filler byte, HL=address within bank of format data, IX=address of drive XDPB.

Returns: If error: Carry reset, A=error number 0-9. If no error, Carry set. BC, DE and HL are corrupted.

The format data area is a list of sectors; each entry occupies four bytes. The entry for a sector is laid out as:

	DB	track number
	DB	head number
	DB	sector number
	DB	physical sector shift. 0 => 128, 1 => 256, 2 => 512...

DD LOGIN - 0092h

Log in a floppy disc.

Entered with: C=disc unit(0 or 1), IX=address of drive XDPB.

Returns: If OK, carry set, A=format type, BC corrupt, DE=size of double-bit allocation vector, HL=size of hash table, XDPB initialised. If error, A=error number, BC DE HL XDPB corrupt.

Format types are:

0: PCW Single Sided Single Density
1: CPC System format
2: CPC Data format
3: PCW Double Sided Double Density

DD SEL FORMAT - 0095h

Preload an XDPB with a standard format.

Entered with: A=format IX=address of destination XDPB.

Returns: If OK, carry set, A=format type, BC corrupt, DE=size of double-bit allocation vector, HL=size of hash table, XDPB initialised. If error, A=error number, BC DE HL XDPB corrupt.

Format types are:

0: PCW standard SS/SD, 173k 
1: CPC System format,  169k
2: CPC Data format,    180k 
3: PCW standard DS/DD, 706k 

DD DRIVE STATUS - 0098h

Get the drive status.

Entered with: C=disc unit(0 or 1); bit 2 of C contains head number.

Returns HL corrupt, A=uPD765a status register 3:

bit 7: ?
bit 6: Write protected
bit 5: Ready            if bits 5 and 6 are zero the drive is not present.
bit 4: Track 0
bit 3: ?
bit 2: Head
bit 1: Unit high bit (always zero, Units 2-3 are not implemented).
bit 0: Unit low bit

DD READ ID - 009Bh

Read a sector ID.

Entered with: C=disc unit(0 or 1); D=track(0 based); IX=address of XDPB.

Returns: If OK, Carry set, A=physical sector number. If error, Carry reset, A=error number. Always, BC and DE are corrupt and HL=address of FDC output buffer:

	DB	number-of-result-bytes
	DB	result bytes

DD L DPB - 009Eh

Initialise a DPB from a boot record.

Entered with: HL=address of boot record. IX=address of DPB.

Returns: If carry set, OK, A=disc type (as for DD LOGIN). If carry clear, A=error number. BC DE and HL are always corrupted.

Note: This function always fails on the CPC6128.


DD L XDPB - 00A1h

Initialise an XDPB from a boot record.

Entered with: HL=address of boot record. IX=address of XDPB.

Returns: If carry set, OK, A=disc type (as for DD LOGIN). If carry clear, A=error number. BC DE and HL are always corrupted.

Note: This function always fails on the CPC6128.


DD L ON MOTOR - 00A4h

Turn the floppy drive motors on.

Preserves all registers and flags. Waits until the motors have spun up to speed before returning.


DD L T OFF MOTOR - 00A7h

Start countdown for turning the motors off.

Preserves all registers and flags.


DD L OFF MOTOR - 00AAh

Switch the floppy drive motors off immediately.

Corrupts AF, BC, DE and HL.


DD L READ - 00ADh

Execute a uPD765A read command.

Entered with: HL=address of input buffer.

	DB	CP/M bank
	DW	address of data buffer within bank
	DW	number of data bytes
	DB	number of uPD765a command bytes
	DB	uPD765a command bytes

Returns AF, BC, DE corrupt; HL=address of results buffer:

	DB	number of result bytes
	DB	result bytes

The floppy drive motors must be running.


DD L WRITE - 00B0h

Execute a uPD765A write, scan or format command.

Entered with: HL=address of input buffer.

        DB      CP/M bank
        DW      address of data buffer within bank
        DW      number of data bytes
        DB      number of uPD765a command bytes
        DB      uPD765a command bytes   

Returns AF, BC, DE corrupt; HL=address of results buffer:

   
        DB      number of result bytes 
        DB      result bytes    

The floppy drive motors must be running.


DD L SEEK - 00B3h

Seek to a track.

Entered with: C=disc unit+4*head, D=cylinder number, IX=address of XDPB.


CD SA INIT - 00B6h

Initialise serial port.

Entered with: A=mode or command. If A is a mode, D=no. of stop bits, E=parity, H=number of receiver data bits, L=number of transmitter data bits.

Corrupts AF, BC, DE and HL.

Modes:

 00h - No handshake
0FFh - Handshake
0FEh - Interrupt, no handshake (on Spectrum +3, behaves as 00h).
0FDh - Interrupt, handshake (on Spectrum +3, behaves as 0FFh).

Commands:

80h - Drop DTR
7Fh - Raise DTR
7Eh - Drop RTS (no effect on Spectrum +3)
7Dh - Raise RTS (no effect on Spectrum +3)

Number of stop bits:

D=0   1   stop bit
D=1   1.5 stop bits (on Spectrum +3, behaves as D=2)
D=2   2   stop bits

Parity:

E=0   None
E=1   Odd
E=2   Even

Note: The CPC6128, and the early PCW8256 BIOS 1.2, only support A=0 or A=0FFh. They do not support interrupt-driven mode or drop/raise commands.


CD SA BAUD - 00B9h

Set SIO baud rate.

Entered with: H=receiver baudrate, L=transmitter baudrate.

Corrupts AF, BC, DE, HL.

Baud rates are numbered from 1-15; see here.


CD SA PARAMS - 00BCh

Get SIO parameters.

Returns registers containing parameters as set by CD SA INIT.


TE ASK - 00BFh

Get screen size and cursor position.

Returns:

B=top row of viewport in physical screen coordinates       
C=left column of viewport in physical screen coordinates 
D=height of viewport-1
E=width of viewport-1
H=cursor row, viewport coordinates
L=cursor column, viewport coordinates

On the CPC6128, BC is left untouched; the viewport always starts at (0,0). Implemented on the PCW16.


TE RESET - 00C2h

Reset the terminal emulator.

Corrupts AF, BC, DE and HL.

Resets viewport to full screen, character set to Language 0 (USA), no special effects, screen colours to default, cursor enabled etc. Can be called if the screen has been altered by other programs than the CRT driver.

Implemented on the PCW16.


TE STL ASK - 00C5h

Is the status line enabled?

Returns: A=0 if status line disabled, 0FFh if enabled. Zero false if status line visible, true if not visible.

On the +3, the status line can be enabled and invisible.

Implemented on the PCW16, though nothing is ever displayed on the status line.


TE STL ON OFF - 00C8h

Turn the status line on or off.

Entered with: A=0 for off or 0FFh for on. Corrupts F, BC, DE, HL.

The status line, if enabled, displays BIOS error messages and the status of the PCW's built-in printer. If it is disabled, BIOS error messages go to the main screen.

A similar status line is used in DOS Plus, where it lists the names of programs running in the background.

Implemented on the PCW16, though nothing is ever displayed on the status line.


TE SET INK - 00CBh

Set screen palette.

Entered with: A=ink id; B=colour; C=flash value.

Corrupts AF, BC, DE and HL.

The ink number for B on the CPC, +3 and PCW16 is computed thus:

Bits 0-1: Blue
Bits 2-3: Red
Bits 4-5: Green
Bits 6-7: Ignored
The RGB values are:
00  Colour is off
01  Colour is on, low intensity [CPC]/ normal intensity [Spectrum and PCW16]
10  Colour is on, normal intensity
11  Colour is on, high intensity

BUG: This function does not work under PCW or +3 CP/M (and probably not CPC CP/M either), because the values in B and C are always reset to zero before they are examined. Colours can still be set using the escape sequences ESC b and ESC c, but this does not allow flashing colours.

To correct this bug, replace the byte sequence 3D 28 F0 3C 28 E6 with 00 00 00 00 00 00. In a running system this is in bank 0, two bytes after the address in 00CCh.


TE SET BORDER - 00CEh

Set screen border colour.

Entered with: B=colour, as above.

Corrupts AF, BC, DE and HL.

On the PCW, bit 7 of B is set for reversed video (dark text on light background) and bit 6 is set if the screen is to be blank.

Implemented on the PCW16.


TE SET SPEED - 00D1h

Set colour flash speed.

Entered with: H=time spent in main colour, L=time spent in alternative colour, specified in 50ths of a second.

Corrupts AF and HL.

Has no effect on a Spectrum +3 or a PCW16.


KM SET EXPAND - 00D4h

Set a keyboard expansion string.

Entered with: B=string number, 80h-9Eh; C=length of string; HL=address of string.

Returns: If OK, Carry set. If string too long or B invalid, Carry clear. A, BC, DE, HL corrupted.

Implemented on the PCW16.


KM SET KEY - 00D7h

Set what character a keypress translates to.

Entered with: B=ASCII value, C=key number, D=bitmap of shift states.

Corrupts AF and HL.

On the PCW16, the key number is the Rosanne code corresponding to that keynumber and shift state (except for keypad keys).

Special ASCII values are:

If a bit is set in the shift states bitmap, it indicates that the table for that combination of shift keys should be modified. The bits mean:

0 - Unshifted keys
1 - SHIFT [PCW & PCW16], CAPS SHIFT   [Spectrum +3]
2 - ALT   [PCW],         SYMBOL SHIFT [Spectrum +3], CTRL       [PCW16]
3 - SHIFT+ALT [PCW],     EXTEND       [Spectrum +3], SHIFT+CTRL [PCW16]
4 - EXTRA [PCW],                                     TASK       [PCW16]

KM KT GET - 00DAh

Get a character/key number.

On the CPC6128:

Returns C=character, B=0.

On the PCW:

If key pressed, returns C=key number, B=shift bitmap. If not, returns carry false, C corrupt, B=shift bitmap. Corrupts A.

The shift bitmap is:

Bit 0   not defined
Bit 1   EXTRA
Bit 2   Caps lock
Bit 3   Generated by a key repeat
Bit 4   Num lock
Bit 5   SHIFT
Bit 6   Shift lock
Bit 7   ALT

Bug: In PCW CP/M 1.8, bits 2 and 3 are swapped (so they behave like the Spectrum +3, shown below).

On the Spectrum +3:

If key pressed, returns C=key number, B=shift bitmap. If not, returns carry false, C corrupt, B=shift bitmap. Corrupts A.

The shift bitmap is:

Bit 0   not defined
Bit 1   not defined
Bit 2   Generated by a key repeat
Bit 3   Caps lock
Bit 4   Num lock
Bit 5   CAPS SHIFT
Bit 6   Shift lock
Bit 7   SYMBOL SHIFT

On the PCW16:

If key pressed, returns C=keycode, B=Rosanne shift state. If not, returns BC corrupt. Always corrupts A.


KM KT PUT - 00DDh

Simulate a keypress..

Entered with: B=shift bitmap, C=key number.

On the PCW, the shift bitmap is:

Bit 0   not defined
Bit 1   EXTRA
Bit 2   Caps lock 
Bit 3   Generated by a key repeat
Bit 4   Num lock
Bit 5   SHIFT
Bit 6   Shift lock
Bit 7   ALT

On the +3, the shift bitmap is:

Bit 0   not defined
Bit 1   EXTEND 
Bit 2   Generated by a key repeat
Bit 3   Caps lock 
Bit 4   Num lock
Bit 5   CAPS SHIFT
Bit 6   Shift lock
Bit 7   SYMBOL SHIFT

On the CPC, this function has no effect.

The main use of this function is to change the state of Caps/Num/Shift lock; use KM KT PUT to change the lock, and KM KT GET to swallow the simulated keypress. The PCW shift lock is implemented in hardware and so cannot be changed by this call.

On the +3, Shift lock operates on the CAPS SHIFT key.

On the PCW16, B and C are a Rosanne shift bitmap and keycode respectively. The Caps/Num/Shift locks are not implemented.


KM SET SPEED - 00E0h

Set the keyboard reset speed..

Entered with: H=initial delay, L=subsequent delay.

Corrupts AF.

Both delays are given in fiftieths of a second. 0 means 256, ie keys hardly ever repeat. The initial delay takes place before a key repeats at all; the subsequent delay takes place between further repetitions.

Implemented on the PCW16.


CD VERSION - 00E3h

Get version numbers. Supported on the PCW16..

Returns: A=machine type, B=BIOS major version number, C=BIOS minor version number, HL=machine specific version number.

Machine types are:

0  CPC6128
1  PCW8000/9000/10 series
3  Spectrum +3
65 PCW16 (65 = 'A', ie "Anne")

The BIOS major version number is 2 for a PCW9512 or 9512+, 1 otherwise.

On a CPC6128, the machine specific version number is the ROM version.

On recent versions of PCW CP/M (1.11 / 2.11 or later), H=0 and L is a bitmap of hardware detected:

On earlier PCW versions this word is zero.

On the PCW16, the machine specific version number is the address in bank 0 of a zero-terminated ASCII string containing the Rosanne version.

Bug: There exists a version of PCW CP/M that signs on as 1.5 but returns 1.4 to CD VERSION. It may have been produced by binary patching, since the only differences from stock 1.4 are for USA localisation.


CD INFO - 00E6h

Get system information..

Returns:

Implemented on the PCW16, but HL returns 0.

The buffer table holds addresses of memory that is available to CP/M for disc buffers. Memory in this table is used by DISCKIT on the CPC6128 and Spectrum +3 when copying from one disc to another.

	DB	CP/M bank, 0FFh for end of table
	DW	start
	DW	length

The drive equipment flags implemented on recent PCW CP/M versions are:

Bits 0-1: Sidedness
		0: Unknown
		1: Single-sided
		2: Double-sided
Bits 2-3: Track spacing
		0: Unknown
		1: Single track
		2: Double track
Bit 5:    Drive type
		0: 3"
		1: 3.5"

Example values:

These values correspond to those returned by the DD EQUIPMENT call on the Spectrum +3 under +3DOS. DD EQUIPMENT (and DD TEST UNSUITABLE and DD ASK 1) are implemented on these versions of PCW CP/M , but there are no jumpblock entries for them.


SCR RUN ROUTINE - 00E9h

Run a routine with the screen memory visible.

Entered with: BC=address of routine. DE, HL, IX and IY are passed to it.

Returns BC corrupt; AF, DE, HL, IX, IY as returned by routine.

This routine does not exist in CPC6128 CP/M. Instead of using:

	LD	BC,routine
	CALL	USERF
	DEFW	00E9h

the routine

	CALL	USERF
	DEFW	routine

should be used. On the Spectrum +3, the above calls have an identical effect. On the PCW, however, the screen environment is unique and can only be accessed using this function.

The screen is located at:

The character sets are located at:


FIND FID - 00ECh

Find the address of an installable device driver. Supported on the PCW16.

Entered with: DE=address of name (8 characters).

Returns: Carry true if driver present, HL=address of driver in bank 0 (PCW16: bank 2). Else carry false, HL corrupt. Always corrupts A,BC,DE.

This routine is only present in +3 CP/M, PCW CP/M versions higher than about 1.7, and PCW16 CP/M. It should not be called otherwise!

Some FID names you can try are:

^Z^Z^Z^Z^Z^Z^Z^Z
This somewhat oddly-named FID (the name is 8 bytes containing 1Ah) is the driver used by the Cirtech Flash Disk or Gem hard disk. It has this name because it is inserted into memory by the Cirtech boot file (FD.SYS / HD.SYS) rather than the FID loader. It doesn't exist on disc and doesn't have a filename.
HDRIVER
This is Cirtech's hard disc driver if you booted from a floppy containing HDRIVER.FID. I have had to use this technique once to repair a damaged EMT file on my hard drive.
FDRIVER
This is the equivalant of HDRIVER for Cirtech's Flash Disk.
MASTER
Although I have never seen this, I believe this is the file which allows a PCW to act as the master computer on a LocoLink connection (with another PCW as the slave).
RAMDISC
Spectrum +3 RAM disc driver.
SAVER
PCW or Spectrum +3 screensaver.
SERIAL
Spectrum +3 8250 UART driver, for third-party modem interfaces.
ADRIVE
PCW16 floppy disc driver.
MDRIVE
PCW16 RAMdisc driver.
CRTPLUS
PCW16 screen and keyboard driver; versions also exist for Spectrum and PCW.
TSL!WEB
Hard disk driver for the Timatic Systems Limited Winchester Expansion Box. This has a jumpblock at FID + 20h which is used by the provided utilities. The first five entry points are standard disk driver functions; the entry points that follow are specific to the Timatic driver.
0120	JP	FID_D_LOGON
0123	JP	FID_D_READ
0126	JP	FID_D_WRITE
0129	JP	FID_D_FLUSH
012C	JP	FID_D_MESS
012F	JP	send_command	;Send an arbitrary SASI command to the 
				;drive. IX->6-byte SASI command.
				;       IY=data transfer address.
0132	JP	park_drive	;Park the drive.
0135	JP	format		;Format the drive.
0138	JP	read_multi	;As FID_D_READ, but A = count of 
				;sectors to transfer and B is
				;ignored (uses last selected drive)
013B	JP	write_multi	;As FID_D_WRITE, but A = count of
				;sectors to transfer and B is
				;ignored (uses last selected drive)
013E	JP	read_ptable	;As FID_D_READ, but always reads
				;partition table and B is ignored.
0141	JP	write_ptable	;As FID_D_READ, but always writes
				;partition table and B is ignored.
0144	JP	diag_read	;Test read of all sectors on drive	

FID file format.


[PCW16] BANK2 RUN ROUTINE - 00EFh

Run a routine with bank 2 visible.

Entered with: BC=address of routine. DE, HL, IX and IY are passed to it.

Returns BC corrupt; AF, DE, HL, IX, IY as returned by routine.

This works identically to SCR RUN ROUTINE, but calls code in bank 2.


CPC extra calls

The following calls are present in version 1.0 of the CPC XBIOS, and are included simply for completeness. The names are my own invention:

00E9h:	(CD COLDBOOT) Initialise the XBIOS. 
		DE = address of CP/M clock tick function (called once per
			second).
		HL = address of SIO device entry in dev table. If serial port
			is not present, this will be set to zero.
		Returns DE = address of first directory BCB
			HL = address of first data BCB
			 A = 0FFh if serial port is present, else 0

00ECh:	(CD I STATUS)  Is character device B ready to input?
00EFh:	(CD INPUT)     Input character from device B
00F2h:	(CD O STATUS)  Is device B ready to output?
00F5h:	(CD OUTPUT)    Output character C to device B
00F8h:	(CD DEVINIT)   Initialise device C, B=baudrate
00FBh:	(MSG RETRYMSG) Display error message, ask whether to retry, ignore or 
                       cancel.
00FEh:	(MSG INSERT)   Ask user to insert the disc for A: or B:.
0101h:	(MSG SYSMSG)   Output a system message.

PCW v1.4 extra calls

The following calls are present in version 1.4 of the PCW XBIOS, and are included simply for completeness. As before, the names are my own invention:

00ECh:	(CD COLDBOOT) Initialise the XBIOS. 
		DE = address of CP/M clock tick function (called once per
			second).
		HL = address of SIO device entry in dev table. If CPS8256
			is not present, this will be set to zero.
		Returns DE = address of first directory BCB
			HL = address of first data BCB
			 A = 0FFh if CPS8256 is present, else 0

00EFh:	(CD I STATUS)  Is character device B ready to input?
00F2h:	(CD INPUT)     Input character from device B
00F5h:	(CD O STATUS)  Is device B ready to output?
00F8h:	(CD OUTPUT)    Output character C to device B
00FBh:	(CD DEVINIT)   Initialise device C, B=baudrate
00FEh:	(MSG RETRYMSG) Display error message, ask whether to retry, ignore or 
                       cancel.
0101h:	(MSG INSERT)   Ask user to insert the disc for A: or B:.
0104h:	(MSG SYSMSG)   Output a system message.
0107h:	(KL MOVEMEM)   Used by XMOVE and MOVE.
	Enter with HL' = block(s) to copy from (L' is the first block, H'
                         is the second).
		   HL  = source address within the block given by L'
		   DE' = block(s) to copy to (E' is the first block, D' is 
                         the second).
		   BC = count of bytes to copy - max 16k.

PCW (later versions) extra calls

The following calls are present in (at least) versions 1.7H to 1.15 and 2.1 to 2.15 of the PCW XBIOS. They are included for completeness and for comparison with the 1.4 calls above. The names are my own invention:

00EFh:  (CD SA INTSTATUS) Return serial port interrupt status.
	A = wait/ready bits at last character read.
	B = number of characters in the input buffer.
	C = free space in the input buffer.
	If the serial port is not in interrupt mode, B = C = 0FFh.
00F2h:  (CD COLDBOOT) Initialise the XBIOS. DE = address of CP/M clock tick 
        function (called once a second).
00F5h:  (SVC_D_CHANGED) report that
        the disc in a drive may have been changed.
00F8h:  (DD CALLDRIVER) Call a third-party disc driver. Configures memory so 
	that the driver and the block of memory it needs to access can see 
        each other.
	 Top word of stack = address of routine (must be below 4000h, or 
	                     above 0C000h).
	 A = CP/M bank containing the data to be transferred.
	 Note that this can't be called through USERF, because USERF doesn't
	 preserve the top word of the stack.
00FBh:  (MSG RETRYMSG) Display error message, ask whether to retry, ignore or 
        cancel.
00FEh:  (MSG INSERT)   Ask user to insert the disc for A: or B:.
0101h:  (MSG SYSMSG)   Output a system message.
0104h:  (KL MOVEMEM)   Used by XMOVE and MOVE.
	Enter with HL' = block(s) to copy from (L' is the first block, H'
                         is the second).
		   HL  = source address within the block given by L'
		   DE' = block(s) to copy to (E' is the first block, D' is 
                         the second).
		   BC = count of bytes to copy - max 16k.

Spectrum +3 v1.0 extra calls

The Spectrum +3 implements a similar set of calls to the 'later PCW' ones:

00EFh:  (CD SA INTSTATUS) Return serial port interrupt status.
	A = wait/ready bits at last character read.
	BC = 0.
00F2h:  (CD COLDBOOT) Initialise the XBIOS. DE = address of CP/M clock tick 
        function (called once a second).
00F5h:  (SVC_D_CHANGED) report that
        the disc in a drive may have been changed.
00F8h:  (DD CALLDRIVER) Call a third-party disc driver. 
	 Top word of stack = address of routine (in bank 0).
         The word at 0FFF8h gives the address of a 512-byte buffer in bank
	 0, which will be passed to the driver in IY.
	 Note that this can't be called through USERF, because USERF doesn't
	 preserve the top word of the stack.
00FBh:  (MSG RETRYMSG) Display error message, ask whether to retry, ignore or 
        cancel.
00FEh:  (MSG INSERT)   Ask user to insert the disc for A: or B:.
0101h:  (MSG SYSMSG)   Output a system message.

Note that on the +3 there is no memory transfer call at 0104h. Unlike the PCW, the +3 can't do a direct copy between arbitrary memory banks, so the BIOS has to do it via an intermediate buffer, a few bytes at a time.


Return to archive listing