数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN1106 数据表(PDF) 5 Page - STMicroelectronics

部件名 AN1106
功能描述  TRANSLATING ASSEMBLY CODE FROM HC05 TO ST7
PDF  9 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN1106 数据表(HTML) 5 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
 5 / 9 page
background image
5/9
TRANSLATING ASSEMBLY CODE FROM HC05 TO ST7
There are two ways to define a variable as public (which means visible from another module,
the C equivalent directive is “extern”). The first one is the one used in the above example (the
dot before the variable). The second one is to write the PUBLIC directive at the beginning of
the variable.asm file followed by the name of the variables you want to be public.
variable.inc: (file to include in all .asm source files)
TITLE “variable.inc”
EXTERN
var2.b
; the ad-
dress of var2 is a byte.
EXTERN
var3.w; the address of var3 is a word.
EXTERN
table.w; the address of table is a word.
In this .inc file, only the variables which have been defined as public in the corresponding .asm
file have to appear. That’s the reason why var1 doesn’t appear (it’s a local variable).
Instead of writing a “.b” or “.w” after the variable to specify that its address is a byte, you can
also write the BYTES or WORDS directives directly before the corresponding variables.
4.2 CONSTANTS
The best way to define all your constants is to declare them in a file (called constant.inc for ex-
ample) with the directive “#define constant_name value”. Constants defined in this way
don’t take any space in memory. All you have to do is include this .inc file in all your source
files (in all files where you use the constants):
constant.inc:
#define
const125
; const1 = 25 (decimal)
#define
const2 $1F
; const2 = 1F (hexadecimal)
#define
const3%11100001
; const3=11100001 (binary)
........
You can define as many constants as you want. Just make sure that the “#” symbol is always
the first character of the line but not in the first column.



Html Pages

1 2 3 4 5 6 7 8 9


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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