assume cs:code
code segment
dw 0123h, 0456h, 0789h, 0abch, 0defh, 0fedh, 0cbah, 0987h
start:
mov bx, 0
mov ax, 0
mov cx, 8
s:add ax, cs:[bx]
add bx, 2
loop s
mov ax, 4c00h
int 21h
code ends
end start
上述代码含义就是dw保存代码段,从CS开始的一片区域中,然后入口是start,把代码段的所有数累加起来。