You are on page 1of 2

Chapter -2 2.1 : Introduction about assembler The assembly language program made with instructions and assembler directives.

The instruction has been converted to hex code after ampile but the assembler directive is not generate any code at compile time. The directives are used for give a direction to assembler. The directives are pseudoinstructions and are not translated into machine language (HEX). Generally two assemblers are used for programming purpose. 1. TASM (Borland International) 2. MASM (Microsoft Assembler) The higher version of MASM needs C++ express edition 2005 for run a program. Each of the assembler can be downloaded from the specific location 1. Download 2. Download They both are freeware for non commercial use. Some codes used only for assembler not used in assembly language instruction. The assembler supports directive for data definition, procedure definition, macro definition, and also used for branch displacement. The assembler directive are classified into the following categories based on the function performed by directive. 1. 2. 3. 4. 5. 6. 7. 8. 9. Data definition and storage allocation directive. Program organization directive. Alignment directive. Value-Returning attribute directives. Procedure definition directive. Macro definition directive. Data control Directive. Branch displacement directive. Header file inclusive directive.

2.2 Symbols, Variables and Constants. 2.2.1 : Variable and Symbols Variables and symbols are used when the values varied at a program run time. The assembler assigns a memory location to a variable, which is not visible to the user. Variable name is automatically detected into machine level language. The variable name always reflects meaning of it. A variable name class refers to the classroom for school/college and class_ce refers computer class of school/college. Symbols:

The assembler symbols consist of the following characters. 1. 2. 3. 4. Upper case alphabets : A-Z Lower case alphabets : a-z Digits : 0-9 Special Characters : _ (underscore), @ (at), $, ?

Rules for define a variable name: 1. It contain following characters A-Z, a-z, _ , 0-9 only. 2. A variable name always start with letter or underscore, it can not be start with digits. Exp. Class, _class, c_l_a_s_s, CLASS. 3. The length of variable name is does not excide to 32 characters, generally it depends upon assembler. Exp. abcdefghiJkl_mn_opQr_stuv_WX_y_z 4. There is no difference between upper and lower case sensitive in 8086 assembly language. Exp. INFO,info and InFo are same variable names for assembly. Example of valid variables : Class, name, AGE, _number

You might also like