start.S
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb lgdtl (loadGDT) mov $0x10 lgdtl loadGDT
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx movl (__bss_start) movl __bss_start
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl movl (_end) movl _end
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov $kStack $kStack
globl _start text code32 globl _start text code32 _start _start
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax eax
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl edi edi
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov esp esp
globl _start text code32 x472 pushl ebp movl globl _start text code32 x472 pushl ebp movl esp esp
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp $start_next globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp $start_next start_next start_next
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp x08 x08
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov x18 x18 execFile
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov x20 x20 clearScreen cpuInfo floppyIsrhndlr hdRead kprint lncInt ne2k_init seek tty_print
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl x2000 x2000 biosCall kmain ubthread_create

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: start_8S.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    .globl_start
    .text
    .code32
    _start:
    movw$0x1234,0x472
    pushl%ebp
    movl%esp,%ebp
    pushl$0x00000002
    popfl
    /*CleartheBSS*/
    movl$(_end),%ecx
    movl$(__bss_start),%edi
    subl%edi,%ecx
    xorl%eax,%eax
    cld
    rep
    stosb

    /*LoadGDT*/
    lgdtl(loadGDT)
    mov$0x10,%eax
    mov%eax,%ds
    mov%eax,%es
    mov%eax,%fs
    mov%eax,%gs
    mov%eax,%ss
    mov$kStack,%eax
    addl$0x2000,%eax
    mov%esp,%edx
    mov%eax,%esp
    mov%eax,%ebp
    mov$0x18,%ax
    lldt%ax
    mov$0x20,%ax
    ltr%ax
    ljmp$0x08,$start_next
    start_next:
    push8(%edx)
    callkmain

    .data
    .commkStack,0x2000

    /***
    END
    ***/