45111 Parallax Inc, 45111 Datasheet - Page 107

MANUAL FOR SX-KEY/BLITZ VER. 2.0

45111

Manufacturer Part Number
45111
Description
MANUAL FOR SX-KEY/BLITZ VER. 2.0
Manufacturer
Parallax Inc
Datasheet

Specifications of 45111

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Parallax microcontroller
For Use With
70002PAR - GUIDE PROG THE SX MICRO -DAUBACH
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
The following code snippet demonstrates this:
Sub1
Sub2
Start
Continue
_Sub1
_Sub2
The first CALL in the Start routine calls the Sub1 address in the jump table. The JMP command at Sub1
then jumps to the _Sub1 subroutine (in page 2) which eventually returns to the line following the CALL.
The RETP command used to return from the subroutine resets the page select bits to the page of the
calling routine (exactly as intended).
The @ symbol preceding the addresses causes the SX editor to insert a PAGE instruction just before the
JMP and CALL commands to set the page select bits appropriately. The first CALL, in the Start routine,
would function the same without an @ symbol, as shown above, since the destination address is within
the current page. See Chapter 15.2.16 – Calling Across Pages for more information.
ORG
; Define the subroutine jump-table
;
JMP
JMP
; Start of main routines
;
CALL
JMP
ORG
CALL
JMP
ORG
; Subroutine 1 code goes here
;
RETP
; Subroutine 2 code goes here
;
RETP
$0
@_Sub1
@_Sub2
@Sub1
@Continue
$200
@Sub2
@Start
$400
10 SX Special Features and Coding Tips
; This routine is in page 0
; Set page and jump
; Call the Jump Table
; This routine is in page 1
; Call the Jump Table
; This routine is in page 2
; Return and reset page
; Return and reset page
SX-Key/Blitz Development System Manual 2.0 Parallax, Inc. Page 107

Related parts for 45111