Ignore:
Timestamp:
May 8, 2013, 5:10:33 PM (12 years ago)
Author:
David Azarewicz
Message:

Fixed up timer functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/init.asm

    r155 r157  
    2929                PUBLIC  _end_of_data         ; end of all data (label)
    3030                PUBLIC  _end_of_code         ; end of all code (label)
     31                PUBLIC  _udelay              ; spin for microseconds
     32                EXTRN   DOSIODELAYCNT:ABS
    3133
    3234; ----------------------------------------------------------------------------
     
    198200                .386
    199201
     202; void udelay(u16 microseconds);
     203_udelay         PROC NEAR
     204                enter   0, 0
     205                mov     cx, word ptr [bp+4]
     206@OuterLoop:
     207                mov     ax, DOSIODELAYCNT
     208                shl     ax, 1
     209@InnerLoop:
     210                dec     ax
     211                jnz     short @InnerLoop               
     212                loop    @OuterLoop
     213
     214                leave
     215                ret
     216_udelay          ENDP
    200217
    201218; Read long value from MMIO address; need to do this here to get real
Note: See TracChangeset for help on using the changeset viewer.