BDOS Function Summary

CP/M 2.2, CP/M 3.0, MP/M 2.1

Compiled by Jim Lopushinsky

Notation:

.something means the address of something.
  Supported by (X)  
FUNCCP/M 2.2CP/M 3.0MP/M 2.1FUNCTION NAMEINPUT
PARAMETERS
RETURNED
VALUES
0XXX System Reset none none
1XXX Console Input none A = char
2XXX Console Output E = char none
3XX- Auxiliary Input none A = char
3--X Raw Console Input none A = char
4XX- Auxiliary Output E = char none
4--X Raw Console Output E = char none
5XXX List Output E = char none
6XXX Direct Console I/O E = 0FFH/
0FEH/
0FDH/
char
A = char/
status/
none
7X-- Get I/O Byte none A = IOBYTE
7-X- Auxiliary Input Status none A = 00/0FFH
8X-- Set I/O Byte E = IOBYTE none
8-X- Auxiliary Output Status none A = 00/0FFH
9XXX Print String DE = .String none
10XXX Read Console Buffer DE = .Buffer Characters in buffer
11XXX Get Console Status none A = 00/01
12XXX Return Version Number none HL = Version
13XXX Reset Disk System none see def
14XXX Select Disk E = Disk Number see def
15XXX Open File DE = .FCB A = Dir Code
16XXX Close File DE = .FCB A = Dir Code
17XXX Search for First DE = .FCB A = Dir Code
18XXX Search for Next none A = Dir Code
19XXX Delete File DE = .FCB A = Dir Code
20XXX Read Sequential DE = .FCB A = Err Code
21XXX Write Sequential DE = .FCB A = Err Code
22XXX Make File DE = .FCB A = Dir Code
23XXX Rename File DE = .FCB A = Dir Code
24XXX Return Login Vector none HL= Login Vector
25XXX Return Current Disk none A = Cur Disk #
26XXX Set DMA Address DE = .DMA none
27XXX Get Addr (Alloc) none HL= .Alloc
28XXX Write Protect Disk none none
29XXX Get R/O Vector none HL= R/O Vector
30XXX Set File Attributes DE = .FCB A = Dir Code
31XXX Get Addr (DPB) none HL= .DPB
32XXX Set/Get User Code E = 0FFH/
user number
A = Curr User/
none
33XXX Read Random DE = .FCB A = Err Code
34XXX Write Random DE = .FCB A = Err Code
35XXX Compute File Size DE = .FCB r0, r1, r2
36XXX Set Random Record DE = .FCB r0, r1, r2
37XXX Reset Drive DE = Drive Vector A = Err Code
38-XX Access Drive DE = Drive Vector none
39-XX Free Drive DE = Drive Vector none
40XXX Write Random with Zero Fill DE = .FCB A = Err Code
41--X Test and Write Record DE = .FCB HL= Err Code
41-X- Test and Write Record DE = .FCB A = 0FFH
42-XX Lock Record DE = .FCB HL = Err Code
43-XX Unlock Record DE = .FCB HL = Err Code
44-XX Set Multi-sector Count E = # Sectors A = Return Code
45-XX Set BDOS Error Mode E = Err Mode none
46-XX Get Disk Free Space E = Drive # Number of Free Sectors
47-XX Chain to Program E = Chain Flg none
48-XX Flush Buffers E = Purge Flg A = Err Flag
49-X- Get/Set System Control DE = .SCB PB Block A = Returned Byte
HL= Returned Word
50-X- Direct Bios Calls DE = .BIOS PB BIOS Return
59-X- Load Overlay DE = .FCB A = Err Code
60-X- Call Resident System Extension DE = .RSX PB A = Err Code
98-X- Free Blocks none none
99-X- Truncate File DE = .FCB A = Dir Code
100-XX Set Directory Label DE = .FCB A = Dir Code
101-XX Return Directory Label Data E = Drive A = Label Data
102-XX Read File Date Stamps and Password Mode DE = .FCB A = Dir Code
103-XX Write File XFCB DE = .FCB A = Dir Code
104-XX Set Date and Time DE = .DAT none
105-XX Get Date and Time DE = .DAT Date and Time
A = seconds
106-XX Set Default Password DE = .Passwrd none
107-XX Return Serial Number none DE = .Serial # Serial Number field
108-X- Get/Set Program Return Code DE = 0FFFFH/
Code
HL= Ret Code/
none
109-X- Get/Set Console Mode DE = 0FFFFH/
Mode
HL= Console Mode/
none
110-X- Get/Set Output Delimiter DE = 0FFFFH/
E = Delimiter
A = Output Delim/
none
111-X- Print Block DE = .CCB none
112-X- List Block DE = .CCB none
The MP/M functions
128--X Absolute Memory Request DE = .MD A = Err Code
129--X Relocatable Memory Request DE = .MD A = Err Code
130--X Memory Free DE = .MD none
131--X Poll E = Device none
132--X Flag Wait E = Flag A = Err Code
133--X Flag Set E = Flag A = Err Code
134--X Make Queue DE = .QCB none
135--X Open Queue DE = .UQCB A = Err Code
136--X Delete Queue DE = .QCB A = Err Code
137--X Read Queue DE = .UQCB none
138--X Conditional Read Queue DE = .UQCB A = Err Code
139--X Write Queue DE = .UQCB none
140--X Conditional Write Queue DE = .UQCB A = Err Code
141--X Delay DE = # ticks none
142--X Dispatch none none
143--X Terminate Process E = Term. Code none
144--X Create Process DE = .PD none
145--X Set Priority E = Priority none
146--X Attach Console none none
147--X Detach Console none none
148--X Set Console E = Console none
149--X Assign Console DE = .APB A = Err Code
150--X Send CLI Command DE = .CLICMD none
151--X Call Resident Sys Proc DE = .CPB HL= result
152-XX Parse Filename DE = .PFCB see def
153--X Get Console Number none A = Console #
154--X System Data Address none HL= Sys Data Addr
155--X Get Date and Time DE = .TOD date and time
156--X Return Process Descriptor none HL= PD Addr
157--X Abort Specified Process DE = .ABT PB A = Err Code
158--X Attach List none none
159--X Detach List none none
160--X Set List E = List # none
161--X Conditional Attach List none A = Err Code
162--X Conditional Attach Console none A = Err Code
163--X MPM Version Number none HL= Version #
164--X Get List Number none A = List #

Letzte Änderung: 4.Juni 2004