Thursday, December 11, 2008

Input and Output your Input in Assembly

.model small
.stack 100h
.data
msg db 10,13,'Enter 1st no.: $'

.code
mov ax,@data
mov ds,ax

mov ah,09h
mov dx, offset msg
int 21h

mov ah,01h
int 21h
mov bl,al
sub bl,30h
add bl,3
add bl,30h


mov ah,09h
mov dx,offset msg
int 21h

mov ah,02h
mov dl,bl
int 21h

mov ah,4ch
int 21h

end

No comments: