1.综合使用loop,[bx],编写汇编程序,实现向内存b800:07b8开始的连续16个字节单元重复填充字数据0403h
代码如下:
assume cs:code
code segment
mov ax,0b800h
mov ds,ax
mov bx,07b8h
mov cx,16
s: mov [bx],0403h
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end
编译连接如下:
运行结果如下:
(2).将源代码中字数据0403H修改为0441H,再次运行,截图显示结果
2.综合使用loop,[bx],编写完整汇编源程序,实现向内存0:200~0:23F依次传送数据0~63(3FH)。
assume cs:code code segment mov ax,0 mov ds,ax mov bx,200h mov cx,63 s: mov dx,ax mov [bx],dx inc ax inc bx loop s mov ax,4c00h int 21h code ends end
3.
assume cs:code code segment mov ax,cs mov ds,ax mov ax,0020h mov es,ax mov bx,0 mov cx,0010h s: mov al,[bx] mov es:[bx],al inc bx loop s mov ax,4c00h int 21h code ends end
从0000到0016 16进制为10 所以cx 16或0010h
总结:算是回忆起了前面内容,不过有些命令的用法毕竟有些忘了,要复习下