0% found this document useful (0 votes)
91 views10 pages

Microprocessor Machine Codes Guide

The document discusses microprocessor machine codes and arithmetic instructions. It provides examples of addressing modes and calculating machine codes. It also presents several questions related to writing assembly language programs that perform operations like copying data, comparing registers, and performing multiplication and division.

Uploaded by

Soumya Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views10 pages

Microprocessor Machine Codes Guide

The document discusses microprocessor machine codes and arithmetic instructions. It provides examples of addressing modes and calculating machine codes. It also presents several questions related to writing assembly language programs that perform operations like copying data, comparing registers, and performing multiplication and division.

Uploaded by

Soumya Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

MPI TUT-4

Microprocessor Machine
codes and Arithmetic
Instructions
Question 1

• Identify the addressing mode and calculate the machine code.


(i) MOV BL, CL ;opcode:100010
(ii) ADD AX, [SI] ;opcode:000000
(iii) MOV CX, 356DH; (Assume Big endian)
(iv) MOV AX, [2020H];
(v) MOV AX, [BX+34]
(vi) MOV [SI+600], BH
(vii) MOV AX, [BX+SI]
(viii) MOV [BX+SI+600], AH

9/13/2019 2

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


9/13/2019 3

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 2
Write a program that does the following.
a) Moves 1020H to AX, 056H to BL and C76H to
CX.
b) Copies the content of AX to DS, the content of
BH to AH, and the content of CX to DX.

9/13/2019 4

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 3

• Write a program to copy 25 to AL, ‘S’ to BL and


‘*’ to CL. Then move these to AH, BH and CH
respectively.

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 4

• How many operands does each of the


following instructions have?
a) ADD
b) ADC
c) INC

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 5

• The instruction INC [SI] seems ambiguous.


Why? How can the ambiguity be corrected?

9/13/2019 7

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 6

• What does the instruction CMP AX, BX do?

9/13/2019 8

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 7

• What is the role of OF and CF in


multiplication?
E.g.1) MOV AL, 0FFH
MOV BL, 02H
MUL BL
2) MOV AL, 0FFH
MOV BL, 01H
MUL BL

9/13/2019 9

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Question 8

• What happens if the DIV instruction is used


for a dividend of 1938H and divisor of 05?

9/13/2019 10

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION

You might also like