... discussion outlines those aspects of the 8051 architecture relevant to linking and locating - the memory model and the addressing modes.
The memory model of the 8051 family consists of three non-overlapping ...
... for memory mapped peripherals
T8032: Wishbone bus interface
Features
All peripherals/interrupts implemented
Single cycle per byte fetch
Supports synchronous RAM/ROM
...
... Carry Not Set
JNZ - Jump if Accumulator Not Zero
JZ - Jump if Accumulator Zero
LCALL - Long Call
LJMP - Long Jump
MOV - Move Memory
MOVC - Move Code Memory
MOVX ...
... of RAM and ROM
On-chip RAM - 128 bytes ("DATA Memory")
On-chip ROM - 4 kB ("CODE (program) Memory")
Four 8-bit bi-directional input/output ports
UART (serial port)
Two 16-bit ...
... STACK low memory
Pushed address for String result (for functions which return String)
Pushed parameters
Outer procedure's XBP (if there is outer procedure) ...
... stack during reentrant procedure call looks like this:
XDATA STACK low memory
Pushed address for String result (for functions which return String)
...
... DATA memory wich is available in all 8051 derivatives. Boolean variables can not be passed by reference (8051 has no instruction to reference bit variable by address) and can not be passed as parameter ...
... point operations, file I/O, string manipulations, large memory moves, etc.
Example of interrupt declaration:
Compiled program above looks like this:
...
... memory.
Copy
Function Copy (Const S: String; Index: Byte; Count: Byte): String;
Copy returns a string which is a copy if the Count characters in S, starting at position Index. If Count is larger ...
... Dispose (P: Pointer);
Procedure Dispose (P: TypedPointer; Destuct: Procedure);
The first form Dispose releases the memory allocated with a call to New. The released memory is returned to the heap. ...
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 ...
... (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 ...
Pascal Compiler for 8051 Microcontrollers
Turbo51 constants can be of any ordinal type. Typed constants are stored in CODE memory (in little endian format) and can not be modified. Boolean typed constants ...
... XDATA memory. The syntax is equivalent to that in Borland Turbo Pascal 7. Turbo51 supports:
Inheritance
Static and dynamic objects
Private fields
Constructors and destructors
Static, virtual ...
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 ...
... [CODE Size], [XDATA Start], [XDATA Size], [Heap Size]
Memory sizes (only in program), default values: $0000 $10000 $0000 $0000 $0000
IDATA
IDATA memory available
XDATA
XDATA memory available ...
...
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 ...
... by many hobby and professional embedded system engineers worldwide. I never imagined that Turbo51 will be used to compile such huge projects that would require changes in internal memory manager. I also ...
... on how to write effective code and become familiar with the compiler.
General
License Agreement
Syntax
Compiler switches and directives
Memory organization
System unit
Files
Objects
Declarations ...
...
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 ...