How to get Input Output froUser in 8086 Assembly language



Following operations is used to get input from user.

MOV ah,01h

int 21h

The input is stored in AL register.


Following operations is used to show output on the screen.

MOV ah,02h

int 21h

The output is show from DL register.


Sample Program

.model small

.data

input db ?

.code

mov ax,@data

mov ds,ax


mov ah,01h

int 21h

mov input,al


mov dl,input

mov ah,02h

int 21h


mov ah,4ch

int 21h

end


Output:


Download Tasm or Turbo Assembler here

Comments