Fujitsu F2MC-8FX manual Example of Saving Data in Stack Area

Models: F2MC-8FX

1 272
Download 272 pages 2.67 Kb
Page 22
Image 22

CHAPTER 2 MEMORY SPACE

Figure 2.2-3 Example of Saving Data in Stack Area

Before execution

MEMORY

 

 

After execution

MEMORY

 

 

 

 

 

 

 

PUSHW A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SP

1235H

 

 

67H

1235H

 

 

SP

1233H

 

 

 

67H

 

1235H

 

 

 

 

 

 

 

 

 

 

 

1234H

 

 

 

 

 

 

 

 

 

1234H

A

 

 

 

 

 

 

A

 

 

 

 

CDH

 

ABCDH

 

 

 

 

 

ABCDH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1233H

 

 

 

ABH

 

1233H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1232H

 

 

 

 

 

 

 

 

 

1232H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 2.2-4 Example of Returning Data from Stack Area

Before execution

SP

5678H

 

 

 

 

 

 

 

 

IX

XXXXH

 

 

 

 

 

 

 

MEMORY

 

 

After execution

 

 

 

 

POPW IX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

567BH

 

 

SP

567AH

 

 

 

 

 

 

 

 

567AH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IX

FEDCH

 

 

 

 

5679H

 

 

 

 

 

DCH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5678H

 

 

 

 

 

 

 

FEH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MEMORY

 

567BH

 

 

567AH

 

 

5679H

DCH

 

 

5678H

FEH

 

 

 

 

 

Direct Area

The direct area in the F2MC-8FX CPU is located at the lower side of the memory space or the 1152 bytes from 0000H to 047FH and is mainly accessed by direct addressing and bit direct addressing. The area that can be used at a time by direct addressing and bit direct addressing is 256 bytes. 128 bytes of 0000H to 007FH can be used at any time as a direct area. 0080H to 047FH is a direct bank of 128 bytes 8 and can use one direct bank as a direct area by setting the direct bank pointer (DP). Conversion from the operand address of direct addressing and bit direct addressing to the real address is done by the conversion rule shown in Table 2.2-1by using DP.

Access to it is obtained by the 2-byte instruction.

The I/O control registers and part of RAM that are frequently accessed are arranged in this direct area.

Table 2.2-1 Conversion Rule for Actual Address of Direct Addressing and Bit Direct Addressing

Operand address

Direct bank pointer (DP)

Actual address

 

 

 

00H to 7FH

 

0000H to 007FH

 

000

0080H to 00FFH

 

001

0100H to 017FH

 

010

0180H to 01FFH

80H to FFH

011

0200H to 027FH

100

0280H to 02FFH

 

 

101

0300H to 037FH

 

110

0380H to 03FFH

 

111

0400H to 047FH

10

Page 22
Image 22
Fujitsu F2MC-8FX manual Example of Saving Data in Stack Area