0% found this document useful (0 votes)
48 views1 page

Prac. Task 2-Arithmetic Operation (100314)

The document provides instructions for three assembly language programming tasks: 1) Calculate C = (BCH + 10000101B - 23) OR 10101010B, storing the result in memory location 0041H. 2) Calculate 0040H = 0039H - 35H + B, using the data ABH for 0039H and 0AH for B, storing the adjusted result in 0041H. 3) Calculate D/0050 = x + y - B x C, using the data 12H for x, 15H for y, 20H for B, and 0DH for C, exclusive OR the result with 23H and store in register E and memory 0051H.

Uploaded by

Najwa LolyPop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

Prac. Task 2-Arithmetic Operation (100314)

The document provides instructions for three assembly language programming tasks: 1) Calculate C = (BCH + 10000101B - 23) OR 10101010B, storing the result in memory location 0041H. 2) Calculate 0040H = 0039H - 35H + B, using the data ABH for 0039H and 0AH for B, storing the adjusted result in 0041H. 3) Calculate D/0050 = x + y - B x C, using the data 12H for x, 15H for y, 20H for B, and 0DH for C, exclusive OR the result with 23H and store in register E and memory 0051H.

Uploaded by

Najwa LolyPop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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