There seems to be an undocumented constant eof
in asm block context. This was tested using Delphi 7.
program TestEof;
{$APPTYPE CONSOLE}
var
example : Integer;
begin
asm
mov example, eof
end;
writeln(example);
readln;
end.
This prints out 14
.
Where does that constant eof
and it's value value $0E
or 14
come from?
EDIT: this is the compilation result
...
call @InitExe
// mov example, eof
mov [example], $0000000e
// writeln(example)
mov eax, [$004040a4]
mov edx, [example]
call @Write0Long
call @WriteLn
call @_IOTest
// readln;
...
system.pas
as well. SeeTextOpen
function. After//if (f.Buffer[i] == eof)
. LineCMP byte ptr [ESI].TTextRec.Buffer[EAX],eof
. – Celebrate