M68ICS05KJ Freescale Semiconductor, M68ICS05KJ Datasheet - Page 71
M68ICS05KJ
Manufacturer Part Number
M68ICS05KJ
Description
SIM PROGRAM FOR 68HC705KJ/J1A
Manufacturer
Freescale Semiconductor
Type
Simulator/Programmerr
Datasheet
1.M68ICS05KJ.pdf
(248 pages)
Specifications of M68ICS05KJ
Contents
Programmer, Power Supply, Assembler/Simulator/Debugger, Cable, Software and Documentation
For Use With/related Products
68HC705KJ/JIA
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
- Current page: 71 of 248
- Download datasheet (912Kb)
5.6.5 MACRO
A macro is a named block of text to be assembled. Similar in some ways to an included file, the
macro allows labels and parameter values.
The MACRO directive begins the macro definition. The name of the macro is the parameter
value for the MACRO direction. All subsequent code, until the assembler encounters the
MACROEND directive, is considered the macro definition.
No assembler directives may be used within a macro, nor does the definition require parameter
names. Instead, the macro definition includes the sequential indicators %n for the n
values of the macro call. The assembler will ignore parameter values on the MACRO directive
line, so such values may be helpful for internal documentation.
Example
This macro example illustrates a macro that divides the accumulator value by 4:
This macro example illustrates a macro that creates a time delay:
In this macro, the CASM05W assembler ignores the parameter count on the MACRO directive
line. The parameter count merely indicates the role of the parameter value passed to the macro.
That value is substituted for the sequential indicator %1. The first time this macro is called, the
CASM05W assembler changes the label loop, on lines 3 and 4, to loop:0001. If the calling line
invokes this macro, the loop would occur 100 times. The suffix t represents the decimal base.
The CASM05W assembler ignores extra parameter values sent to a macro. If the macro does not
receive enough parameter values, the assembler issues an error message.
Labels change automatically each time they are used. Labels used within macros may not be
longer than 10 characters, because the assembler appends a four-digit hexadecimal number to the
label to insure label uniqueness.
Although code may not jump into a macro, it may jump out of a macro. Macros cannot be
forward-referenced.
M68ICS05KJOM/D
delay 100t
$MACRO divide_by_4
asr a
asr a
$MACROEND
$MACRO delay
loop:
$MACROEND
;starts macro definition
;divides accumulator by 2
;divides quotient by 2
;ends macro definition
count
ldaa #$01
deca
bne loop
ASSEMBLER INTERFACE
th
parameter
5-11
Related parts for M68ICS05KJ
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet:
Part Number:
Description:
Manufacturer:
Freescale Semiconductor, Inc
Datasheet: