|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
先看代码
- assume cs:codesg,ds:datasg,ss:stacksg '实验6
- datasg segment
- db '1. display......'
- db '2. brows........'
- db '3. replace......'
- db '4. modify.......'
- datasg ends
- stacksg segment
- dw 0,0,0,0,0,0,0,0
- stacksg ends
- codesg segment
- start:mov ax,stacksg
- mov ss,ax
- mov sp,16
- 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+3+si]
- and al,11011111b 'or al,11011111b
- mov [bx+3+si],al
- inc si
- loop s
- add bx,16
- pop cx
- loop s0
- mov ax,4c00h
- int 21h
- codesg ends
- end start
复制代码 如果按照红色的代码执行,结果出现什么呢,就是把 数据段里所有的数据全部置为........(对应的16进制为FF),何解,为什么一定必须add 就是置0 而or一定是置1呢 我想知道原理,如果按照书本字面理解,我个人觉得 add与or是通用的,但是既然他是分开讲的,为什么不讲清楚呢
|
|