2 program memory (rom), Toshiba – Toshiba TMP87CP24AF User Manual

Page 7

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

TOSHIBA

TMP87CM24A/P24A

1.2 Program Memory (ROM)

The TMP87CM24A has a 32Kx8-bit (addresses

8000

h

to FFFF

h

), and the TMP87CP24A has a 48Kx8-bit

(addresses

4000

h

to FFFF

h

) of program memory (mask programmed ROM).

Addresses FFOO

h

to FFFF

h

in the program memory can also be used for special purposes.

(1)

Interrupt/Reset vector table (addresses FFEO

h

to FFFF

h

)

This

table

consists

of

a

reset

vector

and

15

interrupt

vectors

(2

bytes/vector).

These

vectors

store

a

reset start address and interrupt service routine entry addresses.

(2)

Vector table for vector call instructions (addresses FFCO

h

to FFDF

h

)

This

table

stores

call

vectors

(subroutine

entry

address,

2

bytes/vector)

for

the

vector

call

instructions

[CALLV

n].

There

are

16

vectors.

The

CALLV

instruction

increases

memory

efficiency

when

utilized

for frequently used subroutine calls (called from 3 or more locations).

(3)

Entry area (addresses FFOO

h

to FFFF

h

) for page call instructions

This

is

the

subroutine

entry

address

area

for

the

page

call

instructions

[CALLP

n].

Addresses

FFOO

h

-

FFBF

h

are normally used because address FFCO

h

to FFFF

h

are used for the vector tables.

Programs and fixed data are stored in the program memory. The instruction to be executed next is read

from the address indicated by the current contents of the program counter (PC). There are relative jump

and absolute jump instructions. The concepts of page or bank boundaries are not used in the program

memory concerning any jump instruction.

Example:

The relationship between the

jump instructions and the PC.

© 5-bit PC-relative jump [JRS cc, $ + 2+d]

E8C4H: JRS T, $ + 2 + 08H

WhenJF

=

1,thejump

ismadeto

E8CE

h

,

which is

08

h

added to the contents of the

PC.

(The

PC

contains

the

address

of

the

instruction

being

executed+

2;

therefore,

in

this

case,

the

PC

contents

are

E8C4

h

+ 2 = E8C6

h

.)

@ 8-bit PC-relative jump [JR cc, $ + 2+d]

E8C4H : JR Z, $ + 2 + 80H

When ZF = 1, the jump is made to

E846

h

,

which is

FF80

h

(-128) added to the

current contents of the PC.

(3)

16-bitabsolute jump [JP a]

E8C4H : JP 0C235H

An

unconditional

jump

is

made

to

address

C235

h

-

The

absolute

jump

instruction

can

jump

anywhere

within

the entire 64-Kbyte space.

Address

4000

h

(8000)

FFOO

FF7B

FFBF

FFCO

FFC1

FFC2

FFDF

FFEO

FFE1

FFE2

FFFD

FFFE

FFFF

call vector (L)

call vector (H)

interrupt vector (L)

interrupt vector (H)

reset vector (L)

reset vector (H)

ROM

contents

Example :

The relationship

between ROM Contents

and Call group

instructions/Interrupt/
Reset

CALLP 7BH

PC<-FF7B

56

C8

CALLV OH ; PC<-C856

h

68

D3

3E

CO

INT5

PC D368

RESET

PC<-C03E

Figure 1-2. Program Memory Map

In theTLCS-870 Series, the same instruction used to access the data memory (e.g. [LD A, (HL)]) is also used

to

read

out

fixed

data

(ROM

data)

stored

in

the

program

memory.

The

register-offset

PC-relative

addressing

(PC

+

A)

instructions

can

also

be

used,

and

the

code

conversion,

table

look-up

and

n-way

multiple jump processing can easily be programmed.

3

-

24-7

2002

-

10-03

Advertising
This manual is related to the following products: