HOME

TheInfoList



OR:

Turbo51 is a
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs tha ...
for the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
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 were po ...
(8051) family of microcontrollers. It features Borland
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
7 syntax, support for inline
assembly Assembly may refer to: Organisations and meetings * Deliberative assembly, a gathering of members who use parliamentary procedure for making decisions * General assembly, an official meeting of the members of an organization or of their representa ...
code, source-level debugging, and optimizations, among others. The compiler is written in
Object Pascal Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods. The language was originally developed by Apple Computer as ''Clascal'' for the Lisa Worksh ...
and produced with Delphi. In the 1980s,
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
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, most 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 t ...
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 Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
, will use the same syntax and will generate high quality optimized code.


Language dialect

Turbo51 uses Borland
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
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 Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
console application * Fast single pass optimizing compiler * Borland
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
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 were pop ...
*
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 in honour of ...
*
Comparison of Pascal and C The computer programming languages C and Pascal have similar times of origin, influences, and purposes. Both were used to design (and compile) their own compilers early in their lifetimes. The original Pascal definition appeared in 1969 and a fi ...
* Borland *
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...


External links

* {{Pascal programming language family Pascal (programming language) compilers Pascal programming language family Object-oriented programming languages compilers and interpreters Pascal (programming language) software