To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

Turbo51
Developer(s)Igor Funa
Stable release
0.1.3.12 / February 1, 2012; 11 years ago (2012-02-01)
Operating systemWin32
TypeCompiler
LicenseFreeware
Websiteturbo51.com

Turbo51 is a compiler for the programming language Pascal, for the Intel MCS-51 (8051) family of microcontrollers. It features Borland Turbo Pascal 7 syntax, support for inline assembly code, source-level debugging, and optimizations, among others. The compiler is written in Object Pascal and produced with Delphi.

In the 1980s, Intel 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 and was created with the goal to make a Pascal compiler for MCS-51 processors that will be as fast as Turbo Pascal, will use the same syntax and will generate high quality optimized code.

Language dialect

Turbo51 uses Borland Turbo Pascal 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 [1..8] of Byte IDATA;

Features

  • Win32 console application
  • Fast single pass optimizing compiler
  • Borland Turbo Pascal 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;    { Timer1: no GATE, 8 bit timer, autoreload }
  SCON := %01010000;    { Serial Mode 1, Enable Reception }
  TI   := True;         { Indicate TX ready }
  TR1  := True;         { Enable timer 1 }

  Assign (SerialPort, WriteToSerialPort)
end;

begin
  Init;
  Writeln (SerialPort, 'Hello world!')
end.

See also

External links

This page was last edited on 17 September 2023, at 14:01
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.