我是NASM的新手。我收到了错误:
操作码和操作数的无效组合
位于第一行
mov si,bl ;si contains address of number string
mov cx,7 ;once for each line
jmp print_num ;print the number
loop line_loop ;decrement cx, repeat if cx<>0
int 20h
答案 0 :(得分:0)
si
是16位寄存器,而bl
是8位寄存器。当操作数都在相同位时,您只能使用 mov 指令。
作为问题的解决方案,请使用bx
代替bl
mov si,bx
这是因为Intel 8086处理器使用16位寻址而不是8位。
顺便说一下,在编写32位应用程序时,可以使用esi
和ebx
。