nasm invalid operand type
Posted: Mon May 11, 2020 2:42 am
was practising writing a boot loader,
in print, [sp+2] is causing the issue,
but move si, [bp+4] on the other hand is no problem..
what is wrong with [sp+2] expression?
in print, [sp+2] is causing the issue,
but move si, [bp+4] on the other hand is no problem..
what is wrong with [sp+2] expression?
Code: Select all
print:
mov ax, [sp+2] ; si points to start of message
;mov si, [bp+4] ; grab the pointer to the data
mov bh, 0x00
mov bl, 0x00
mov ah, 0x0E
.loop:
mov al, [si]
inc si
cmp al,0
je return
int 0x10
jmp .loop
return:
ret 2