22-05-2012, 01:15 PM
ASSEMBLER CODE
ASSEMBLER CODE AND TOOLS.pdf (Size: 284.31 KB / Downloads: 25)
TYPES OF NUMBER USED IN DATA STATMENTS
DB, DW, DD uses Hexadecimal numbers, indicated by H. numbers can be used in many forms which need to be informed to assembler.
•Binary –denoted by B like Temp_maxDB 001B. To put a negative binary number we have to write the number in its 2’s compliment sign and magnitude form.
•Decimal –number with no identifying letter is termed as decimal number like Temp_maxDB 48 for negative it will be like Temp_maxDB -20 assembler will autoconvertit to 2’s compliment and magnitude.
TYPES OF NUMBER CONT
Hexadecimal –Indicated by H like Temp_maxDB 67H. A zero must be placed in front of hex number if it starts with letter like Temp_maxDB 0BH.
•BCD –each decimal digit is represented by 4 bit binary equivalent like 37 –00110111
•ASCII -declare a data structure (array) containing a sequence of ASCII codes by enclosing letters or number after a DB in single quotation marks. Like BOY1 DB ‘ALBERT’
TOOLS FOR DEVELOPING ASSEBMLING LANGUAGE PROGRAMM
•Editior–Allows to create a file containing the assembly language statement for our program. Like notepad, wordpad, wordstar. When file saved it become a source file. Finally we process file with an assembler like TASM or MASM (Extension of file .ASM)
•Assembler –Translates the mnemonics for instruction to corresponding binary codes. When we run it, it reads displacement of named data items, offset of labels and put it into symbol table.