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 that ...
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 l ...
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
, 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 pop ...
(8051) family of
microcontroller A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs ( processor cores) along with memory and programma ...
s. 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 In computer programming and software development, debugging is the process of finding and resolving ''bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
, 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 Work ...
and produced with
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracl ...
. In the 1980s,
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
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 ...
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 Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
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 Object Module Format (OMF) may refer to: * Object Module Format (ICL), an object-file format for the ICL VME operating system * Object Module Format (Intel), an object-file format for Intel 8080/8085, 8086 (and successors) and 8051 family, also a ...
* 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 * 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