Howto create TMP-files using int xxh?
Is this what you're looking for? It's set up for text files, but should work for other file types.
{-------------------------------------------------------------------------}
{ }
{ Open a new, temporary, text file for write-only access. The file }
{ name is returned to the caller. }
{ }
{-------------------------------------------------------------------------}
procedure OpenScratch (var FPtr : text;
var FNam : string;
var Success : boolean);
var
Regs : registers;
Handle : integer;
Len : byte;
begin
GetDir (0, FNam);
FNam := FNam + Chr(0);
with Regs do
begin
DS := Seg(FNam[1]);
DX := Ofs(FNam[1]);
AH := $5A;
CX := $0000;
MsDos (Regs);
Success := Flags and FCarry = 0;
if Success then
begin
Handle := AX;
Len := length(FNam);
Len := Len + 12;
FNam[0] := chr(Len);
AX := $3E00;
BX := Handle;
MsDos (Regs);
{$I-}
Assign(FPtr, FNam);
Append(FPtr);
Success := IOResult = 0;
{$I+}
end;
end;
end;
--
* Bill Decker | Customary disclaimer ... etc. *
* < It isn't procrastination if you put it off right away. > *
*--------------------------------------------------------------------*