45181 Parallax Inc, 45181 Datasheet - Page 69

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
defines the symbol loop_count to be equal to the number 10, and the symbol index to be equal to the
hexadecimal number 08. During assembly, everywhere the symbol loop_count appears in the code, the
number 10 will be used. Similarly, the hexadecimal number 08 will be used in place of the symbol index
during assembly.
Symbols are a great way to define names for registers and constants that would otherwise appear in
many places of a program as just non-descriptive numbers. Assembly code that makes ample use of
symbols is easier to read and debug and requires fewer comments.
The = directive also assigns values to symbols, but unlike EQU, can reassign values to those symbols.
This directive is useful in macros or repeat blocks to create assemble-time variables.
For example:
stores the values 2, 8, 14, 20 and 26 in memory locations $20 through $24 at assemble-time.
7.6
Labels are descriptive names that are given to sections of code. Similar to symbol names, label names
can consist of up to 32 alphanumeric and underscore (_) characters and must start with a letter or
underscore. SASM expects labels to begin at column 1 of the program line, unless the Local Labels Must
Start In Col. 1 checkbox is unchecked in the Configure dialog. Labels are used to direct code execution to
specific routines, and are defined simply by specifying the label name before the routine. For example:
defines the label Main to point at the first line of code. Later in the program (the second line in this
example) to continue execution back at the first line, the jump command is used with the argument
Main. This is usually read as, “jump to Main.”
There are three types of labels: global, local, and macro. A global label is one that is unique for the entire
length of the code. No two global labels can exist with the same name. A local label is one that is unique
for only a portion of the code and must begin with a colon (:). A local label can have the same name as
one or more other local labels in a program but they must be separated by at least one global or macro
Labels
loop_count
index
Count
ORG
REPT
ENDR
Main
EQU 10
EQU $08
= 0
$20
5
DW Count + 1 * 2
Count = Count + 3
mov index, #15
jmp main
SX-Key/Blitz Development System Manual 2.0 Parallax, Inc. Page 69
7 The SASM Assembler

Related parts for 45181