Sunday, 14 June 2015

Input Hello World And Display It In Assembly Language Solution.

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)


.model small
.stack 100h
    newline db 0ah,0dh
    str DB ?,?,?,?,?,?,?,?,?,?,?
    finsih db '$'

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

No comments:

Post a Comment