Write and run (using appropriate calling program) a near procedure in 8086 assembly language that checks if the input parameter has a value zero or not. If the value is zero subroutines terminates the program else returns a value 1 in AL register.
Answers
Answered by
3
"DATA SEGMENT
MSG1 DB 10,13,”ENTER ANY ASCII VALUE : $”
MSG2 DB 10,13,”PRINTING AL VALUE : $”
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
CALL PRINT_AL
MOV AH,4CH
INT 21H
CODE ENDS
PRINT_AL PROC NEAR
MOV AH,1
INT 21H
MOV BL,AL
The whole concept of this question will follow the following text: LEA DX,MSG2
MOV AH,9
INT 21H
MOV DL,BL
MOV AH,2
INT 21H
RET
PRINT_AL ENDP
END START"
Similar questions
Science,
6 months ago
Geography,
6 months ago
Math,
1 year ago
English,
1 year ago
Social Sciences,
1 year ago