Assembler (Fasm911) - Fujitsu MB91150 Series Hardware Manual

32-bit microcontroller
Table of Contents

Advertisement

D.2

Assembler (fasm911)

When programming in the assembler language for the FR Series, note the following for
the little-endian area with respect to the items below:
• Sections
• Data access
I Sections
The little-endian area is used mainly for data exchange with CPUs employing the little-endian
system. Define this area as a data section without initial values.
If a code, stack, or data section with initial values is specified in the little-endian area, the
integrity of access operations of the MB91150 cannot be assured.
[Example]
/* Correct section definition for the little-endian area */
Little_Word:
Little_Half:'
Little_Byte:
I Data access
To execute a data access to the little-endian area, the data value can be coded without
considering that the value is allocated in the endian area. However, be sure to use a data
access matching the data length in the little-endian area.
[Example]
LDI
LDI
LDI
LDI
LDI
LDI
*/ 32-bit data is accessed with the ST (or LD) instruction.
ST
*/ 16-bit data is accessed with the STH (or LDH) instruction. */
STH
*/ 8-bit data is accessed with the STB (or LDB) instruction.
STB
In the MB91150, if a data access operation that does not match the data length in the little-
endian area, the integrity of the results cannot be assured. For example, if two consecutive 16-
bit data items are accessed at the same time with a 32-bit access instruction, the integrity of the
data values cannot be assured.
.SECTION Little_Area, DATA, ALIGN=4
.RES.W
1
.RES.H
1
.RES.B
1
#0x01020304, r0
#Little_Word, r1
#0x0102, r2
#Little_Half, r3
#0x01, r4
#Little_Byte, r5
r0, @r1
r2, @r3
r4, @r5
APPENDIX D Notes on Using the Little-Endian Area
*/
*/
463

Advertisement

Table of Contents
loading

Table of Contents