Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hey,
I've been working on a bootloader for a bit now, and currently I'm stuck at memory mapping; I've written an implementation for getting a memory map using function e820, but it fails in QEMU 0.9.1 and bochs 2.3.5. It doesn't crash, it just seems like function e820 doesn't exist. Now, this can't be the case, since both of these emulators can run operating systems which use function e820 for a memory map, so does anyone know where I could be going wrong? Here's my implementation:
I think the problem was more the endianness of the value moved in to edx. In this case, a string is not a pointer, it is 4 8 bit characters which are converted from ASCII to their numeric equivalents.
he problem here is that you would have to specify:
cyr1x wrote:'SMAP' is not directly converted to the equal "hex-sequence", but it is moved to the data-section and is replaced by a pointer to it.
Clear?
...
EDIT:
Actually I don't now if it is done by NASM, but most assembler's I used do it that way.
Can somebody prove that?
I certainly wouldn't trust an assembler that moved my data around randomly like that. I checked my answer on Bochs debugger before posting and it's probably a good idea to check things out before attempting a patronising answer in future.