beautypg.com

2 location of 16-bit data on memory, Location of 16-bit data on memory, Bit data storage state on ram – FUJITSU F2MC-8L F202RA User Manual

Page 42: Bit operand storage state, Bit data storage state in stack

background image

26

CHAPTER 3 CPU

3.1.2

Location of 16-bit Data on Memory

Upper digits of 16-bit data and stack data are stored in lower addresses on memory.

16-bit Data Storage State on RAM

When 16-bit data is written into RAM, the upper byte of the data is stored with a lower address and the

lower byte of the data is stored with the next address. 16-bit data is read in the same manner.

Figure 3.1-2 shows the location of 16-bit data on RAM.

Figure 3.1-2 Location of 16-bit Data on RAM

16-bit Operand Storage State

When 16 bits are specified for operands in instructions, upper bytes are also stored in addresses close to

operation codes (instructions) and lower bytes are stored in the following addresses.

Operands that indicate memory addresses and 16-bit immediate data are handled in the same manner as

stated above.

Figure 3.1-3 shows the locations of 16-bit data in instructions.

Figure 3.1-3 Location of 16-bit Data in Instructions

16-bit Data Storage State in Stack

The upper byte of data for a 16-bit register put in the stack due to an interrupt is also stored with a lower

address.

A

00

8

1

H

00

8

2

H

00

83

H

MOVW 00

8

1H, A

00

8

0

H

00

8

1

H

00

8

2

H

00

83

H

12

3

4

H

A

12

H

3

4

H

00

8

0

H

Before

written

12

3

4

H

Memory

After

written

Memory

XXX0

H

XX

XX

XXX2

H

60

56

7

8

; Extend

a

ddre

ss

; 16-

b

it immedi

a

te d

a

t

a

XXX5

H

E4

12

3

4

XXX

8

H

XX

[Ex

a

mple]

MOV A, 567

8

H

MOV W A, #12

3

4H

; Extend

a

ddre

ss

; 16-

b

it immedi

a

te d

a

t

a

Proce

ss

ed thro

u

gh

ass

em

b

ler

...

...

This manual is related to the following products: