Tuesday, March 11, 2014

string operation in ASSEMBLY LANGUAGE

.model small
.stack 64
.data
a db 'pawan samarwal$'
b db 'sunil$'
c db 20 dup(?),'$'
.code
main proc far
mov ax,@data
mov ds,ax
lea di,b
lea si,a
lea bx,c
mov cx,5
a10:
mov al,[di]
mov [bx],al
inc bx
inc di
inc si
loop a10
mov cx,9
a30:
mov al,[si]
mov [bx],al
inc bx
inc si
loop a30

mov ah,9h
lea dx,c
int 21h
mov ah,4ch
int 21h
main endp
end main

No comments:

Post a Comment

Contributors

Translate