Turbo51 is a
compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
for the
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
Pascal, for the
Intel MCS-51
The Intel MCS-51 (commonly termed 8051) is a single-chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton.. Intel's original versions w ...
(8051) family of
microcontroller
A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
s. It features
Borland
Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
7 syntax, support for inline
assembly code, source-level
debugging
In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs.
For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
, and
optimizations, among others. The compiler is written in
Object Pascal
Object Pascal is an extension to the programming language Pascal (programming language), Pascal that provides object-oriented programming (OOP) features such as Class (computer programming), classes and Method (computer programming), methods.
T ...
and produced with
Delphi
Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
.
In the 1980s,
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
introduced the 8051 as the first member of the MCS-51 processor family. Today, hundreds of cheap derivatives are available from tens of manufacturers. This makes the architecture very interesting for professionals and hobbyists. It is surprising that this 8-bit architecture is still in use today, and is still so popular. Of all 8051 compilers, several widely used
C compilers exist, but only a few Pascal compilers. Turbo51 is available as
freeware
Freeware is software, often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for the free ...
and was created with the goal to make a Pascal compiler for MCS-51 processors that will be as fast as
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
, will use the same syntax and will generate high quality
optimized code.
Language dialect
Turbo51 uses
Borland
Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
7 dialect. The syntax was extended with some constructs to support specific features of MCS-51 processors.
Var RS485_TX: Boolean absolute P3.2;
I2C.SDA: Boolean absolute P3.7;
I2C.SCL: Boolean absolute P3.4;
EEPROM_Data: TEEPROM_Data XDATA absolute 0;
ModuleAddress: Byte;
RX_LedTimer: Byte;
TX_LedTimer: Byte;
SavedOutput: TOutputData IDATA;
OutputsAuxData: Array ..8of Byte IDATA;
Features
*
Win32
The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
console application
* Fast single pass optimizing compiler
*
Borland
Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
7 syntax
* Full floating point support
* Mixed
Pascal and assembly programming
* Full use of register banks
* Advanced multi-pass
optimizer
* Smart linker
* Generates compact high quality code
* Output formats: Binary, Intel HEX, OMF51
Object Module Format
* Assembly source code generation
"Hello World" example
Program HelloWorld;
Const
Osc = 22118400;
BaudRate = 19200;
BaudRateTimerValue = Byte (- Osc div 12 div 32 div BaudRate);
Var SerialPort: Text;
Procedure WriteToSerialPort; Assembler;
Asm
CLR TI
MOV SBUF, A
@WaitLoop:
JNB TI, @WaitLoop
end;
Procedure Init;
begin
TL1 := BaudRateTimerValue;
TH1 := BaudRateTimerValue;
TMOD := %00100001;
SCON := %01010000;
TI := True;
TR1 := True;
Assign (SerialPort, WriteToSerialPort)
end;
begin
Init;
Writeln (SerialPort, 'Hello world!')
end.
See also
*
Intel 8051
The Intel MCS-51 (commonly termed 8051) is a single-chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton.. Intel's original versions w ...
*
Pascal (programming language)
Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named after Frenc ...
*
Comparison of Pascal and C
*
Borland
Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
*
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
External links
*
{{Pascal programming language family
Pascal (programming language) compilers
Pascal programming language family
Object-oriented programming languages
Pascal (programming language) software