Well, thanks for the replies and ideas anyway
Off topic

Can you recommend any other tutorials like bkerndev?
I know how some of the bitwise operators like << and & work,
but what are &=, ^=, |= and %
OSDever has some great tutorials and documentations, and since they are back now...Martius wrote:
Can you recommend any other tutorials like bkerndev?
Code: Select all
; This is the kernel's entry point.
[BITS 32]
global start
start:
mov esp, _sys_stack ; This points the stack to our new stack area
jmp stublet ; Jump over the GRUB info crap
; This part MUST be 4byte aligned, so we solve that issue using 'ALIGN 4'
ALIGN 4
mboot:
; Multiboot macros to make a few lines later more readable
MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_AOUT_KLUDGE equ 1<<16
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_AOUT_KLUDGE
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
EXTERN code, bss, end
; This is the GRUB Multiboot header. A boot signature
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd MULTIBOOT_CHECKSUM
; AOUT kludge - must be physical addresses. Make a note of these:
; The linker script fills in the data for these ones!
dd mboot
dd code
dd bss
dd end
dd start
; This is where all the action happens
stublet:
extern _main ; Declare that MAIN is in the C File.
call _main ; Call MAIN (hello? how are you? Im doing pretty good myself. Well, goodbye.)
jmp $ ; MAIN finished. Dont know how though.