汇编程序16:实验5(6)顺序赋值段数据
1 assume cs:code 2 3 a segment 4 dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh 5 a ends 6 7 b segment 8 dw 0,0,0,0,0,0,0,0 9 b ends 10 11 code segment 12 start: 13 mov ax,a 14 mov ds,ax //定义第一个段空间 15 mov ax,b 16 mov es,ax //定义第二个段空间 17 mov bx,0 18 mov cx,16 19 s: 20 mov dl,[bx] //内存单元的传递,用dx寄存器低位保存 21 mov es:[bx],dl //8位寄存器值传递 22 inc bx 23 loop s 24 mov ax,4c00h 25 int 21h 26 code ends 27 28 end start