Electronic Components Datasheet Search
  English  ▼

X  

UM0144 Datasheet(PDF) 16 Page - STMicroelectronics

Part # UM0144
Description  ST7 Assembler Linker
PDF  92 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0144 Datasheet(HTML) 16 Page - STMicroelectronics

Back Button UM0144 Datasheet HTML 12Page - STMicroelectronics UM0144 Datasheet HTML 13Page - STMicroelectronics UM0144 Datasheet HTML 14Page - STMicroelectronics UM0144 Datasheet HTML 15Page - STMicroelectronics UM0144 Datasheet HTML 16Page - STMicroelectronics UM0144 Datasheet HTML 17Page - STMicroelectronics UM0144 Datasheet HTML 18Page - STMicroelectronics UM0144 Datasheet HTML 19Page - STMicroelectronics UM0144 Datasheet HTML 20Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 16 / 92 page
background image
3 ST7 Assembler
ST7 Assembler Linker
16/92
UM0144
Label scope
Often, in multi-module programs, a piece of code will need to refer to a label that is actually
defined in another module. To do this, the module that exports the label must declare it
PUBLIC, and the module which imports the label must declare it EXTERN. The two directives
EXTERN and PUBLIC go together as a pair.
Most labels in a program will be of no interest for other pieces of the program—these are
known as 'internal' labels since they are only used in the module where they are defined.
Labels are 'internal' by default.
Here are two incomplete example modules that pass labels between them:
As you can see, module 1 refers to the '_sig2' subroutine which is defined in module 2. Note
that when module 1 refers to the '_sig2' label in an EXTERN directive it specifies a WORD size
with the '.w' suffix. Because the assembler cannot look up the definition of '_sig2' it has to be
told its address size explicitly. It doesn't need to be told relativity: all external labels are
assumed to be relative.
Absolute labels declared between modules should be defined in an INCLUDE file that is called
by all modules in the program; this idea of using INCLUDE files is very important since it can
reduce the number of PUBLIC symbols—and therefore the link time—significantly.
Lines in the source code listing which refer to external labels are marked with an X and given
'empty' values for the linker to fill.
module 1
EXTERN _sig1.w
; import _sig1
EXTERN _sig2.w
; import _sig2
PUBLIC _handlers
; export _handlers
segment byte ‘P’
_handlers:
; define _handlers
jp _sig1
; refer to _sig1
jp _sig2
; refer to _sig2
end
module 2
EXTERN _handlers.w
; import _handlers (addr. is a word)
PUBLIC _sig2
; export _sig2
segment byte ‘P’
_sig2:
; define _sig2
...
call _handlers
; refer to _handlers
...
ret
end



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92


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