-2
NASM不在我的程序的printstr子例程中解析命令'mull byte [bp + 10]'。我已經用演講指令重新檢查了代碼,並且不能明白它爲什麼這樣做。此外,它不直接執行(32位win7)或通過dosbox在屏幕上或清除屏幕上進行任何打印。錯誤:解析器:預期的指令
[org 0x100]
jmp start
message: db 'hello world'
length: dw 11
clr: push es
push ax
push di
mov ax, 0xb800
mov es, ax
mov di, 0
nxt: mov word[es:di], 0x0720
add di,2
cmp di,4000
jne nxt
pop di
pop ax
pop es
ret
printstr: push bp
mov bp,sp
push es
push ax
push cx
push si
push di
mov ax, 0xb800
mov es, ax
mov al, 80
mull byte [bp+10]
add ax, [bp+12]
shl ax, 1
mov di, al
mov si, [bp+6]
mov cx, [bp+4]
mov ah, [bp+8]
nextchar: mov al, [si]
mov [es:di], ax
add di, 2
add si, 1
loop nextchar
pop di
pop si
pop cx
pop ax
pop es
pop bp
ret 10
start: call clr
mov ax, 30
push ax
mov ax, 20
push ax
mov ax, 1
push ax
mov ax, message
push ax
push word [length]
call printstr
mov ax, 0x4c00
int 0x21
'mul'指令中有一個'l'。 – 2012-03-06 12:19:03