assume cs:codeseg,ds:dataseg
dataseg segment
db 'conversationzdf',0
db 'conversationzdf',0
db 'conversationzdf',0
db 'conversationzdf',0
db 'conversationzdf',0
db 'conversationzdf',0
dataseg ends
codeseg segment
start: mov ax,dataseg
mov ds,ax
mov cx,6
mov bx,0
s: call convert
add bx,10H
loop s
mov ax,4c00h
int 21h
convert: push cx
mov si,0
mov ch,0
change: mov cl,[bx+si]
jcxz ok
; and cl,11011111B
; mov [bx+si],cl
and byte ptr [bx+si],11011111B ; 此处如果不加上 byte ptr 就错了?
inc si
jmp change
ok: pop cx
ret
codeseg ends
end start
在第10章 问题 10.2 的改进中 , and指令的使用出错了
and [bx+si],11011111B 就不行, 得改成 and byte ptr [bx+si],11011111B
这是为什么呢?后面的 11011111B 是8位的,那应该默认就操作[si] 这一个字节,为何不行呢? |