刚学汇编遇到一个问题
有个题目是在屏幕中间分别显示绿底闪烁红字,红底高亮绿字,红底高亮闪烁蓝字。出现了Improperoperandtype.这条错误。找了半天没找出来,帮我找找我写的东东哪错...
有个题目是在屏幕中间分别显示绿底闪烁红字,红底高亮绿字,红底高亮闪烁蓝字。出现了Improper operand type.这条错误。找了半天没找出来,帮我找找我写的东东哪错了,哪不好。谢了!
assume cs:code,ds:data
data segment
a db 'welcome to masm'
b db 0a4h,4ah,0c9h
data ends
code segment
start:mov ax,data
mov ds,ax
mov bx,0
mov si,0
mov di,offset a
mov ax,0b800h
mov ds,ax
mov cx,15
s:mov byte ptr es:[11*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[11*80+34+si], byte ptr ds:[di+15]
mov byte ptr es:[12*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[12*80+34+si], byte ptr ds:[di+16]
mov byte ptr es:[13*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[13*80+34+si], byte ptr ds:[di+17]
add si,2
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
assume cs:code,ds:data
data segment
a db 'welcome to masm'
b db 0a4h,4ah,0c9h
data ends
code segment
start:mov ax,data
mov ds,ax
mov bx,0
mov si,0
mov di,offset a
mov ax,0b800h
mov ds,ax
mov cx,15
s:mov byte ptr es:[11*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[11*80+34+si], byte ptr ds:[di+15]
mov byte ptr es:[12*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[12*80+34+si], byte ptr ds:[di+16]
mov byte ptr es:[13*80+33+si], byte ptr ds:[bx+di]
mov byte ptr es:[13*80+34+si], byte ptr ds:[di+17]
add si,2
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
2个回答
展开全部
错误太多,我就不给你指出来了,你自己对照一下吧:
====================================================以下为程序代码
assume cs:code,ds:data
data segment
a db 'welcome to masm'
b db 0a4h,4ah,0c9h
data ends
code segment
start:mov ax,data
mov ds,ax
mov bx,offset a
mov di,offset b
mov si,0
mov ax,0b800h
mov es,ax
mov cx,15
s:
mov al,[bx]
mov es:[11*160+32*2+si],al
mov al,[di]
mov es:[11*160+32*2+1+si],al
mov al,[bx]
mov es:[12*160+32*2+si],al
mov al,[di+1]
mov es:[12*160+32*2+1+si],al
mov al,[bx]
mov es:[13*160+32*2+si],al
mov al,[di+2]
mov es:[13*160+32*2+1+si],al
add si,2
inc bx
loop s
mov ah,07H
int 21H
mov ax,4c00h
int 21h
code ends
end start
====================================================以上为程序代码
----WDSYMH
====================================================以下为程序代码
assume cs:code,ds:data
data segment
a db 'welcome to masm'
b db 0a4h,4ah,0c9h
data ends
code segment
start:mov ax,data
mov ds,ax
mov bx,offset a
mov di,offset b
mov si,0
mov ax,0b800h
mov es,ax
mov cx,15
s:
mov al,[bx]
mov es:[11*160+32*2+si],al
mov al,[di]
mov es:[11*160+32*2+1+si],al
mov al,[bx]
mov es:[12*160+32*2+si],al
mov al,[di+1]
mov es:[12*160+32*2+1+si],al
mov al,[bx]
mov es:[13*160+32*2+si],al
mov al,[di+2]
mov es:[13*160+32*2+1+si],al
add si,2
inc bx
loop s
mov ah,07H
int 21H
mov ax,4c00h
int 21h
code ends
end start
====================================================以上为程序代码
----WDSYMH
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询