I'm using this directive:
Code: Select all
.intel_syntax prefix
Code: Select all
mov %esp, __stack_end
Code: Select all
mov esp, [__stack_end]
The second problem I ran into is a warning for this code:
Code: Select all
mov [0xb8000], %eax
Code: Select all
mov dword ptr [0xb8000], %eax
That doesn't make sense. Of course it's treating it as a memory reference. I very explicitly told it that it's a memory reference. Why would it give me a warning here where I explicitly said it's a memory reference and not give me a warning with my other code, where intuitively it should not have been a memory reference (and isn't in other assemblers)?
So how do I get rid of this warning? Is my syntax wrong? If so, how do I do it right?
(By the way, yes I know moving eax to address 0xb8000 (in the way I'm doing it) looks a little strange, but it's just temporary code to display two characters on the screen.)