Hello World input as a character array and display it.Simple user input output program.User input Hello World String and program output it as it is in assembly language.
Sample Execution :
input: HELLO WORLD
output: HELLO WORLD
/*
*
* Prosen Ghosh
* American International University - Bangladesh (AIUB)
*
*/
Solution:
.model small
.stack 100h
.data
newline db 0ah,0dh
str DB ?,?,?,?,?,?,?,?,?,?,?
finsih db '$'
.code
main proc
mov ax,@data
mov ds,ax
mov ah,1
int 21h
mov str,al
int 21h
mov str+1,al
int 21h
mov str+2,al
int 21h
mov str+3,al
int 21h
mov str+4,al
int 21h
mov str+5,al
int 21h
mov str+6,al
int 21h
mov str+7,al
int 21h
mov str+8,al
int 21h
mov str+9,al
int 21h
mov str+10,al
mov ah,9
lea dx,newline
int 21h
mov ah,4ch
int 21h
main endp
end main
0 nhận xét:
Đăng nhận xét