Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Translation of programs. Directive INCLUDE.

The process of translating the program in assembly language into object code is called as assembling. In contrast to the compile, assemble - a more or less definite and reversible process. In each assembly language mnemonics corresponds to one machine instruction, while in high level programming languages ​​for each expression may be hiding a lot of different instructions. In principle, this division is rather arbitrary, so sometimes broadcast assembler programs are also called compilation. Directives are commands compiler. Announcement of each of them should begin with a period. INCLUDE filename - Directive are inserted in the text of the program text file similar to the team preprocessor C # include. Often used to include files containing constant definitions, structures, and macros. INCLUDELIB filename - directive, indicating the name of the linker additional library or object file that will be required in the preparation of the program. For example, if we use a procedure or treatment to the data defined in other modules. Use of this directive can not specify the names of additional libraries when invoking the linker. INCLUDE directive Loads another source file during assembly. This allows us to insert an additional source file into your code during assembly. Included source files usually contain common routines or data. By using an INCLUDE directive at the beginning of our program, we can avoid re-typing common information. Included files may not contain other included files. Directive. Include. Means an investment of another file (the contents of a file included in the program at compile time). Having met . Include compiler opens the specified file in the directive, compiles it to the end (ie, translates into machine code) or to the directive. EXIT. Then continues the compilation of the initial file with the line following the directive include. The attached file may also contain a directive to include.

Example:

, The file iodefs.asm

. EQU sreq = 0 × 3F

. EQU sphigh = 0 × 3e

. EQU splow = 0 × 3d

, The file incdemo.asm

. include iodefs.asm

in ro, sreg

 


Date: 2015-01-29; view: 1116


<== previous page | next page ==>
Management commands of FPU. | Use of libraries. Directive INCLUDELIB.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.014 sec.)