Please take a look at this code
Posted: Sun Aug 29, 2004 11:00 pm
program test;
uses crt;
var
F : File of byte;
FChar : byte;
Counter : Word;
begin
Clrscr;
Counter := 0;
Assign(F, 'c:\bp\bin\test.com');
Reset(F);
While not eof(F) do
begin
Read(F, FChar);
Mem[$1000:$100+Counter] := FChar;
Inc(Counter);
end;
{ execute program }
asm
mov bx, 1000h
mov ds, bx
mov es, bx
mov ss, bx
xor sp, sp
push es
push 100h
retf
end;
gotoxy(10,10);
writeln('We´r back');
PS. The com program finish with ax = 4ch int 21h it´s simple com program compiled in TASM with tlink /tdc xxxx
this code sometime works sometimes it freeze! any idea ?
uses crt;
var
F : File of byte;
FChar : byte;
Counter : Word;
begin
Clrscr;
Counter := 0;
Assign(F, 'c:\bp\bin\test.com');
Reset(F);
While not eof(F) do
begin
Read(F, FChar);
Mem[$1000:$100+Counter] := FChar;
Inc(Counter);
end;
{ execute program }
asm
mov bx, 1000h
mov ds, bx
mov es, bx
mov ss, bx
xor sp, sp
push es
push 100h
retf
end;
gotoxy(10,10);
writeln('We´r back');
PS. The com program finish with ax = 4ch int 21h it´s simple com program compiled in TASM with tlink /tdc xxxx
this code sometime works sometimes it freeze! any idea ?