汇编网首页登录博客注册
ameteur的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
好友圈
文章收藏
友情链接

[2011-09-29 15:15] 汇编语言 实验六 更灵活的定位内存地址

assume cs:codesg,ds:datasg,ss:stacksg
stacksg segment
        dw 0,0,0,0,0,0,0,0
stacksg ends

datasg segment
        db '1. displat      '
        db '2. brows        '
        db '3. replace      '
        db '4. modify       '
datasg ends

codesg segment
start:  mov ax,stacksg
        mov ss,ax
        mov ax,datasg
        mov ds,ax
        mov bx,0

        mov cx,4

s0:        push cx
        mov si,0
        mov cx,4

s:        mov al,[bx+si+3]
        and al,11011111b   ;后面一定要跟上后缀B否则编译器提示出错.or 小写改大 指定为1 
        mov [bx+si+3],al
        inc si
        loop s                        ;内循环

        add bx,16                ;灵活寻址.
        pop cx
        loop s0

        mov ax,4c00h
        int 21h
codesg ends
end start

总结:对于双重循环取决于LOOP的位置,对于AND和OR要灵活应用,以及字母大小写的转换.
评论次数(1)  |  浏览次数(504)  |  类型(汇编作业) |  收藏此文  | 

[  chinatree   发表于  2011-09-29 15:27  ]

对于双重循环取决于LOOP的位置?怎么说呢?

 
 请输入验证码  (提示:点击验证码输入框,以获取验证码