MPMC Unit 2 Programming Part1
MPMC Unit 2 Programming Part1
Unit II
Instruction Set and
Assembly Language Programming of 8086:
Part 1
B.Tech, ETM,
II Year, II Semester
N.Ramakrishna
Dept. of Electronics and Telematics
GNITS, Hyderabad
28 March 2022 MPMC - N.Ramakrishna Unit II Part 1 1
Syllabus
Unit II
Instruction Set and
Assembly Language Programming of 8086:
• Instruction formats
• Addressing modes
• Instruction set
• Assembler directives
• Macros
• Simple programs involving logical, branch and
call instructions, sorting,
evaluating arithmetic expressions,
string manipulations.
Examples:
MOV AL, AH MOV SI, BX
MOV CH, BL MOV ES, AX
Example:
MOV AL, 45H MOV BX, 34E3H
MOV CL, ‘Q’ MOV PRICE, 40H
Is this correct?
MOV DS, 2300H
(Segment registers are not allowed to be used)
Example:
MOV AX, [2345H] Offset in DS
MOV [1089H], AL How many bytes of data?
Also
MOV AX, PRICE
MOV COST, AL
Example:
MOV CL, 10[BX] or MOV CL, [BX+10]
MOV CL, [BX][10]
MOV CL, PRICE[BX]
PRICE defined earlier as 10
Example:
MOV DL, 5[BX][DI] ; EA = 5 + BX + DI
MOV 5[BP][SI], AX ; EA = 5 + BP + SI
MOV CL, COST[BX][SI] ;EA = COST + BX + SI