Browse Source

* use Ofs() instead of typecasting to word for getting the offset of a pointer

git-svn-id: branches/i8086@24068 -
nickysn 12 years ago
parent
commit
27559aa5f8
2 changed files with 4 additions and 4 deletions
  1. 2 2
      rtl/msdos/sysfile.inc
  2. 2 2
      rtl/msdos/system.pp

+ 2 - 2
rtl/msdos/sysfile.inc

@@ -40,7 +40,7 @@ begin
   regs.BX := h;
   regs.BX := h;
   regs.CX := len;
   regs.CX := len;
   regs.DS := DSeg;
   regs.DS := DSeg;
-  regs.DX := Word(addr);
+  regs.DX := Ofs(addr^);
   MsDos(regs);
   MsDos(regs);
   if (regs.Flags and fCarry) <> 0 then
   if (regs.Flags and fCarry) <> 0 then
   begin
   begin
@@ -59,7 +59,7 @@ begin
   regs.BX := h;
   regs.BX := h;
   regs.CX := len;
   regs.CX := len;
   regs.DS := DSeg;
   regs.DS := DSeg;
-  regs.DX := Word(addr);
+  regs.DX := Ofs(addr^);
   MsDos(regs);
   MsDos(regs);
   if (regs.Flags and FCarry) <> 0 then
   if (regs.Flags and FCarry) <> 0 then
   begin
   begin

+ 2 - 2
rtl/msdos/system.pp

@@ -155,10 +155,10 @@ begin
 { Call 'Get Volume Information' ($71A0) }
 { Call 'Get Volume Information' ($71A0) }
   regs.AX:=$71a0;
   regs.AX:=$71a0;
   regs.ES:=DSeg;
   regs.ES:=DSeg;
-  regs.DI:=Word(@buf);
+  regs.DI:=Ofs(buf);
   regs.CX:=32;
   regs.CX:=32;
   regs.DS:=DSeg;
   regs.DS:=DSeg;
-  regs.DX:=Word(RootName);
+  regs.DX:=Ofs(RootName^);
   MsDos_Carry(regs);
   MsDos_Carry(regs);
 { If carryflag=0 and LFN API bit in ebx is set then use Long file names }
 { If carryflag=0 and LFN API bit in ebx is set then use Long file names }
   CheckLFN:=(regs.Flags and fCarry=0) and (regs.BX and $4000=$4000);
   CheckLFN:=(regs.Flags and fCarry=0) and (regs.BX and $4000=$4000);