0% found this document useful (0 votes)
12 views

HW 2

The document contains instructions for two questions on a homework assignment. Question 1 asks to write a program to fetch 100 signed data from memory and check how many are negative numbers less than FAh where the D2 bit is 0, displaying the result. Question 2 provides partial code to check the Auxiliary Carry flag after an addition and complete it to branch to the Back label if it is set or the End label if it is not set using no more than 5 additional lines of code.

Uploaded by

badibere3162
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

HW 2

The document contains instructions for two questions on a homework assignment. Question 1 asks to write a program to fetch 100 signed data from memory and check how many are negative numbers less than FAh where the D2 bit is 0, displaying the result. Question 2 provides partial code to check the Auxiliary Carry flag after an addition and complete it to branch to the Back label if it is set or the End label if it is not set using no more than 5 additional lines of code.

Uploaded by

badibere3162
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Name: Section: Number:

Homework 2
ELE 413
Q1) From a memory location starting at 2030h, 100 signed data are fetched and checked.
Write a program (include comments) below to find: How many of these data are negative
numbers less than FAh and also D2 bit 0 then display the result at port 20h after the
program terminates.

Q2) Complete the following code to check the Auxilary Carry (AC) in the space provided
after the following code as a result of addition. If AC is set as the result of addition go to
label Back: otherwise go to a label End: (don’t worry about where these labels actually are).
Do not use any PUSH or POP statements!. Your solution should be very much dependent on
the code given below.

Back: LXI H, 2000H


MOV A,M
ADI FFH
;write your code starting here, nothing above this line
;you are allowed to change the contents of the registers; MAXIMUM 5 more lines of code below!

You might also like