45111 Parallax Inc, 45111 Datasheet - Page 61

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 is an example of multiple WATCH directives and their output:
Start
This code snippet would result in a Watch window similar to Figure 13 – The Watch Window, below:
The first variable in the Watch window is created by the WATCH directive on line 5 of the source code.
It tells the SX-Key to display a value starting at bit 0 of LCounter (since bit 0 is assumed if no bit address
is specified) containing 16 bits and formatted as an unsigned decimal number. Note that although
LCounter is only an 8-bit register, the WATCH directive can span multiple registers (from low-byte to
high-byte) in order to construct up to a 32-bit value. In this case, LCounter ($08) is the lower 8 bits and
HCounter ($09) is the upper 8 bits of the displayed value (61,456 or $F010).
The second and third variables in the Watch window are created by the WATCH directives on lines 6
and 7 of the source code. Both are single bit values, shown in unsigned binary format. The first of these
corresponds to Flags’ bit 0 (Flags.0) and the second corresponds to Flags’ bit 1 (Flags.1) as specified by
the symbol arguments.
The fourth variable in the Watch window is created by the last WATCH directive. It tells the SX-Key to
display a fixed-length string (FSTR) of 3 bytes starting with the String symbol. In this case, ‘HI!’ is
displayed.
LCounter
Hcounter
Flags
String
WATCH
WATCH
WATCH
WATCH
MOV
MOV
MOV
MOV
MOV
MOV
EQU $08
EQU $09
EQU $0A
EQU $0B
LCounter, 16, UDEC
Flags.0, 1, UBIN
Flags.1, 1, UBIN
String, 3, FSTR
LCounter, #$10
HCounter, #$F0
Flags, #%01
String, #’H’
String+1, #’I’
String+2, #’!’
Figure 13 - The Watch Window
; (3 chars, $0B - $0D)
; Start of main routine
SX-Key/Blitz Development System Manual 2.0 Parallax, Inc. Page 61
7 The SASM Assembler

Related parts for 45111