Prac. Task 2-Arithmetic Operation (100314)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Practical Task 2 (January 2014)

Module :
Microcontroller
Code :
SRD 24203
Chap 2 Instruction Set Arithmetic & Logical Operation

Instruction: Your report should consist of:
i. Assembly language
ii. Hex code (Hand assemble into machine code) ORG 1000H
iii. Final output and the location of the result
iv. Flag register

Question 1: Write a program to solve the following equation:
i. C = (BCH + 10000101B 23) OR 10101010B
ii. 0040H = 0039 - 35H + B, where the data for memory and register are as follows:
0039H = ABH,
B = 0AH
Then, apply the decimal adjustment to the result obtain and store in memory
location 0041.

iii. D/0050 = x + y - B x C, where the data for each variables and registers stored as
follow. Used the given data to test your program:
0045 = 12H (x)
0046 = 15H (y)
B = 20H
C = 0DH
From the result obtain, then apply the logical exclusive OR with the immediate
data, 23H and store the final result in register E and memory location 0051H.

You might also like