Skip to content
Snippets Groups Projects
Commit 114fd809 authored by Le10.Anh@live.uwe.ac.uk's avatar Le10.Anh@live.uwe.ac.uk
Browse files

Add new file

parent 18890751
No related branches found
No related tags found
No related merge requests found
global loader ; Entry point label for ELF
MAGIC_NUMBER equ 0x1BADB002 ; Define the magic number constant
FLAGS equ 0x0 ; Multiboot flags
CHECKSUM equ -MAGIC_NUMBER ; Calculate the checksum
section .text ; Start of the text (code) section
align 4 ; Code must be aligned to 4 bytes
dd MAGIC_NUMBER ; Write the magic number into machine code
dd FLAGS ; Write the flags
dd CHECKSUM ; Write the checksum
loader: ; Loader label (defined as the entry point in the linker script)
mov eax, 0xCAFEBABE ; Set the value 0xCAFEBABE into the EAX register
.loop:
jmp .loop ; Infinite loop
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment