I'm working hard to be someone I'll be proud of.
--Your friends at LectureNotes


by Nandini Nandini
Views: 11Uploaded: 3 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments


Nandini Nandini

Nandini Nandini

Assembler Directives (cont..) ASSUME DB DD DQ DT DW - Defined Byte. Defined Double Word Defined Quad Word Define Ten Bytes Define Word . j 1 www.smartzworld.com specworld.in jntuworldupdates.org
Assembler Directives (cont..) ASSUME Directive-The ASSUME directive is used to tell the assembler that the name of the logical segment should be used for a specified segment. The 8086 works directly with only 4 physical segments: a Code segment, a data segment, a stack segment, and an extra segment. Example: ASUMECS:CODE ;This tells the assembler that the logical segment named CODE contains the instruction statements for the program and should be treated as a code segment. ASUMEDS:DATA;This tells the assembler that for any instruction which refers to a data in the data segment, data will found in the logical segment DATA. . j 2 www.smartzworld.com specworld.in jntuworldupdates.org
Assembler Directives (cont..) DB-DB directive is used to declare a bytetype variable or to store a byte in memory location. Example: 1. PRICEDB49h, 98h, 29h ;Declare an array of 3 bytes, named as PRICE and initialize. 2. NAMEDB‘ABCDEF’ ;Declare an array of 6 bytes and initialize with ASCII code for letters 3. TEMPDB100 DUP(?) ;Set 100 bytes of storage in memory and give it the name as TEMP, but leave the 100 bytes uninitialized. Program instructions will load values into these locations. . j 3 www.smartzworld.com specworld.in jntuworldupdates.org
Assembler Directives (cont..) DW-The DW directive is used to define a variable of type word or to reserve storage location of type word in memory. Example: MULTIPLIERDW 437Ah ; this declares a variable of type word and named it as MULTIPLIER. This variable is initialized with the value 437Ah when it is loaded into memory to run. EXP1 DW 1234h, 3456h, 5678h ; this declares an array of 3 words and initialized with specified values. STOR1DW 100DUP(0); Reserve an array of 100 words of memory and initialize all words with 0000.Array is named as STOR1. . j 4 www.smartzworld.com specworld.in jntuworldupdates.org

Lecture Notes