Assembly Language Program To Read A String And Display

Write an assembly program to READ YOUR NAME AND DISPLAY IT IN NEWLINE
title read and display name
dosseg
.model small
.stack 100H
.code
main proc
mov ax, @data ; initialize ds register
mov ds, ax
mov ah, 09h ; display message1
mov dx, offset msg1
int 21h
mov ah, 0ah ; read string
mov dx, offset string
int 21h
mov alt, 09h ; your name is
mov dx, offset msg2
int 21h
mov ah, 09h ; string output
mov dx, offset string
int 21h
mov ax, 4C00H ; return to DOS
int 21H
main endp
end main
.data
msg1 db “Enter your name $”
msg2 db “OAH, ODH, your name is $”
max db 20
len db ?
string db 20 DUP(‘$’)

Write an assembly program to READ YOUR NAME AND DISPLAY IT IN NEWLINE title read and display name dosseg.model small.stack 100H.code main proc mov ax, @data; initialize ds register mov ds, ax mov ah, 09h; display message1 mov dx, offset msg1 int 21h mov ah, 0ah; read string mov dx, offset string int 21h mov alt, 09h; your name is mov dx. To display a string on the screen we first has to move the offset of the string to be displayed to the register DX.(starting address of the string). String output sub routine has to be executed. For this we move 9h to AH thru mov ah,9h and execute int 21h. The string will be displayed on the screen.

Assembly Language Program To Read A String And Display One

Assembly Language Program To Read A String And Display

Assembly Language Program To Read A String And Display The Date

Read

Assembly Language Program To Read A String And Display Key

Program to input a string in assembly language programming in urdu,string input and output in assembly language,what is string in assembly in hindi,how to ge. Assembly language comment begins with a semicolon (;). It may contain any printable character including blank. It can appear on a line by itself, like −; This program displays a message on screen or, on the same line along with an instruction, like −. Add eax, ebx; adds ebx to eax Assembly Language Statements. .Program that prompts the user to enter a string, stores it and display it using procedures READSTR and DISPSTR. Program that prompts the user to enter a string, then counts and display the number of vowels and consonants in the string using SCASB and REPNE instructions.

Comments are closed.