Registers, Program counter (pc), Atar862-3 – Rainbow Electronics ATAR862-3 User Manual

Page 16

Advertising
background image

16

ATAR862-3

4556B–4BMCU–02/03

Figure 12.

RAM Map

Registers

The microcontroller has seven programmable registers and one condition code register
(see Figure 13).

Program Counter (PC)

The program counter is a 12-bit register which contains the address of the next instruc-
tion to be fetched from the ROM. Instructions currently being executed are decoded in
the instruction decoder to determine the internal micro-operations. For linear code (no
calls or branches), the program counter is incremented with every instruction cycle. If a
branch-, call-, return-instruction or an interrupt is executed, the program counter is
loaded with a new address. The program counter is also used with the table instruction
to fetch 8-bit wide ROM constants.

Figure 13.

Programming Mode l

RAM

FCh

00h

Autosleep

FFh

03h

04h

X

Y

SP

RP

TOS-1

Expression
stack

Return
stack

Global
variables

R

A

M address r

egister:

07h

(256 x 4-bit)

Global
variables

4-bit

TOS

TOS-1

TOS-2

3

0

SP

Expression stack

Return stack

0

11

12-bit

RP

v

TOS

CCR

0

3

0

3

0

7

0

7

7

0

11

RP

SP

X

Y

PC

--

B

I

Program counter

Return stack pointer

Expression stack pointer

RAM address register (X)

RAM address register (Y)

Top of stack register

Condition code register

Carry / borrow

Branch

Interrupt enable

Reserved

0

7

C

0

0

0

Advertising