Nasm Question

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.
Post Reply
Brill

Nasm Question

Post by Brill »

Hi, my kernel that gets loaded by grub and should have information pased to it. like memory, video modes etc.
But i need to extract the first 32bits, the flags, into a variable to test what was included in the information and i don't know how to _just_ get the 32bits worth of flag data. I thought that maybe it would be:

mov EAX, [EBX+32]

but im thinking, no, that will get the lower memory into EBX and not bits 0-32.
Right?
So hows it done? Just the 32bit 'o' flags please?
Thanx in advance

Regards, Brill
Schol-R-LEA

RE:Nasm Question

Post by Schol-R-LEA »

Actually, since flags is the first field in the data structure,

mov EAX, [EBX]

should extract it correctly. Again, making a struc to map the fields may be useful, as you could then use

mov EAX, [EBX + multiboot_data.flags]

or something along those lines. If all you need ios the flags data, though, it isn't necessary.
Brill

RE:Nasm Question

Post by Brill »

Thanx

Brill
Post Reply