2 stack pointer (sp), 8 system clock controller, Toshiba – Toshiba TMP87CP24AF User Manual
Page 15
Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

TOSHIBA
TMP87CM24A/P24A
MSB
LSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Stack Pointer (SP)
1.7.2 Stack Pointer (SP)
The
stack
pointer
(SP)
is
a
16-bit
register
containing
the
address
of the next free locations on the stack.
The
SP
is
post-decremented
when
a
subroutine
call
or
a
push
instruction
is
executed,
or
when
an
interrupt
is
accepted;
and
the
SP
is
pre-incremented
when
a
return
or
a
pop
instruction
is
executed. Figure 1-8 shows the stacking order.
The
SP
is
not
initialized
hardware-wise
but
requires
initialization
by
an
initialize
routine
(sets
the
highest
stack
address).
[LD
SP,
mn],
[LD
SP,
gg]
and
[LD
gg,
SP]
are
the
SP
access
instructions
(mn;
16-bit
immediate data, gg; register pair).
Figure 1-7. Stack Pointer
Example 1 :To initialize the SP
LD
SP, 083FH
Example 2 : To read the SP
LD
HL, SP
; SP<-083F
h
; HL<-SP
Figure 1-8. Stack
1.8 System Clock Controller
The system clock controller consists of a clock generator, a timing generator, and a stand-by controller.
Figure 1-9. System Clock Controller
3
-
24-15
2002
-
10-03