No it dosn't like it.
Here have all the code I'm working with. When I looked at the main binary (The kernel) in the hex editor I saw the data first. >:(
Heres the code from the linker:
ALL:
init.obj
; kinit.obj
; system.obj
; ports.obj
; floppy.obj
; graphics.obj
; video.obj
; text.obj
; print.obj
MAIN: 10000 10000 0
*
Heres the code form init.asm
[tt]
;************************************
;* INIT.ASM v0.0.1 By Mike Cody (
[email protected])
;************************************
;Compiler: NASM v0.98
;Nasm -o init.obj -f obj hal\i386\init.asm
;--------------------
;Includes:
;/cpuid.asm -- Push/Pop for CPUID
[bits 16] ;Set us up in real mode.
;[extern main_]
;**********************************************************
;========================
; Start us up (Code)
;========================
;Because well be in Real Mode I would take this time
;to set the proper video modes and other code
;Even though the bootloader does this some things do **** up
SECTION .text
jmp start
start:
mov ah, 00h
mov al, 03h ;80x25x16 (Text mode)
int 10h
mov si, msgMadeit
call DisplayMessage
jmp hang
;========================
; CPUID/CPU Detection
;========================
call pCPUID
%include "D:\CodyOS\Hal\i386\CPUID.ASM"
cmp dx, 1
jz NoCPU
jnz PMode
;***NO 386 WAS FOUND****
;Showstopper!
NoCPU:
call ShowStop
mov si, msgNo386
call DisplayMessage
jmp hang
;*****************************
;========================
; Move to Protected mode
;========================
PMode:
;cli
;
;mov eax, cr0
;or ax, 1
;mov cr0, eax
;
;[bits 32]
;We are now in 32-bit protected mode :p
;Time to start CodyOS!
;=======================
; Run CodyOS!
;=======================
;Run the C/C++ portion of CodyOS
;call main_
;---------------------------
;If CodyOS fucks up somewhere and returns back here which should
;never happen (since control is transfered to codyos_core(); in \core\main.c
hang:
jmp hang
;---------------------------
;***********************
; SHOWSTOPPER Function
; Useage:
;
; call ShowStop
;***********************
ShowStop:
mov si, msgShowStop
call DisplayMessage
ret
;It be reccommend to hang the machine soon
;since Showstopper is never a good word
;***********************
;*********DISPLAYMESSAGE***********
;Prints a message to the screen
;Useage:
;mov si, Message
;call DisplayMessage
;**********************************
DisplayMessage:
;This code makes it so the CPU isn't wasted on useless
;clock cycles
mov ah, 0Eh ;BIOS Display function
mov bh, 0h ;Page
mov bl, 7h ;Colour even though this never seems to work
GoPrint:
lodsb ;Go to the next character
or al, al ;Is AL null?
jz DisplayDone ;EOS is hit so we return
int 10h ;BIOS Interrupt
jmp GoPrint ;Else
DisplayDone:
ret ;Return us to the function that called us
;**********************************
SECTION .data
;************************
; Declare varibles (Data)
;************************
msgShowStop db "SHOWSTOPPER: An unrecoverable fault has occured", 0x0D, 0x0A, 0x00
msgNo386 db "A compatible 80386 processor was not detected!", 0x0D, 0x0A, 0x00
msgMadeit db "Ok we made it!", 0x00
[/tt]