English
Language : 

45111 Datasheet, PDF (164/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
15 Appendix E: SX Data Sheet
7
6
5
Figure 32 - The Call Instruction
CALL label
8
7
6
5
4
3
2
1
0
0
11 10 9
8
7
6
5
4
3
2
1
0
15.2.16 Calling Across Pages
When it is necessary to call a subroutine that exists on a different page, you must set the page select bits
to point to the desired page before the call is executed. This can be done discretely using SETB and
CLRB instructions or by writing a value to the STATUS register. The SX offers a new single-cycle
instruction called PAGE that sets the page select bits for you. See “Dealing with Code Pages” in Chapter
7 for more information. NOTE: Using the @ symbol in the CALL instruction (CALL @label) will cause the
assembler to insert the PAGE instruction before your CALL, during assembly.
Figure 33 - Calling Across Pages
11 10 9
PAGE label
8
7
6
5
4
3
2
1
0
7
6
5
CALL label
8
7
6
5
4
3
2
1
0
0
11 10 9
8
7
6
5
4
3
2
1
0
15.2.17 Returning from a subroutine
Subroutines are usually terminated with a return-type instruction. Before we discuss the different
return instructions, we should describe the operation of the stack.
Page 164 • SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc.