| Electronic Components Datasheet Search |
|
AN1106 Datasheet(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1106 Datasheet(HTML) 4 Page - STMicroelectronics |
|
4 / 9 page ![]() 4/9 TRANSLATING ASSEMBLY CODE FROM HC05 TO ST7 4.1 VARIABLES It’s recommended to write all your variables in a file (called variable.asm for example) and to declare those you want to be public in a file called variable.inc as shown in the following ex- ample: variable.asm: st7/ TITLE “variable.asm” MOTOROLA ; Motorola format (default), other formats are also available: ; Intel, Zilog or Texas. BYTES ; this directive means that the addresses of the following ; variables are bytes and not that the variables are bytes. segment ‘ram0’; this directive means that the following variables are going to be ; ORG RAM0 ; placed in ram0 from $00 to $FF . ; section .ram0 ; (segment byte ‘ram0’ at 00-FF : this line is in the map file) var1 DS.B 1 ; 1 byte space is reserved in ram0 for var1 which is local. ; DEFS ; corresponding MOTOROLA directive. .var2 DS.W 1 ; 1 word space is reserved in ram0 for var 2 which is ; public (a dot is placed just before the variable name) WORDS ; this directive means that the addresses of the follow- ing ; variables are words. segment ‘ram1’ ; this directive means that following variables are going to be ; ORG RAM1 ; placed in RAM1 from $100 to $13F (for the ST72251) ; section .ram1 .var3 DS.B 1 ; 1 byte space reserved in RAM1 for this public variable. ; DS or RMB segment ‘rom’ ; this directive means that the following variables are going to be ; ORG ROM ; placed in ROM. ; section .rom .table DC.B $10,$AA,50,%11111010 ;table of values defined in ROM. ; BYTE or DB or DEFB or FCB END |
|
|
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 |
| 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 |