| поискавой системы для электроныых деталей |
|
UM0144 датащи(PDF) 37 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0144 датащи(HTML) 37 Page - STMicroelectronics |
|
37 / 92 page ![]() ST7 Assembler Linker 4 Linker UM0144 37/92 4.4.2 Segments in the linker A typical system may look like the diagram alongside: a good candidate for four different segments, perhaps named 'RAM0', 'RAM1', 'EPROM' and 'ROM'. If the reset and interrupt vectors live at the end of the map, perhaps from FFEE-FFFF then we might mark a fifth segment called 'vectors' at those addresses and truncate 'ROM' to end at FFED; that way the linker will warn us if 'ROM' has so much code in it that it overflows into where the vectors live. These classes would be introduced as follows: segment byte at: 0-FF'RAM0' segment byte at: 100-027F'RAM1' segment byte at: 8000-BFFF'EPROM' segment byte at: C000-FFDF'ROM' segment byte at: FFE0-FFFF'VECTORS' After their full introduction that needs only be done once in the whole program, the rest of the program can refer to the classes just by giving the class names in quotes, for example: If this example followed immediately after the class instruction the 'xtemp' label would be given the value 0 , time would be given 2 and hex C000. If, however, the code was several modules away from the introduction with segments of the classes 'RAM0' or 'ROM', then the value allocated to all the labels will depend on how much space was used up by those modules. The linker takes care of all this allocation. This is the way the linker handles the problems of relocatability; keep in mind that this link system is going to have to handle compiled code from high level languages and you'll perhaps begin to understand why things have to be generalized so much. So far the segments we've looked at have had no <name> field, or, more accurately, they all had a null name field. You can ensure that related segments of the same class, perhaps scattered all over your modules with segments of the same class are collated together in a contiguous area of the class memory by giving them the same name. segment 'RAM0' xtemp ds.w ; temp storage for X register time ds.b ; timer count index segment 'ROM' hex ld A,#1 add A,#10 nop |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |