EXTERNAL PRODUCT SPECIFICATION
V5.0
APPROVED Sept. 05, 1982
Download Original document
TABLE OF CONTENTS
PREFACE
OVERVIEW OF 8051 ARCHITECTURE
Code Space
External Data Space
Internal ...
8051 C Compiler
... 8 bit MCUs
independent rule based peep hole optimizer.
a full range of data types: char (8 bits, 1 byte), short (16 bits, 2 bytes), int (16 bits, 2 bytes), long (32 bit, 4 bytes) and float (4 byte ...
8051 IP Cores
... several on-chip peripherals, like timers and counters, additionally there are 128 bytes of on-chip data memory and up to 4K bytes of on-chip program memory.
Features
8-bit CPU optimized for control ...
8051 Instruction Set
...
ADD A,#data
24
2
C, AC, OV
...
8051 Opcodes
List of All Instruction Types
The following table lists the 8051 instructions sorted by the opcode. The instructions can be divided into 5 categories: arithmetic instructions. logic instructions, data ...
8051 Microcontroller
... I/O, interrupt logic, timer, etc.) in a single package
8-bit data bus - It can access 8 bits of data in one operation (hence it is an 8-bit microcontroller)
16-bit address bus - 64 kB each ...
Turbo51 Methods
Pascal Compiler for 8051 Microcontrollers
Methods are always reentrant. Before a call to the method is made the following is pushed on the XDATA stack:
Address for String result (for functions ...
Reentrant Procedures in Turbo51
Pascal Compiler for 8051 Microcontrollers
For reentrant procedures all parameters are pushed on XDATA stack. Functions return simple result in first register set (R5R4R3R2). For functions which return ...
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
...
Use DMTINDEX to get the index of TObjectType.DynamicMethod.
For reentrant procedures and functions the following symbols are defined:
@LOCALS
@LOCALS returns offset of local variables on XDATA ...
Turbo51 System Functions
... has the same type as its argument, which can be Integer or Real.
Addr
Function Addr (X: T_DATA_Variable): ShortPtr;
Function Addr (X: T_XDATA_Variable): Pointer;
Function Addr (X: TProcedure): ...
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
... (points to IDATA), Pointer (points to XDATA) and CodePointer (points to CODE). Similarly there are ShortPChar, PChar and CodePChar. Pointers to ordinal types can have memory type directive DATA, IDATA ...
Turbo51 Constants
... are not possible because boolean data can only be stored as bits in bit-addressable DATAmemory (wich is available in all 8051 derivatives), but you can use ByteBool or similar typed constants. Some examples: ...
Turbo51 Objects
Pascal Compiler for 8051 Microcontrollers
Objects are data structures that merge pascal records and procedures called methods, i.e. data and code together. In order to use objects in Turbo51 you need ...
Turbo51 Memory Organization
Pascal Compiler for 8051 microcontrollers
CODE memory
By default the maximum code size is $10000 bytes (64 KB). This can be changed in the main program with the $M directive.
IDATA memory
By ...
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
...
Generate absolute instructions (ACALL/AJMP)
B-
Full boolean evaluation
C+
Show source lines in assembler file
I+
IDATA variables can start below $80 (as indirectly addressed DATA ...
License Agreement
... will Igor Funa be liable for any damages, including but not limited to any lost profits, lost savings or any incidental or consequential damages, whether resulting from impaired or lost data, software ...
Turbo51 FAQ
...
Boolean variables use BIT (boolean) memory in 8051. If you would like to use boolean variables in DATA or XDATA memory (or even in CODE memory as typed constant) then you have two possibilities:
Use ...