Understand the following program carefully and state what doeseach block(set of
ID: 3607990 • Letter: U
Question
Understand the following program carefully and state what doeseach block(set of instruction having same color) do? Write youranswer against eachinstruction Marks:10
MOV AH, 2CH
INT 21H
MOV AL, CH
CALL CONVERT
MOV [BX], AX
MOV AL, CL
CALL CONVERT
MOV [BX + 3], AX
MOV AL, DH
CALL CONVERT
MOV [BX + 6], AX
CONVERT PROC
MOV ah, 0
MOV DL, 10
DIV DL
OR AX, 3030H
RET
CONVERT ENDP
Explanation / Answer
Dear... MOV AH,2CH INT 21H INT 21H The function 21H returns hours (0-23) in CH, minutes(0-59) in CL, and seconds (0-59) in DH. MOV AL, CH CALL CONVERT MOV [BX], AX The first statement moves the values of CH to AL and call theprocedure CONVERT ,the function returns AX . The AX value isplaced at the address present in BX. MOV AL,CL CALL CONVERT MOV [BX + 3],AX The first statement moves the values of CL to ALand call the procedure CONVERT ,the function returns AX value andplaces value at the location after adding the address with 3present in BXMOV AL, DH CALL CONVERT MOV [BX + 6],AX The first statement moves the values of DH in AL and call the procedure CONVERT ,the function returns AXvalue and places value at the location after adding the addresswith 6 present in BX CONVERT PROC MOV ah, 0 MOV DL, 10 DIV DL OR AX,3030H RET CONVERT ENDP This is a procedure which updates the value of Ax and returnsAX value to function call Hope this will help you... This is a procedure which updates the value of Ax and returnsAX value to function call Hope this will help you...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.