注册 登录
编程论坛 汇编论坛

汇编中出现expected:instruction or directive问题怎么办,哪位高手帮忙解决下

漫步a 发布于 2012-12-03 00:20, 3524 次点击
data   segment
string db 'where there is a will,there is way.$'
count db ?
data   ends
code   segment
assume ds:data,cs:code
start: push ds
       sub ax,ax
       push ax
       mov ax,data
       mov ds,ax
       mov dx,0
begin: mov bx,offset string
       mov al,[bx]
       cmp al,24h
       jz fin
       cmp al,20h
       jnz next
       inc dx
next:  inc bx
       jmp begin
fin:   count,dx    ;汇编时提示这行出现expected:instruction or directive问题
code   ends
end    start      
提前先谢谢大家了     
6 回复
#2
wp2319572012-12-03 10:28
count,dx    是啥意思啊  印象中没有这条指令啊
#3
水哥2012-12-03 11:12
fin:   count,dx   
count 定义为字节db  dx是字  类型不匹配
#4
zklhp2012-12-03 12:03
mov count,dx

不知道楼主想干什么。。
#5
漫步a2012-12-03 22:01
回复 2楼 wp231957
少打了个mov
#6
漫步a2012-12-03 22:04
回复 4楼 zklhp
计算空格数的
#7
漫步a2012-12-03 22:07
谢谢大家的教导啊,我知道怎么改了
1