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

Write a program in assembly language TASM only when user enters A D get displaye

ID: 3792823 • Letter: W

Question

Write a program in assembly language TASM only when user enters A D get displayed when user enters B E gets displayed when user enters C F gets displayed write program for these 3 instructions only Please i need code in TASM Write a program in assembly language TASM only when user enters A D get displayed when user enters B E gets displayed when user enters C F gets displayed write program for these 3 instructions only Please i need code in TASM when user enters A D get displayed when user enters B E gets displayed when user enters C F gets displayed write program for these 3 instructions only Please i need code in TASM

Explanation / Answer

stack segment

stack ends


data segment
msg1 db 'please enter A, B or C only $'
data ends

printmsg macro msg
lea dx,msg
mov ah,09h
int 21h
endm


code segment

assume cs:code,ds:data,ss:stack

start:
mov ax,data
mov ds,ax
main proc

mov ah, 1 ; get user input
int 21h
mov bl, al ; save input to bl

cmp bl,'A'
jne nota
mov ah,2
mov dl,'D'
int 21h

nota:
cmp bl,'B'
jne notb
mov ah,2
mov dl,'E'
int 21h

notb:
cmp bl,'C'
jne notc
mov ah,2
mov dl,'F'
int 21h

notc:
printmsg msg1

mov ah,4ch ; return control to dos
int 21h
main endp
code ends
end start

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