Skip to content

Instantly share code, notes, and snippets.

@Nickforall
Created March 20, 2017 15:41
Show Gist options
  • Save Nickforall/8224a4d3c31b1ed1c6e2aae7a6519dc0 to your computer and use it in GitHub Desktop.
Save Nickforall/8224a4d3c31b1ed1c6e2aae7a6519dc0 to your computer and use it in GitHub Desktop.
Simple kernel entry point
global start
section .multiboot_header
header_start:
dd 0xe85250d6 ; magic number (multiboot 2 spec)
dd 0 ; architecture 0
dd header_end - header_start ; header length
; checksum
dd 0x100000000 - (0xe85250d6 + 0 + (header_end - header_start))
; required end tag
dw 0 ; type
dw 0 ; flags
dd 8 ; size
header_end:
section .text
bits 32
start:
mov dword [0xb8000], 0x026b024f
hlt ;stop execution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment