|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- assume cs:codesg,ds:datasg,ss:stacksg
- datasg segment
- db '1. display '
- db '2. brows '
- db '3. replace '
- db '4. modify '
- datasg ends
- stacksg segment
- dw 10 dup(0)
- stacksg ends
- codesg segment
- start:
- mov ax,datasg
- mov ds,ax
- mov ax,stacksg
- mov ss,ax
- mov sp,20H
-
- mov bx,0
- mov cx,4
- s1: mov si,0
- push cx
- mov cx,4
- mov ah,0
- s2: mov al,byte ptr[bx+3+si];为什么一定要加byte ptr,不是可以根据寄存器判断处理的长度吗
- and al,11011111b
- mov byte ptr[bx+3+si],al
- inc si
- loop s2
-
- pop cx
- add bx,16
- loop s1
-
- mov ax,4c00h
- int 21h
-
- codesg ends
- end start
复制代码
问题在上面的注释中,为什么一定要在mov al,[bx+3+si]这条语句前面加上byte ptr来指明这是一个字节型数据,不然就会报错A2070
甲鱼零基础汇编,39集,12:49,针对立即数的修饰
|
|