8086 micro processor programs-1
-
Upload
sayyed-amir-hussain -
Category
Education
-
view
150 -
download
5
Transcript of 8086 micro processor programs-1
8086 PROGRAMMING: 1Dr vinita Kumari
7-4
Overview of Assembly Language
Advantages:
Disadvantages:
Faster as compared to programs written using high-level languages
Efficient memory usage
Control down to bit level
Need to know detail hardware implementation
Not portable
Slow to development and difficult to debug
Basic components in assembly Language:
Instruction, Directive, Label, and Comment
DATA TYPE
Constant
Variable- byte, word, double word
DIRECTIVES
SEGMENT and ENDS directive (logical segment)
END directive
ASSUME directive
DIRECTIVES FOR NAMING DATA AND
ADDRESSES
DB
DW
DD
EQU
EQU directive is used for defining constant
ASSEMBLER DIRECTIVES(CONTD.)
• EQU Directive: used to assign names to constants.
• CORRECTION_FACTOR EQU 07H
• DB, DW and DD Directives: used to assign names to variables.
• OVEN_TEMPERATURE DB 27H
• TARE_WEIGHT DB?
• CONVERSION_FACTORS DB 27H, 48H, 32H, 69H
• MULTIPLICAND DW 204AH
• PRODUCT DW 2 DUP (0)
• SEGMENT and ENDS Directive:
• The SEGMENT and ENDS directives are used to identify a group of data items or group of instructions that you want to be put together in a particular segment.
DATA_HERE SEGMENT
-----------
----------
DATA_HERE ENDS
• The ASSUME Directive
• 4 physical segments: code, data, stack and extra segment
• tells which logical segment to use for each of the physical segment at a given time.
• ASSUME CS: CODE_HERE, DS: DATA_HERE
• The END Directive
• Tells the assembler to stop reading
• instruction or statements that are written after END will be ignored.
LABEL
Used to give the name to the current value in the location counter.
The LABEL directive must be followed by a term which specifies the type you want associated with that name.