Nhap chuoi S1, gop vao S2, in ra man hinh

.model small

.stack 100h

.data

s2 db 80,0,80 dup ("$")

s1 db 80,00,80 dup ("$")

s db 160,0,160 dup ("$")

.code

main proc

mov ax,@data

mov ds,ax

mov es,ax

cld

;nhap chuoi s1

lea dx,s1

mov ah,0ah

int 21h

;xuong dong

mov ah,2

mov dl,0dh

int 21h

mov dl,0ah

int 21h

;nhap chuoi s2

lea dx,s2

mov ah,0ah

int 21h

;xuong dong

mov ah,2

mov dl,0dh

int 21h

mov dl,0ah

int 21h

;copy chuoi s1 vao s

lea di,s+2

lea si,s1+1

mov cx,[si]

xor ch,ch

inc si

rep movsb

;in chuoi s ra man hinh

lea dx,s+2

mov ah,9

int 21h

;tra ve dos

mov ah,4ch

int 21h

main endp

end

Bạn đang đọc truyện trên: AzTruyen.Top

Tags: