Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
ass8.asm 785 Bytes
Copy Edit Raw Blame History
Ailoc authored 2023-09-08 10:43 . add some files
; 变址寄存器,SI(源变址寄存器)和DI(目标变址寄存器)寄存器
; 将字符串“welcome to masm”复制到它后面的数据区中
; 只有BX/BP/SI/DI可以用在[]内对内存单元进行寻址
; 基址变址寻址只能使用[bx+si/di]或者[bp+si/di]
; bx默认指向ds段,bp默认指向ss段
; 处理的数据的长度可以使用word ptr/byte ptr指明,ex: mov word ptr ds:[0],1
assume cs:code,ds:data
data segment
db 'welcome to masm!'
db '.................'
data ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0 ; 源数据起始地址
mov di,16 ; 目标数据起始地址
mov cx,8
l: mov ax,[si]
mov [di],ax
add si,2
add di,2
loop l
mov ax,4c00h
int 21h
code ends
end start
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化