Changeset 14 for branches/DelphiToC/UMainForm.pas
- Timestamp:
- Apr 9, 2009, 11:04:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UMainForm.pas
r12 r14 5 5 uses 6 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 Dialogs, StdCtrls, UPascalSource ;7 Dialogs, StdCtrls, UPascalSource, UPascalCompiler, UAssemblerSource; 8 8 9 9 type … … 38 38 I: Integer; 39 39 begin 40 Compiler.Compile(Memo1.Lines); 40 MainForm.Memo3.Clear; 41 Compiler.SourceCode.Assign(Memo1.Lines); 42 Compiler.Compile; 41 43 Memo2.Clear; 42 for I := 0 to Compiler.AssemblyCode.Count - 1 do 43 Memo2.Lines.Add(TAssemblerLine(Compiler.AssemblyCode[I]).AsString); 44 with TAssemblerProducer(Compiler.Producer) do 45 for I := 0 to AssemblyCode.Count - 1 do 46 Memo2.Lines.Add(TAssemblerLine(AssemblyCode[I]).AsString); 44 47 end; 45 48 … … 66 69 67 70 procedure TMainForm.FormShow(Sender: TObject); 68 var69 I: Integer;70 71 begin 71 72 Memo1.Lines.LoadFromFile('Example.pas'); 72 MainForm.Memo3.Clear; 73 Compiler.Compile(Memo1.Lines); 74 Memo2.Clear; 75 for I := 0 to Compiler.AssemblyCode.Count - 1 do 76 Memo2.Lines.Add(TAssemblerLine(Compiler.AssemblyCode[I]).AsString); 73 Button1Click(Self); 77 74 end; 78 75
Note:
See TracChangeset
for help on using the changeset viewer.