实验4 [bx]与loop的使用
2017-04-21 22:57
337 查看
做这个实验时我认为小菜一碟,认为很快就会搞定,但是等我编好程序,编译连接的时候出现了问题,我摸不着头脑,不知道问题出现在哪里,下面时出现问题的程序:
出现的编译问题:
其中显示mov [ax],bl出现错误,这到底是怎么回事,我看了半天,没有语法错误。于是找度娘打听情况,网上有人说是因为bx一般用来索引地址,而ax一般用来存储中间变量,于是我改了一下寄存器的使用,用bx来索引内存地址,编译后未出错。
结论:bx用来索引地址,ax不能用来索引地址。
assume cs:codesg codesg segment mov ax,20h mov ds,ax mov bx,0 mov ax,0 mov cx,64 s:mov [ax],bl;attention, ax can not be index inc ax inc bx loop s mov ax,4c00H int 21H codesg ends end
出现的编译问题:
其中显示mov [ax],bl出现错误,这到底是怎么回事,我看了半天,没有语法错误。于是找度娘打听情况,网上有人说是因为bx一般用来索引地址,而ax一般用来存储中间变量,于是我改了一下寄存器的使用,用bx来索引内存地址,编译后未出错。
assume cs:codesg codesg segment mov ax,20h mov ds,ax mov bx,0 mov ax,0 mov cx,64 s:mov [bx],al;attention, ax can not be index inc ax inc bx loop s mov ax,4c00H int 21H codesg ends end
结论:bx用来索引地址,ax不能用来索引地址。
相关文章推荐
- 实验4 [bx]和loop的使用——第二小题
- 汇编语言:实验四 [bx]和loop的使用
- 汇编语言 王爽(第三版) 实验4 [bx]和loop的使用
- 汇编语言(王爽)--实验4 [bx]和loop的使用
- 实验4 [bx]和loop的使用
- 实验4 [bx]和loop的使用
- 第五章:loop和[bx]的联合使用
- 8086汇编4:bx与loop的使用
- 汇编试验四:[bx] 和 loop 的使用
- ASM-第五章[BX]和loop指令的使用
- [Hb-IV] 使用[bx]和loop
- [网络问题,截图以后再传]本实验是设计性实验。目的在于使用关系数据库标准语言SQL,掌握视图和索引的操作。
- 使用手机连结电脑,发送端消息的实验步骤
- 实验分析C#中三种计时器使用异同点
- CCNP实验 1-2:在NAT中使用Access List 和Route Maps
- 实验分析C#中三种计时器使用异同点
- 【实验9.11.2】 配置BGP和NAT一起使用【IEEEnjoy.L.ZH】
- Orchestration中使用Loop遍历消息
- C#强化系列文章三:实验分析C#中三种计时器使用异同点
- [C++]实验八:学习类的聚集使用方法