24 lines
765 B
NASM
24 lines
765 B
NASM
; boot.asm
|
|
; Author: Josh Holtrop
|
|
; Date: 2009-06-25
|
|
; Adapted from HOS 0.16 source
|
|
|
|
%define CONSOLE_MEMORY 0xB8000
|
|
|
|
; Symbols from C
|
|
extern k_bootstrap, bootstrap_stack
|
|
|
|
;**************************************************************************
|
|
;* This is the first symbol in the .text section *
|
|
;**************************************************************************
|
|
[global start]
|
|
start:
|
|
mov cx, 0x0700 + 'a'
|
|
mov [CONSOLE_MEMORY+160*8+0*2], cx
|
|
|
|
mov esp, bootstrap_stack+4096 ; set up temporary stack space
|
|
|
|
push eax ; multiboot bootloader magic value
|
|
push ebx ; pointer to multiboot info struct
|
|
call k_bootstrap
|