2004-07-29 07:12:51 UTC
previous
next
; $Id: entry.asm 17 2003-07-23 03:13:46Z kr4z $
; $HeadURL: http://kryptos.kr4z.com/svn/trunk/kernel/boot/entry.asm $
section boot progbits alloc exec write align=16
align 4
dd 0x1BADB002
dd (1<<0) | (1<<1) ; Bits 0 and 1 set (Page align and Memory fields)
dd -(0x1BADB002 + ((1<<0) | (1<<1)))
db 'kernel-info-tag-v1|name:kryptOS version --noversion--',0,'|version:--noversion--',0,'|site:http://kr4z.com/',0
align 4
times 100 dd 0
tempstack:
global entry
entry:
mov ecx, tempstack
mov esp, ecx
push ebx
push eax
mov al, 0x0E ; Reset the cursor position to (0,0)
mov dx, 0x3d4
out dx, al
mov al, 0
mov dx, 0x3d5
out dx, al
mov al, 0x0F
mov dx, 0x3d4
out dx, al
mov eax, 0
mov dx, 0x3d5
out dx, al
mov edi, 0xb8000 ; Clear the screen
mov ecx, 1000
cld
rep stosd
extern start
call start
global hang
hang:
hlt
jmp hang
section osdata nobits alloc noexec write align=4
global initmem
initmem resb 55000