Changeset 60 in xtideuniversalbios for trunk/Assembly_Library/Src/Time/TimerTicks.asm


Ignore:
Timestamp:
Nov 25, 2010, 2:17:45 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Timeout count down is now stopped when any key pressed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Time/TimerTicks.asm

    r41 r60  
    22; Project name  :   Assembly Library
    33; Created date  :   24.7.2010
    4 ; Last update   :   3.8.2010
     4; Last update   :   22.11.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for system timer related operations.
     
    7272    ret
    7373
     74
    7475;--------------------------------------------------------------------
    75 ; Timeout counter can be initialized with TimerTicks_InitializeTimeoutFromAX.
    76 ;
    77 ; TimerTicks_SetCarryIfTimeoutFromDSBX
     76; TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
    7877;   Parameters:
     78;       AX:         Number of ticks left before timeout
    7979;       DS:BX:      Ptr to timeout variable WORD
    8080;   Returns:
     
    8585;--------------------------------------------------------------------
    8686ALIGN JUMP_ALIGN
    87 TimerTicks_SetCarryIfTimeoutFromDSBX:
    88     push    ax
     87TimerTicks_GetTimeoutTicksLeftToAXfromDSBX:
     88    push    dx
     89    mov     dx, [bx]
    8990    call    TimerTicks_ReadFromBdaToAX
    90     cmp     [bx], ax        ; Set CF if timeout WORD is less than time
    91     pop     ax
     91    xchg    ax, dx
     92    sub     ax, dx      ; AX = End time - current time
     93    pop     dx
    9294    ret
    9395
Note: See TracChangeset for help on using the changeset viewer.