Question: Q 1 . ( 6 POINTS ) Write some code to COUNT the number of characters in an input line. Q 2 . ( 1

Q1.(6 POINTS) Write some code to COUNT the number of characters in an input line.
Q2.(10 POINTS) Write assembly code for each of the following decision structures.
(A) IF AL0
THEN
Put FFh in AH
ELSE
Put 0 in AH
END_IF
longrightarrow
(B) Suppose DL contains the ASCII code of a character
(IF DL "A") AND (DL Z")
THEN
Display DL
END_IF
Q3.(9 POINTS) Write assembly code for each of the following structures:
a) Change the sign bit of Ax.
b) Multiply the value of Bx by 7
c) Assuming AL has a value less than 10, convert it to a decimal character.
Q4.(10 POINTS) Write a program to read two capital letters, and display them on the next line in alphabetical order.
Q5.(8 POINTS) Suppose DH contains 8Ah and CL contains 3,CF=1. What are the values of DH,CF,SF,PF,AF,ZF, and OF after the instruction.
SHL DH,CL ; is executed.
Q6.(7 POINTS) Suppose that Ax=0FFFFh,Bx=0EEEEh,Cx=0DDDDh,Dx=0CCCCh and SP=20h. Give the contents of AX,BX,CX,DX , and SP after executing the following instructions:
PUSH AX
ADD BX,1112h
PUSH BX
POP CX
PUSH CX
POP AX
XCHG AX,DX
 Q1.(6 POINTS) Write some code to COUNT the number of characters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!