/* pcdos 2.0 interface procedures */
$save nolist

getdta: procedure pointer external;
end getdta;

getversion: procedure word external;
end getversion;

keep$process: procedure(exit_code,end_seg) external;
declare
	exit_code		byte,
	end_seg			selector;
end keep$process;

ctrl$break$check: procedure(Mode,Setting) external;
declare
	mode			byte,
	setting			byte;
end ctrl$break$check;

get$vector: procedure(vec_num) pointer external;
declare
	vec_num			byte;
end get$vector;

get$disk$free$space: procedure(drive,disk$info$p) external;
declare
	drive			byte,
	disk$info$p		pointer;
end get$disk$free$space;

mkdir: procedure(dir$p) byte external;
declare
	dir$p			pointer;
end mkdir;

rmdir: procedure(dir$p) byte external;
declare
	dir$p			pointer;
end rmdir;

chdir: procedure(dir$p) byte external;
declare
	dir$p			pointer;
end chdir;

creat: procedure(access,file$p,status$p) word external;
declare
	access			word,
	file$p			pointer,
	status$p		pointer;
end creat;


openf: procedure(access,file$p,status$p) word external;
declare
	access			word,
	file$p			pointer,
	status$p		pointer;
end openf;

closef: procedure(handle,status$p) external;
declare
	handle			word,
	status$p		pointer;
end closef;

readf: procedure(handle,count,buffer$p,status$p) word external;
declare
	handle			word,
	count			word,
	buffer$p		pointer,
	status$p		pointer;
end readf;

writef: procedure(handle,count,buffer$p,status$p) word external;
declare
	handle			word,
	count			word,
	buffer$p		pointer,
	status$p		pointer;
end writef;

unlink: procedure(file$p) byte external;
declare
	file$p			pointer;
end unlink;

lseek: procedure(handle,mode,foffset,status$p) dword external;
declare
	handle			word,
	mode			byte,
	foffset			dword,
	status$p		pointer;
end lseek;

chmod: procedure(funct,mode,file$p,statusp) byte external;
declare
	funct			byte,
	mode			byte,
	file$p			pointer,
	status$p		pointer;
end chmod;

get$current$dir: procedure(drive,string$p) byte external;
declare
	drive			byte,
	string$p		pointer;
end get$current$dir;

allocate$mem: procedure(size,status$p) selector external;
declare
	size			word,
	status$p		pointer;
end allocate$mem;

free$mem: procedure(memseg) byte external;
declare
	memseg			selector;
end free$mem;

setblock: procedure(memseg,newsize,max$blk$p) byte external;
declare
	memseg			selector,
	newsize			word,
	maxblkp			pointer;
end setblock;

loadf: procedure(file$p,lpb$p,mode) byte external;
declare
	file$p			pointer,
	lpb$p			pointer,
	mode			byte;
end loadf;

terminate$process: procedure(exitcode,origdata) external;
declare
	exitcode		byte,
	origdata		selector;
end terminate$process;

getreturncode: procedure byte external;
end getreturncode;

findfirst: procedure(attr,name$p,dta$p) word external;
declare
	attr			word,
	name$p			pointer,
	dta$p			pointer;
end findfirst;

findnext: procedure(dta$p) word external;
declare
	dta$p			pointer;
end findnext;

renamef: procedure(old$p,new$p) byte external;
declare
	old$p			pointer,
	new$p			pointer;
end renamef;

getftime: procedure(funct,handle,statusp) dword external;
declare
	funct			word,
	handle			word,
	statusp			pointer;
end getftime;
$restore
