Samsung KS57C2308 Manual page 120

Single-chip cmos microcontroller
Table of Contents

Advertisement

SAM47 INSTRUCTION SET
CALLS
— Call Procedure (Short)
CALLS
dst
Operation:
Operand
ADR11
Description:
The CALLS instruction unconditionally calls a subroutine located at the indicated address. The
instruction increments the PC twice to obtain the address of the following instruction. Then, it
pushes the result onto the stack, decreasing the stack pointer six times. The higher bits of the
PC, with the exception of the lower 11-bits, are cleared. The subroutine call must therefore be
located within the 2-Kbyte block (0000H–07FFH) of program memory.
Operand
ADR11
Example:
The stack pointer value is 00H and the label "PLAY" is assigned to program memory location
0345H. Executing the instruction
CALLS
at location 0123H will generate the following values:
SP
0FFH
0FEH =
0FDH =
0FCH =
0FBH =
0FAH =
PC
Data is written to stack locations 0FFH–0FAH as follows:
SP – 6 (0FAH)
SP – 5 (0FBH)
SP – 4 (0FCH)
SP – 3 (0FDH)
SP – 2 (0FEH)
SP – 1 (0FFH)
SP
5-46
Call direct in page (11-bits)
1
1
1
a7
a6
a5
PLAY
=
0FAH
=
0H
EMB, ERB
2H
5H
0H
1H
=
0345H
0
PC10–PC8
0
0
PC3–PC0
PC7–PC4
0
0
0
0
(00H)
Operation Summary
Binary Code
0
1
a10
a9
a4
a3
a2
a1
0
0
EMB
ERB
0
0
KS57C2308/P2308/C2316/P2316
Bytes
2
Operation Notation
a8
[(SP–1) (SP–2)]
[(SP–3) (SP–4)]
[(SP–5) (SP–6)]
a0
PC13–11
00
PC10–0
ADR10–0
(SP)
(SP)–6
Cycles
3
EMB, ERB
PC7–0
PC10–8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents