Saturday, February 12, 2011

Sample programs in assembly using

A program that replaces the second word with the first word and prints the replaced word.

.model small
org 100h
jmp main
heading1 db 'Intertech'
heading2 db 'LaserCorp','$'

main proc near
mov cx, 09
lea si, heading1
lea di, heading2

mov al, [si]
mov [di], al
inc si
inc di
dec cx
jnz a20
mov ah, 09h
lea dx, heading2
int 21h
int 20h
main endp
end main

OUTPUT: Intertech


Post a Comment