从SOURCE_BUFFER单元开始存放了20个字母A, 编程将这20个字母A的字符 串向下移10个单元.
程序员文章站
2024-01-31 09:04:52
...
从SOURCE_BUFFER单元开始存放了20个字母A, 编程将这20个字母A的字符串向下移10个单元.
data segment
source_buffer db 20 dup('A')
data ends
extra segment
dest_buffer db 20 dup( ? )
extra ends
code segment
main proc far
assume cs:code,ds:data,es:extra
start:
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
mov ax,extra
mov es,ax
lea si,source_buffer
lea di,source_buffer+10
cld
mov cx,20
rep movsb
ret
main endp
code ends
end start