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

Question No: 1 Run and analyze the following program and tellwhat will be the ou

ID: 3608420 • Letter: Q

Question

Question No: 1

Run and analyze the following program and tellwhat will be the out put of this program ? Marks: 10

[org 0x0100]

mov ax, 0x000D

int 0x10

mov ax, 0x0C07

xor bx, bx

mov cx, 160

mov dx, 100

l1: int 0x10

loop l1

mov ah, 0

int 0x16

mov ax, 0x0003

int 0x10

mov ax, 0x4c00

int0x21

Question No: 2

Understand the following programcarefully and state what does each block(set of instruction havingsame color) do? Write your answer against each instruction Marks:10

MOV AH,2CH

INT 21H

MOV AL,CH

CALLCONVERT

MOV [BX],AX

MOV AL,CL

CALLCONVERT

MOV [BX + 3],AX

MOV AL,DH

CALLCONVERT

MOV [BX + 6],AX

CONVERTPROC

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...
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote