error: parser: instruction expected
-
08-12-2019 - |
Domanda
NASM is not parsing command ' mull byte [bp+10] ' in the printstr subroutine of my program. i have rechecked the code with the lecture instructions and cannot phathom why it is doing so. also, it does not prin anything on screen or clear screen when executed either directly (32-bit win7) or via 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
Soluzione
According to the reference it's mul
, not mull
.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow