Академический Документы
Профессиональный Документы
Культура Документы
Instructions:
Partially or fully copied assignments will be marked as zero.
Only handwritten solution on A4 page will be accepted.
Late submissions are not allowed and you can submit the assignment during the class only.
Include comments in your codes/program for a better understanding.
For question number 4 there is no need to rewrite the code. Just put the instruction number
and your answer in your solution.
a) mov al,0D4h
b) shr al,1 ; AL =
c) mov al,0D4h
d) sar al,1 ; AL =
e) mov al,0D4h
f) sar al,4 ; AL =
g) mov al,0D4h
h) rol al,1 ; AL =
i) mov al,0D4h
j) ror al,3 ; AL =
k) mov al,0D4h
l) rol al,7 ; AL =
m) stc
n) mov al,0D4h
o) rcl al,1 ; AL =
p) stc
q) mov al,0D4h
r) rcr al,3 ; AL =
proc1 PROC
pushad
mov ecx, 8
mov ebx, eax
loop2:
mov edx, 0
shld edx, ebx, 4
rol ebx, 4
cmp dl, 10
jae case2
case1:
add dl, 30h
jmp finish
case2:
add dl, 37h
finish:
mov al, dl
call WriteChar
loop loop2
popad
ret
proc1 ENDP
Good Luck