Add BIOS entrypoints to README

This commit is contained in:
Nero 2019-10-28 09:45:15 +00:00
parent f81de2bfe8
commit 74fce7191f

View File

@ -30,12 +30,88 @@ the minimum memory requirement may be less than 64k.
|... |var |Heap, growing up|
|0x0100|var |Transient Program Area|
|0x0080|128 bytes|Command line and disk buffer|
|0x0008|120 bytes|BIOS data area|
|0x006C|20 bytes |Pre-filled FCB 2|
|0x005C|16 bytes |Pre-filled FCB 1|
|0x0008|84 bytes |BIOS data area, specific to BIOS implementation|
|0x0005|3 bytes |Jump code for BDOS|
|0x0004|1 bytes |default drive for BDOS|
|0x0003|1 bytes |may be used as iobyte by BIOS|
|0x0004|1 byte |default drive for BDOS|
|0x0003|1 byte |may be used as iobyte by BIOS|
|0x0000|3 bytes |Jump to BIOS warm boot entry point / program exit|
## BIOS Interface
The entry points for the BIOS start at its base address.
Each entry point is offset a multiple of 3 from the beginning of the BIOS.
### BIOS+0 Boot
The bootloader jumps here after loading the BIOS.
### BIOS+3 Warm boot
Reload the BDOS from disk, and call its entry point.
The jump opcodes at the start of memory are re-initialized.
### BIOS+6 Console status
Checks if keyboard input is available.
Returns FFh in AL (A) is character is available, 00 if not.
### BIOS+9 Console read
Read a character from keyboard from AL (A).
This call does not return until a character is available.
### BIOS+12 Console write
Write character in DL (E) to the display.
### BIOS+24 Seek disk to zero
Seek current disk (selected with the following call) to its beginning.
This is a commonly a no-op.
### BIOS+27 Select disk
Select disk by the number given in CL (C).
This is equivalent to the DL number for the PC BIOS Int 13h.
### BIOS+30 Set track
Select track number for next disk i/o via register CX (BC).
For CHS-adressed disks, the track number is the current cylinder multiplied by the number of heads plus the current head number.
For disks with one side, the cylinder number is equal to the track number.
### BIOS+33 Set disk sector
Select sector on the current track in register CX (BC). This parameter is 1-based, this means the first sector is sector 1. The value 0 is invalid.
For CHS-adressed floppies, the number of sectors per track might vary depending on the inserted floppy disk, even for the same drive.
### BIOS+36 Set disk transfer address
Set buffer for disk operations via register CX (BC).
This is somewhat incompatible with CP/M versions since on modern systems, the sector size is 512 instead of 128 bytes.
Setting it to the default value of 0x80 (which is the standard disk buffer for CP/M) will overwrite the first 0x180 bytes of the transient program area.
The BDOS is expected to do deblocking to provide the application program with 128-byte disk i/o.
### BIOS+39 Read sector
Read sector previously specified.
AL (A) is non-zero error code on failure.
The error codes are implementation-specific.
### BIOS+42 Write sector
Write sector previously specified.
AL (A) is non-zero error code on failure.
The error codes are implementation-specific
## Application program interface
It is using the `call 5` convention with CP/M compatible syscall numbers.