Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Understand the following programcarefully and state what does each block(set of

ID: 3608158 • Letter: U

Question

Understand the following programcarefully and state what does each block(set of instruction havingsame color) do? Write your answer 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

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 BX
MOV 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...