Electronic Components Datasheet Search
  British  ▼
ALLDATASHEET.CO.UK

X  

AN1106 Datasheet(PDF) 7 Page - STMicroelectronics

Part # AN1106
Description  TRANSLATING ASSEMBLY CODE FROM HC05 TO ST7
PDF  9 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1106 Datasheet(HTML) 7 Page - STMicroelectronics

  AN1106 Datasheet HTML 1Page - STMicroelectronics AN1106 Datasheet HTML 2Page - STMicroelectronics AN1106 Datasheet HTML 3Page - STMicroelectronics AN1106 Datasheet HTML 4Page - STMicroelectronics AN1106 Datasheet HTML 5Page - STMicroelectronics AN1106 Datasheet HTML 6Page - STMicroelectronics AN1106 Datasheet HTML 7Page - STMicroelectronics AN1106 Datasheet HTML 8Page - STMicroelectronics AN1106 Datasheet HTML 9Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 7 / 9 page
background image
7/9
TRANSLATING ASSEMBLY CODE FROM HC05 TO ST7
4.4 MACROS
You can define your macros directly in the source file where they are used or if there are too
many and/or if you use one macro in several source files, you can define them in a macro.inc
file that you will have to include in all the source files (where the macros are used):
appli.asm:
Let’s consider the same appli.asm source file given above. Let’s imagine that instead of the
missing source code in this file (......., see above) we call a macro:
MACRO1
Remember that a macro is a faster way than a functions for executing the same code several
times. However program size is bigger when you use macros instead of subroutines; each
time you invoke a macro to do a particular job, the whole macro assembly code is inserted into
your source code. Macros are very useful when a small section of code must be used repeat-
edly.
The macro syntax is the following:
macro_name
MACRO [parameter_1] [,parameter_2...]
[LOCAL label_name]
[Body_of_the_macro]
MEND
; ENDM
macro.inc:
.MACRO1MACRO
LOCAL loop1
loop1
LD
A,$C000; A loaded with the value at the address $C000
JRNE
loop1
; loop until this value equals 0 (after an inter-
rupt for
; example).
MEND
The “LOCAL” directive avoids getting duplicate label errors for labels inside the macro (be-
cause the same macro can be called several times in the same module).
4.5 MAP FILE
Don’t forget you also have to include the map file of the device you use, for example in your
source files, you can have among the included files:
#include “ST72251.inc”
The corresponding ST72251.asm file will have to appear in the batch file.



Html Pages

1 2 3 4 5 6 7 8 9


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com