Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# berotinypascal
# BeRoTinyPascal
A self-hosting capable tiny pascal compiler for the Win32 x86 platform

## License

******************************************************************************
* zlib license *
*============================================================================*
* *
* Copyright (C) 2006-2016, Benjamin Rosseaux (benjamin@rosseaux.com) *
* *
* This software is provided 'as-is', without any express or implied *
* warranty. In no event will the authors be held liable for any damages *
* arising from the use of this software. *
* *
* Permission is granted to anyone to use this software for any purpose, *
* including commercial applications, and to alter it and redistribute it *
* freely, subject to the following restrictions: *
* *
* 1. The origin of this software must not be misrepresented; you must not *
* claim that you wrote the original software. If you use this software *
* in a product, an acknowledgement in the product documentation would be *
* appreciated but is not required. *
* 2. Altered source versions must be plainly marked as such, and must not be *
* misrepresented as being the original software. *
* 3. This notice may not be removed or altered from any source distribution. *
* *
******************************************************************************

## General guidelines for code contributors

1. Make sure you are legally allowed to make a contribution under the zlib license.
2. The zlib license header goes at the top of each source file, with appropriate copyright notice.
3. After a pull request, check the status of your pull request on http://github.com/BeRo1985/berotinypascal .
4. Write code, which is compatible with Delphi 7-XE7 and FreePascal >= 3.0 and even with BeRoTinyPascal itself, so don't use generics/templates, operator overloading and another newer syntax features than Delphi 7 and BeRoTinyPascal have support for that
5. Don't use any libraries/units except the RTL system unit functions.
6. Make sure the code compiles with Delphi 7, FreePascal >= 3.0 and with BeRoTinyPascal itself.
Binary file added bin/btpc.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions examples/maketest.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
btpc < test.pas > test.exe
36 changes: 36 additions & 0 deletions examples/test.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
program Test;
{$ifdef fpc}
{$mode delphi}
{$endif}
{$ifdef Win32}
{$define Windows}
{$endif}
{$ifdef Win64}
{$define Windows}
{$endif}
{$ifdef WinCE}
{$define Windows}
{$endif}
{$ifdef Windows}
{$apptype console}
{$endif}
{$r+,s+}

procedure x;
procedure y;
begin
WriteLn('BLA');
end;
begin
y;
end;

var a,b:integer;
begin
for a:=1 to 16 do begin
for b:=16 downto 1 do begin
WriteLn(a:5,b:5);
end;
end;
x;
end.
Loading