
7/317
Table of Contents
6.1.3 Declaringvariables....................................................138
6.1.4 Declaringconstants ...................................................140
6.1.4.1 Constantdata ...................................................140
6.1.4.2 Symboldefinition .................................................141
6.1.5 Relocation commands .................................................142
6.1.5.1 Whatisrelocation? ...............................................142
6.1.5.2 Segmentdefinition................................................143
6.1.5.3 UsingtheSegmentdirectiveinthesourcefile...........................145
6.1.5.4 Segmentallocation ...............................................146
6.1.5.5 Initializationofvariablesatpower-on..................................148
6.1.5.6 Referencing symbols and labels between modules .......................151
6.1.6 Conditional assembly ..................................................154
6.1.7 Macros .............................................................156
6.1.7.1 Replaceableparameters ...........................................157
6.1.7.2 Localsymbols ...................................................158
6.1.7.3 Conditional statements in macros . ...................................160
6.1.8 Some miscellaneous features ............................................162
6.1.8.1 EQUandCEQUpseudo-ops........................................162
6.1.8.2 #DEFINE pseudo-op . . ............................................162
6.1.8.3 Numberingsyntaxdirectives ........................................163
6.1.9 Objectandlistingfiles..................................................163
6.1.9.1 Objectfiles......................................................164
6.1.9.2 Listingfiles......................................................164
6.2 LINKERANDASCII-HEXCONVERTER ...............................165
6.2.1 Thelinkingprocess....................................................165
6.2.2 Hexfiletranslator .....................................................167
6.2.3 The back-annotation pass of the assembler .................................168
6.3 INSTALLINGWINEDITANDTHESOFTWARETOOLS...................168
6.3.1 WinEdittexteditor.....................................................168
6.3.1.1 InstallingWinEdit .................................................168
6.3.1.2 ConfiguringWinEdit...............................................169
6.3.2 InstallingtheSTMicroelectronicsSoftwareTools.............................169
6.4 BUILDINGADEMONSTRATIONPROGRAM ...........................170
6.4.1 Purposeofthedemonstrationprogram ....................................170
6.4.2 Inventoryoftheprogramfiles............................................170
6.4.3 Descriptionoftheprogramfiles ..........................................171
6.4.3.1 The PROJECT.WPJ file ..........................................171
6.4.3.2 The main source file, MAIN.ASM and the timer source file, TIMER500.ASM . . .
173 6.4.3.3 The REG72251.ASM file and the REGISTER.INC file .................176
6.4.3.4 The MAP72251.ASM file .........................................178
1