q show a string in assembly languagemov ah 09hmov


Q. Show a string in assembly language?

MOV AH, 09H

MOV DX, OFFSET   BUFF

INT    21H

Here data in input buffer stored in data segment is intended to be displayed on monitor.

A complete program: 

Input a letter from keyboard and respond.  "The letter you typed is ___".

CODE SEGMENT 

; set the DS register

                        MOV AX, DATA

                        MOV DS, AX

; Read Keyboard

                        MOV AH, 08H

                        INT   21H

; Save input

                        MOV BL, AL

; Display first part of Message

                        MOV AH, 09H

                        MOV DX, OFFSET MESSAGE

                        INT 21 H

; Display character of BL register

                        MOV AH, 02H

                        MOV DL, BL

                        INT 21 H

; Exit to DOS

                        MOV AX, 4C00H

                        INT 21H

CODE ENDS

DATA SEGMENT

MESSAGE DB "The letter you typed is $"

DATA ENDS

END.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: q show a string in assembly languagemov ah 09hmov
Reference No:- TGS0327954

Expected delivery within 24 Hours