2015-09-23 23:22:15 -07:00
|
|
|
%include "x86_vram.asm"
|
|
|
|
|
|
2015-10-22 22:24:51 -07:00
|
|
|
extern rust_entry
|
2015-09-23 23:22:15 -07:00
|
|
|
|
|
|
|
|
section .bss
|
|
|
|
|
|
|
|
|
|
stack resb 0x1000
|
|
|
|
|
|
|
|
|
|
section .data
|
|
|
|
|
|
2015-10-22 22:24:51 -07:00
|
|
|
[bits 32]
|
2015-09-23 23:22:15 -07:00
|
|
|
section .text
|
2015-10-22 22:24:51 -07:00
|
|
|
global boot
|
2015-09-23 23:22:15 -07:00
|
|
|
|
2015-10-22 22:24:51 -07:00
|
|
|
%include "multiboot_header.asm"
|
2015-09-23 23:22:15 -07:00
|
|
|
%include "x86_vram_functions.asm"
|
|
|
|
|
|
2015-10-22 22:24:51 -07:00
|
|
|
boot:
|
|
|
|
|
mov esp, stack + 0x100
|
2015-09-23 23:22:15 -07:00
|
|
|
xor ebp, ebp
|
2015-10-22 22:24:51 -07:00
|
|
|
mov eax, 0x55
|
2015-09-23 23:22:15 -07:00
|
|
|
jmp main
|
|
|
|
|
|
|
|
|
|
main:
|
|
|
|
|
push word BG.CYAN | ' '
|
|
|
|
|
call clear
|
|
|
|
|
add esp, 2
|
2015-10-22 22:24:51 -07:00
|
|
|
call rust_entry
|
|
|
|
|
|
2015-09-23 23:22:15 -07:00
|
|
|
push dword BG.BLACK | FG.YELLOW | FG.BRIGHT | 'A'
|
|
|
|
|
push dword 0
|
|
|
|
|
push dword 0
|
|
|
|
|
call write_to_coord
|
|
|
|
|
add esp, 12
|
2015-10-22 22:24:51 -07:00
|
|
|
|
|
|
|
|
loop_label:
|
|
|
|
|
jmp loop_label
|
2015-09-23 23:22:15 -07:00
|
|
|
|
|
|
|
|
halt:
|
|
|
|
|
hlt
|
|
|
|
|
jmp halt
|