Pages

Saturday, February 12, 2011

Sample programs in assembly using a86.com(1)

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

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

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

a20:
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

0 comments:

Post a Comment