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.
I want to retreive some info abbout what memory is available for me. so I tweaked the example from bare bones to include flag[6] in the multiboot header
What does the rest of your code show for the multiboot header as I'm not sure why qemu is throwing that error? I use qemu from time to time to test but mainly use bochs, I'd try running it in bochs and see what it gives you.
As stated in multiboot under section 3.3 Boot Information Format
If bit 6 in the ‘flags’ word is set, then the ‘mmap_*’ fields are valid, and indicate the address and length of a buffer containing a memory map of the machine provided by the bios. ‘mmap_addr’ is the address, and ‘mmap_length’ is the total size of the buffer. The buffer consists of one or more of the following size/structure pairs (‘size’ is really used for skipping to the next pair):
+-------------------+
-4 | size |
+-------------------+
0 | base_addr |
8 | length |
16 | type |
+-------------------+
where ‘size’ is the size of the associated structure in bytes, which can be greater than the minimum of 20 bytes. ‘base_addr’ is the starting address. ‘length’ is the size of the memory region in bytes. ‘type’ is the variety of address range represented, where a value of 1 indicates available ram, and all other values currently indicated a reserved area.
The map provided is guaranteed to list all standard ram that should be available for normal use.
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"
You don't need to set the 6th flag, as it's unsupported (and GRUB says that to you). For a memory map, you need to set only the MEMINFO flag. And in the structure provided by GRUB (and other Multiboot-compliant bootloaders) there's the `flags' entry. And in this entry the 6th bit is set when a memory map is provided.