45181 Parallax Inc, 45181 Datasheet - Page 70
45181
Manufacturer Part Number
45181
Description
SX TECH TOOL KIT NO POWER
Manufacturer
Parallax Inc
Series
SXr
Type
Microcontrollerr
Datasheet
1.45180.pdf
(184 pages)
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
- Current page: 70 of 184
- Download datasheet (2Mb)
7 The SASM Assembler
label. A macro label is the name of a macro block (see the MACRO directive in Section 7.3.15 – The
Macro Directive) and is unique.
Depending on the option you have selected in the Configuration window, local labels must begin in text
column 1, or may be indented.
No macro label can exist with the same name as another macro or global label. Actually, when a
program contains a macro definition, and you use the macro name as a global label by mistake, the
assembler would not report an error, but insert the macro code at the location of the “global label”. The
following code demonstrates global and local labels.
main
:loop
continue
:loop
The example above contains two global labels, main and continue, and two local labels, both named :loop.
The area between the main and continue global labels is where a local label can exist. Since the djnz in-
struction in line 3 references the :loop label, and line 3 is between the global labels main and continue, it
will only jump to the :loop label at line 2 and not the :loop label at line 6.
You may also jump to a local label from “outside”. For example, the instruction
elsewhere in the above program example would cause the program execution to be continued with the
instruction.
Local and global labels are also allowed within a macro. It is suggested that global labels not be used
within a macro, however, as that would prevent the macro from being called more than once.
7.7
Expressions may be used within the arguments of instructions and directives to calculate values at
assemble time. The use of expressions helps build more maintainable, easier to understand code. For
example, if a program uses values that are all related to the same base number, it makes sense to
include an expression crafted from that relationship. If a symbol N is defined as being equal to the base
number 2, then N*2+1 and N*3 can be used to derive values related to it; 5 and 6 in this case. At a later
time, it might become necessary to adjust the base value to 3 and since expressions were used to derive
the related values, only the symbol N needs to be modified.
Page 70 SX-Key/Blitz Development System Manual 2.0 Parallax, Inc.
Expressions
mov
mov
djnz
move
djnz
jmp
jmp
djnz
loop_count, #15
$09, #100
loop_count, :loop
loop_count, #50
loop_count, :loop
main ;start over
continue:loop
loop_count, :loop
; initialize loop_count
; set some other register
; decrement loop_count,
; jump to :loop if not zero
; set loop_count to 50
; decrement loop_count,
; jump to :loop if not zero
Related parts for 45181
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Terminals 3 Pin Single Row Header (long)
Manufacturer:
Parallax Inc
Part Number:
Description:
Headers & Wire Housings 16 Pin Single Row Header
Manufacturer:
Parallax Inc
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: