上机练习3.5
.model small
.stack
.data
source DB 33h,34h,35h,36h
target DB 80 DUP(?)
.code
main PROC
mov ax,@data
mov ds,ax
mov es,ax
cld
mov si,OFFSET source
mov di,OFFSET target
mov cx,80
rep movsb
mov si,0
mov bx,OFFSET target
AGAIN:
mov dl,[bx+si]
mov ah,2
int 21h
inc si
cmp si,80
jb AGAIN
mov ah,4ch
int 21h
main ENDP
END main
上机练习3.6
.model small
.stack
.data
source DW 33h,34h,35h,36h
target DW 81 DUP(?)
.code
main PROC
mov ax,@data
mov ds,ax
mov es,ax
cld
mov si,OFFSET source
mov di,OFFSET target
mov cx,80
rep movsw
mov BYTE PTR [di],'$'
mov bx,OFFSET target
mov ah,9
int 21h
mov ah,4ch
int 21h
main ENDP
END main