...
16
8
0
The function of the various components of the on-chip RAM space and the addressing modes by which they may be accessed are discussed ...
8051 C Compiler
... optimizations such as global sub expression elimination, loop optimizations (loop invariant, strength reduction of induction variables and loop reversing ), constant folding and propagation, copy propagation, ...
8051 IP Cores
... core
The R8051XC2 is the world's fastest configurable, single-chip 8-bit microcontroller core that can implement a variety of designs utilizing the MCS 51 instruction set.
A rich set of optional features ...
8051 Opcodes
... transfer instructions, boolean variable manipulation instructions and program and machine control instructions.
OpcodeBytesMnemonicOperands
00
1
NOP
01
2
AJMP
addr11 ...
8051 Microcontroller
8-bit Core Still in Use
The Intel 8051 (official designation for 8051 family is MCS-51) is a Harvard architecture, single chip microcontroller (µC) which was developed by Intel in 1980 for use ...
Turbo51 Methods
... XBP
sets XBP to point to the top of pushed parameters
pushes Self parameter which was passed in R3R2
pushes VMT parameter which was passed in R5R4
reserves space for local variables (increases ...
Reentrant Procedures in Turbo51
... point to the top of pushed parameters
reserves space for local variables (increases XSP accordingly)
On exit called procedure pops saved XBP and removes all pushed parameters from XDATA stack. XDATA ...
Turbo51 Compiler Internals
... Compiler Written in Turbo Pascal.
Data storage
All variables and typed constants are stored in little endian format.
Boolean variables
Boolean variables are stored as bits in bit-addressable ...
8051 Assembler Statements
... to be declared. You don't have to preserve any register and don't assume anything about register content before assembler statement. Byte variables AR0 to AR7 are direct locations for registers R0 to R7 ...
8051 Interrupts in Turbo51
... from any interrupt.
Warning: make sure that all varables that might be changed in the interrupt procedure are marked with the Volatile directive. This will tell the compiler that their value can be modified ...
Turbo51 Assembler Procedures
... variables for value storage), by reference (Turbo51 automatically creates static variables for pointer storage) or you can pass values in registers. Procedure's parameters can be accessed as local variables ...
Turbo51 System Functions
Pascal Compiler for 8051 Microcontrollers
Abs
Function Abs (X: Integer): Integer;
Function Abs (X: Real): Real;
Abs returns the absolute value of a variable. The result of the function ...
Turbo51 System Procedures
Pascal Compiler for 8051 Microcontrollers
Assign
Procedure Assign (Var F: File; ReadFunction: Function; WriteProc: Procedure);
Procedure Assign assigns read function and write procedure to ...
Turbo51 Variables
Pascal Compiler for 8051 Microcontrollers
Turbo51 variables can have memory type directives DATA, IDATA, or XDATA which overrides default memory type for variables (IDATA memory with addresses starting ...
Turbo51 Types
... or XDATA which overrides default memory type for variables and sets memory type to which this pointer will point to. Examples:
...
Turbo51 Files
... a simple example of calculator using files:
Compiled code looks like this:
With the Assign statement you assign ReadFromSerialPort and WriteToSerialPort procedures to the File variable SerialPort. ...
Turbo51 System Unit
Pascal Compiler for 8051 Microcontrollers
System unit implements Turbo51 runtime library and defines some special function registers (SFR), bits and interrupt addresses that are present in all microcontrollers ...
Turbo51 Memory Organization
... the $M directive or in one of the used units with the $XDATA directive.
DATA / IDATA Memory organization
If compiler switch $I is set then IDATA variables immediately follow DATA varables. If there ...
Compiler Switches And Directives
...
B-
Full boolean evaluation
C+
Show source lines in assembler file
DefaultFile Off
Assume CurrentIO system file variable is assigned with the actual IO procedures
I+
IDATA ...
Turbo51 Command Line Syntax
...
Make modified units
-MG
Set default memory type for global variables (memory type = D, I or X)
-ML
Set default memory type for local variables (memory type = D, I or X)
-MP
Set ...