Page 1 of 1

Nasm Question

Posted: Thu Jun 27, 2002 11:00 pm
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

RE:Nasm Question

Posted: Thu Jun 27, 2002 11:00 pm
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.

RE:Nasm Question

Posted: Thu Jun 27, 2002 11:00 pm
by Brill
Thanx

Brill