timer.S
globl timerInt text code32 dx mov ax outb dx movl ecx globl timerInt text code32 dx mov ax outb dx movl ecx incl (%ecx) movl 4(%ecx) incl % ecx
globl timerInt text code32 dx mov ax outb globl timerInt text code32 dx mov ax outb al al
globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor edx div ebx test globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor edx div ebx test edx edx
globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor edx edx
globl timerInt text code32 dx mov ax outb dx movl ecx eax globl _vmm_pageFault text code32 esp eax pushl ebx movl movl
globl timerInt text code32 dx mov ax outb dx movl globl timerInt text code32 dx mov ax outb dx movl systemVitals systemVitals
globl timerInt text code32 globl timerInt text code32 timerInt timerInt idt_init
globl timerInt text code32 dx mov globl timerInt text code32 dx mov x20 x20

    /*****************************************************************************************
    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: timer_8S.xml 88 2016-01-12 00:11:29Z reddawg $

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

    .globltimerInt
    .text
    .code32
    timerInt:
    pusha/*Savealloftheregisters*/
    mov$0x20,%dx/*TheFollowingSendsOurEOIToTheMPIC*/
    mov$0x20,%ax
    outb%al,%dx
    movlsystemVitals,%ecx/*PutLocationOfSystemVitalsIntoECX*/
    incl4(%ecx)/*IncrementsysTicksour1000mscounter*/
    movl4(%ecx),%eax/*IncrementoursysUptimeby1Sif1000MS*/
    movl$200,%ebx/*HavePassed*/
    xor%edx,%edx
    div%ebx
    test%edx,%edx
    jnznext
    incl8(%ecx)
    next:
    movl4(%ecx),%eax/*TestIfquantumHasPassedIfSoThen*/
    movl12(%ecx),%ebx/*WeCanCALLsched*/
    xor%edx,%edx
    div%ebx
    test%edx,%edx
    jnzdone
    callsched
    done:
    popa/*RestoreRegisters*/
    iret

    /***
    END
    ***/