Skip to content

Instantly share code, notes, and snippets.

@MakaAlbarn001
Last active November 12, 2018 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MakaAlbarn001/92409c15457293cb3a7a458a412256ea to your computer and use it in GitHub Desktop.
Save MakaAlbarn001/92409c15457293cb3a7a458a412256ea to your computer and use it in GitHub Desktop.
# Define the contnts of the Multiboot Header
.set MAGIC, 0xE85250D6 # Multiboot 2 magic value
.set ARCH, 0
.set LENGTH, (multiboot_header_end - multiboot_header)
.set CHECKSUM, -(MAGIC + ARCH + LENGTH)
# Store the contents of the Multiboot header at the beginning of the file.
.section .multiboot
.align 8 # Align the section on the 64-bit boundary.
multiboot_header:
.long MAGIC
.long ARCH
.long LENGTH
.long CHECKSUM
multiboot_info_req:
.short 1 # multiboot header tag type
.short 0 # multiboot header tag flags
.long (multiboot_info_req_end - multiboot_info_req)
.long 4 # basic memory information tag request
.long 6 # memory map information tag request
multiboot_info_req_end:
.short 0
.short 0
.long 8
multiboot_header_end:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment