Appendix C

Examples of Current Processor-Specific BIOS Calling Sequences
p.38

C.1 8080/Z-80

Entry Points:
All BIOS entry points are given as offsets from the beginning of the BIOS code space. These locations should contain a JMP instruction to the appropriate address in BIOS.

Parameters:
When parameters are not being passed in a specified register, they are pushed on the stack. Offsets from top-of-stack are given, recognizing that the stack grows down.

Completion Code:
Return in register C.

Calling Sequence:
RSP will use the CALL instruction to call BIOS. Thus the return address is at (SP),(SP)+1. All registers are available for use by BIOS. BIOS should clean off the stack before returning to RSP.

Entry PointOffset (hex)Parameters
CONSOLEREAD 00 return data byte in Reg C
CONSOLEWRITE 03 write data byte in Reg C
CONSOLEINIT 06 UIR pointer at (SP)+2,(SP)+3
PRINTERREAD 09 return data byte in Reg C
PRINTERWRITE 0C write data byte in Reg C
PRINTERINIT 0F UIR pointer at (SP)+2,(SP)+3
DISKREAD 12 block no. at (SP)+2,(SP)+3
byte count at (SP)+4,(SP)+5
data area addr. at (SP)+6,(SP)+7
drive no. at (SP)+8
CONTROL byte at (SP)+9
DISKWRITE 15 block no. at (SP)+2,(SP)+3
byte count at (SP)+4,(SP)+5
data area addr. at (SP)+6,(SP)+7
drive no. at (SP)+8
CONTROL byte at (SP)+9
DISKINIT 18 drive no. in Reg C UIR pointer at (SP)+2,(SP)+3
REMOTEREAD 1B return data byte in Reg C
REMOTEWRITE 1E write data byte in Reg C
REMOTEINIT 21 UIR pointer at (SP)+2,(SP)+3

p.39

C.2 6500 Series

Entry Points:
All BIOS entry points are given as offsets from the beginning of the BIOS code space. These locations should contain a JMP instruction to the appropriate address in BIOS.

Parameters:
When parameters are not being passed in a specified register, they are pushed on the stack. Offsets from the address pointed to by S (described as (S)) are given, recognizing that the stack grows down and that S normally points to the first available address below valid data.

Completion Code:
Return in register X.

Calling Sequence:
RSP will use the JSR instruction to call BIOS. Thus the return address is at (S)+1,(S)+2. All registers are available for use. The stack should be cleaned off by BIDS before returning to RSP.

Entry PointOffset (hex)Parameters
CONSOLEREAD 00 return data byte in Reg A
CONSOLEWRITE 03 write data byte in Reg A
CONSOLEINIT 06 UIR pointer at (S)+3,(S)+4
PRINTERREAD 09 return data byte in Reg A
PRINTERWRITE 0C write data byte in Reg A
PRINTERINIT 0F UIR pointer at (S)+3,(S)+4
DISKREAD 12 block no. at (S)+3,(S)+4
byte count at (S)+5,(S)+6
data area addr. at (S)+7,(S)+8
drive no. at (S)+9,(S)+A
CONTROL word at (S)+B,(S)+C
DISKWRITE 15 block no. at (S)+3,(S)+4
byte count at (S)+5,(S)+6
data area addr. at (S)+7,(S)+8
drive no. at (S)+9,(S)+A
CONTROL word at (S)+B,(S)+C
DISKINIT 18 drive no. in Reg A
UIR pointer at (S)+3,(S)+4
REMOTEREAD 1B return data byte in Reg A.
REMOTEWRITE 1E write data byte in Reg A.
REMOTEINIT 21 UIR pointer at (S)+3,(S)+4

p.40

C.3 6800

Entry Points:
All BIOS entry points are given as offsets from the beginning of the BIOS code space. These locations should contain a JMP (extended) instruction to the appropriate address in BIOS.

Parameters:
When parameters are not being passed in a specified register, they are pushed on the stack. Offsets from the address pointed to by SP (described as (SP)) are given, recognizing that the stack grows down and that SP normally points to the first available address below valid data.

Completion Code:
Return in register B.

Calling Sequence:
RSP will use the JSR instruction to call BIOS. Thus the return address will be at (SP)+1,(SP)+2. All registers are available for use. The stack should be cleaned off by BIOS before returning to RSP.

Entry PointOffset (hex)Parameters
CONSOLEREAD 00 return data byte in Reg A
CONSOLEWRITE 03 write data byte in Reg A
CONSOLEINIT 06 UIR pointer at (SP)+3,(SP)+4
PRINTERREAD 09 return data byte in Reg A
PRINTERWRITE 0C write data byte in Reg A
PRINTERINIT 0F UIR pointer at (SP)+3,(SP)+4
DISKREAD 12 block no. at (SP)+3,(SP)+4
byte count at (SP)+5,(SP)+6
data area addr. at (SP)+7,(SP)+9
drive no. at (SP)+9,(SP)+A
CONTROL word at (SP)+B,(SP)+C
DISKWRITE 13 block no. at (SP)+3,(SP)+4
byte count at (SP)+5,(SP)+6
data area addr. at (SP)+7,(SP)+9
drive no. at (SP)+9,(SP)+A
CONTROL word at (SP)+B,(SP)+C
DISKINIT 18 drive no. in Reg A
UIR pointer at (SP)+3,(SP)+4
REMOTEREAD 1B return data byte in Reg A
REMOTEWRITE 1E write data byte in Reg A
REMOTEINIT 21 UIR pointer at (SP)+3,(SP)+4

This page last regenerated Sun Jul 25 04:12:13 2010.