- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
procedure TForm1.Button1Click(Sender: TObject);
var
outfi:string;
begin
if OpenDialog1.Execute then
begin
outfi:=sysutils.ExtractFilePath((OpenDialog1.FileName))+'/program.asm';
windows.CreateFile(PChar(outfi),0,0,0,0,0,0);
AssignFile(outPutFile,outfi);
Rewrite(outPutFile);
Append(outPutFile);
AssignFile(inPutFile,OpenDialog1.FileName);
Reset(inPutFile);
init();
writeLn(outPutFile,prologMemo.Lines.GetText());
doprogram();
writeLn(outPutFile,epilogMemo.Lines.GetText());
CloseFile(outPutFile);
CloseFile(inPutFile);
ShellExecute( 0, 'open', PChar(outfi), nil, nil, SW_SHOWNORMAL);
end;
end;