var
buff: array [1..512] of byte;
procedure readdisk(drv,cy,head,sec:word;VAR result:boolean);
begin
reg.DX:=head*256+drv; { DX赋值 }
reg.CX:=((cy div 256)*64+sec)+(cy mod 256)*256; { CX赋值 }
reg.BX:=ofs(buff[1]); { BX赋值为buff的偏移地址 }
reg.AX:=$0201; { AX赋值 }
reg.es:=seg(buff[1]); { ES赋值为buff的段地址 }
intr($13,reg); { 调用DOS中断13H }
if reg.ah=0 {根本返回值判断AH}
then result:=true else result:=false;
end;
有人能看懂吗?
buff: array [1..512] of byte;
procedure readdisk(drv,cy,head,sec:word;VAR result:boolean);
begin
reg.DX:=head*256+drv; { DX赋值 }
reg.CX:=((cy div 256)*64+sec)+(cy mod 256)*256; { CX赋值 }
reg.BX:=ofs(buff[1]); { BX赋值为buff的偏移地址 }
reg.AX:=$0201; { AX赋值 }
reg.es:=seg(buff[1]); { ES赋值为buff的段地址 }
intr($13,reg); { 调用DOS中断13H }
if reg.ah=0 {根本返回值判断AH}
then result:=true else result:=false;
end;
有人能看懂吗?