36 lines
591 B
ArmAsm
36 lines
591 B
ArmAsm
bits 32
|
|
|
|
section .multiboot
|
|
mb_magic dd 0x1badb002
|
|
mb_flags dd (1<<0)|(1<<1)|(1<<6)
|
|
mb_check dd -(0x1badb002 + ((1<<0)|(1<<1)|(1<<6)))
|
|
|
|
section .text
|
|
global _start
|
|
global clihlt
|
|
extern HalInit
|
|
extern ExecInit
|
|
_start:
|
|
mov esp, stack_bottom
|
|
mov [multiboot_eax], eax
|
|
mov [multiboot_ebx], ebx
|
|
call HalInit
|
|
call ExecInit
|
|
clihlt:
|
|
cli
|
|
hlt
|
|
jmp $
|
|
|
|
global HalFindROM
|
|
extern MultibootFindModule
|
|
HalFindROM:
|
|
jmp MultibootFindModule
|
|
|
|
section .bss
|
|
global multiboot_eax
|
|
global multiboot_ebx
|
|
multiboot_eax resd 1
|
|
multiboot_ebx resd 1
|
|
stack_top:
|
|
resd 512
|
|
stack_bottom: |