45181 Parallax Inc, 45181 Datasheet - Page 107

SX TECH TOOL KIT NO POWER

45181

Manufacturer Part Number
45181
Description
SX TECH TOOL KIT NO POWER
Manufacturer
Parallax Inc
Series
SXr
Type
Microcontrollerr
Datasheet

Specifications of 45181

Contents
SX Book, SX Key, SX Tech Board, Samples, Resonators, Cable and Manual
Product
Microcontroller Basic Stamps
Operating Supply Voltage
5 V
For Use With/related Products
SX MCUs
Lead Free Status / RoHS Status
Lead free / RoHS 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 45181