648905586 发表于 2014-9-13 12:22:39

汇编问题,为什么要设置ds为0

检测点6.1
(1) 下面的程序实现依次用内存0:0~0:15单元中的内容改写程序中的数据,完成程序:
assume cs:codesg
codesg segment
dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
start: mov ax,0
mov ds,ax
mov bx,0
mov cx,8
s: mov ax,
mov cs:,ax
add bx,2
loop s
mov ax,4c00h
int 21h
codesg ends
end start为什么要设置ds=0,有点不明白

小靚同学Leon 发表于 2014-9-13 12:54:00

如题,内存0:0~0:15单元中,那么段地址为0,所以设置ds=0。
页: [1]
查看完整版本: 汇编问题,为什么要设置ds为0