+ implemented dos.getfattr and setfattr for i8086-msdos

git-svn-id: trunk@24696 -
This commit is contained in:
nickysn 2013-06-01 10:17:00 +00:00
parent b9dacce654
commit 7d757cc5ed

View File

@ -636,15 +636,41 @@ end;
procedure getfattr(var f;var attr : word); procedure getfattr(var f;var attr : word);
begin begin
{TODO: implement} dosregs.dx:=Ofs(filerec(f).name);
runerror(304); dosregs.ds:=Seg(filerec(f).name);
if LFNSupport then
begin
dosregs.ax:=$7143;
dosregs.bx:=0;
end
else
dosregs.ax:=$4300;
msdos(dosregs);
LoadDosError;
Attr:=dosregs.cx;
end; end;
procedure setfattr(var f;attr : word); procedure setfattr(var f;attr : word);
begin begin
{TODO: implement} { Fail for setting VolumeId. }
runerror(304); if ((attr and VolumeID)<>0) then
begin
doserror:=5;
exit;
end;
dosregs.dx:=Ofs(filerec(f).name);
dosregs.ds:=Seg(filerec(f).name);
if LFNSupport then
begin
dosregs.ax:=$7143;
dosregs.bx:=1;
end
else
dosregs.ax:=$4301;
dosregs.cx:=attr;
msdos(dosregs);
LoadDosError;
end; end;