Ignore:
Timestamp:
Feb 13, 2012, 9:47:18 AM (12 years ago)
Author:
chronos
Message:
  • Added: List of supported compiler targets.
  • Added: Action to compile and run project.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/UCompilerDelphi.pas

    r20 r25  
    2525  inherited Create;
    2626  Name := 'Delphi';
     27  SourceExtension := '.pas';
     28  CompiledExtension := '.exe';
    2729end;
    2830
     
    5355  AddLine('  Memory: array[0..30000] of Byte;');
    5456  AddLine('  Pos: Integer;');
     57  AddLine('  ReadChar: Char;');
    5558  AddLine('begin');
    5659  Inc(Indent);
     60  AddLine('Pos := 0;');
    5761  I := 1;
    5862  while (I <= Length(Source)) do begin
     
    7579      end;
    7680      '.': AddLine('Write(Chr(Memory[Pos]));');
    77       ',': AddLine('Read(Chr(Memory[Pos]));');
     81      ',': AddLine('Read(ReadChar); Memory[Pos] := Ord(ReadChar);');
    7882      '[': begin
    7983        AddLine('while Memory[Pos] <> 0 do begin');
Note: See TracChangeset for help on using the changeset viewer.