Switched FASM to NASM
If I'm gonna port a C compiler I might as well use and port NASM as it is more widely used anyway
This commit is contained in:
parent
5badddbada
commit
e21e42d318
3 changed files with 17 additions and 19 deletions
|
@ -1,15 +1,13 @@
|
|||
format elf
|
||||
use32
|
||||
|
||||
MULTIBOOT_PAGE_ALIGN equ (1 shl 0)
|
||||
MULTIBOOT_MEMORY_INFO equ (1 shl 1)
|
||||
MULTIBOOT_VIDEO_REQUEST equ (1 shl 2)
|
||||
MULTIBOOT_AOUT_KLUDGE equ (1 shl 16)
|
||||
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
|
||||
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN or MULTIBOOT_MEMORY_INFO or MULTIBOOT_VIDEO_REQUEST
|
||||
MULTIBOOT_PAGE_ALIGN equ 1 << 0
|
||||
MULTIBOOT_MEMORY_INFO equ 1 << 1
|
||||
MULTIBOOT_VIDEO_REQUEST equ 0 << 2
|
||||
MULTIBOOT_AOUT_KLUDGE equ 0 << 16
|
||||
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_REQUEST
|
||||
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
|
||||
|
||||
section '.multiboot' align 4
|
||||
section .multiboot
|
||||
align 4
|
||||
dd MULTIBOOT_HEADER_MAGIC
|
||||
dd MULTIBOOT_HEADER_FLAGS
|
||||
dd MULTIBOOT_CHECKSUM
|
||||
|
@ -23,14 +21,15 @@ section '.multiboot' align 4
|
|||
dd 768 ; video height
|
||||
dd 32 ; video depth
|
||||
|
||||
section '.bss' writable align 16
|
||||
section .bss
|
||||
align 16
|
||||
stack_bottom:
|
||||
rb 16384
|
||||
resb 16384
|
||||
stack_top:
|
||||
|
||||
section '.text' executable
|
||||
public _start
|
||||
extrn kmain
|
||||
section .text
|
||||
global _start
|
||||
extern kmain
|
||||
|
||||
_start:
|
||||
; Setup stack
|
||||
|
@ -41,8 +40,7 @@ _start:
|
|||
push eax
|
||||
call kmain
|
||||
|
||||
|
||||
@@:
|
||||
.hang:
|
||||
cli
|
||||
hlt
|
||||
jmp @b
|
||||
jmp .hang
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue