
463
APPENDIX D Notes on Using the Little-Endian Area
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
■
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]
■
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]
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.
/* Correct section definition for the little-endian area */
.SECTION Little_Area, DATA, ALIGN=4
Little_Word:
.RES.W 1
Little_Half:'
.RES.H 1
Little_Byte:
.RES.B 1
LDI #0x01020304, r0
LDI #Little_Word, r1
LDI #0x0102, r2
LDI #Little_Half, r3
LDI #0x01, r4
LDI #Little_Byte, r5
*/ 32-bit data is accessed with the ST (or LD) instruction. */
ST r0, @r1
*/ 16-bit data is accessed with the STH (or LDH) instruction. */
STH r2, @r3
*/ 8-bit data is accessed with the STB (or LDB) instruction. */
STB r4, @r5
Summary of Contents for MB91150 Series
Page 1: ......
Page 2: ......
Page 3: ...FUJITSU LIMITED FR30 32 BIT MICROCONTROLLER MB91150 Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 112: ...96 CHAPTER 3 MEMORY SPACE CPU AND CONTROL UNIT ...
Page 178: ...162 CHAPTER 5 I O PORTS ...
Page 214: ...198 CHAPTER 7 16 BIT RELOAD TIMER ...
Page 240: ...224 CHAPTER 8 PPG TIMER ...
Page 310: ...294 CHAPTER 13 8 10 BIT A D CONVERTER ...
Page 318: ...302 CHAPTER 14 8 BIT D A CONVERTER ...
Page 362: ...346 CHAPTER 15 UART ...
Page 420: ...404 CHAPTER 19 PERIPHERAL STOP CONTROL ...
Page 428: ...412 CHAPTER 20 CALENDAR MACROS ...
Page 503: ...487 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 510: ...494 INDEX ...
Page 512: ......