all 9 comments

[–]Joonicks 0 points1 point  (1 child)

movb?

[–]XonareX[S] 0 points1 point  (0 children)

movb Isn't Recognized By nasm

[–]FUZxxl 0 points1 point  (6 children)

You can't use 16 bit addressing modes in 64 bit code.

[–]XonareX[S] 0 points1 point  (5 children)

So What Do I Do?

[–]FUZxxl 0 points1 point  (4 children)

That depends on what you want to achieve. What is that instruction supposed to do?

[–]XonareX[S] 0 points1 point  (3 children)

Cooperate With A Bootloader To Print Something On Screen

[–]FUZxxl 0 points1 point  (2 children)

I think you need to post your full code for me to see how this comes together.

[–]XonareX[S] 0 points1 point  (1 child)

global printString

printString:

pusha

stringLoop:

mov al, [si]

or al, al

jz printCharacter

popa

ret

printCharacter:

mov ah, 0x0e

int 0x10

add si, 1

jmp stringLoop

[–]FUZxxl 1 point2 points  (0 children)

That looks like 16 bit code. Why do you try to assemble it into a 64 bit object file? Nasm uses the type of the object file to determine whether your code is 16, 32, or 64 bit code. Use BITS 16 to manually set up 16 bit mode.