Changeset 119 in xtideuniversalbios


Ignore:
Timestamp:
Feb 28, 2011, 4:29:11 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Moved LOAD_BDA_SEGMENT_TO to Macros.inc.
Location:
trunk/Assembly_Library
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosData.inc

    r116 r119  
    126126
    127127
    128 ;--------------------------------------------------------------------
    129 ; Load BDA (Bios Data Area) segment to wanted segment register.
    130 ;
    131 ; Use an exclamation point (!) as the third parameter when you want
    132 ; to force the use of the register in the second parameter. This is
    133 ; useful when that register needs to be zeroed in subsequent code or
    134 ; when stack usage is undesirable (ie speed is critical).
    135 ;
    136 ; LOAD_BDA_SEGMENT_TO
    137 ;   Parameters:
    138 ;       %1:     Destination Segment Register
    139 ;       %2:     Temporary WORD Register
    140 ;       %3:     Can be ! or empty
    141 ;   Returns:
    142 ;       %1:     BDA segment (zero)
    143 ;   Corrupts registers:
    144 ;       %2
    145 ;--------------------------------------------------------------------
    146 %macro LOAD_BDA_SEGMENT_TO 2-3
    147 %ifndef USE_186
    148     xor     %2, %2
    149     mov     %1, %2
    150 %elifidn %3, !
    151     xor     %2, %2
    152     mov     %1, %2
    153 %else
    154     push    BYTE 0
    155     pop     %1
    156 %endif
    157 %endmacro
    158 
    159 
    160128%endif ; BIOSDATA_INC
  • trunk/Assembly_Library/Inc/Macros.inc

    r110 r119  
    4545
    4646;--------------------------------------------------------------------
     47; Load BDA (Bios Data Area) segment to wanted segment register.
     48;
     49; Use an exclamation point (!) as the third parameter when you want
     50; to force the use of the register in the second parameter. This is
     51; useful when that register needs to be zeroed in subsequent code or
     52; when stack usage is undesirable (ie speed is critical).
     53;
     54; LOAD_BDA_SEGMENT_TO
     55;   Parameters:
     56;       %1:     Destination Segment Register
     57;       %2:     Temporary WORD Register
     58;       %3:     Can be ! or empty
     59;   Returns:
     60;       %1:     BDA segment (zero)
     61;   Corrupts registers:
     62;       %2
     63;--------------------------------------------------------------------
     64%macro LOAD_BDA_SEGMENT_TO 2-3
     65%ifndef USE_186
     66    xor     %2, %2
     67    mov     %1, %2
     68%elifidn %3, !
     69    xor     %2, %2
     70    mov     %1, %2
     71%else
     72    push    BYTE 0
     73    pop     %1
     74%endif
     75%endmacro
     76
     77
     78;--------------------------------------------------------------------
    4779; eENTER_STRUCT
    4880;   Parameters:
  • trunk/Assembly_Library/Src/Time/TimerTicks.asm

    r106 r119  
    6969    mov     [bx], ax                    ; Store timeout ticks
    7070    call    TimerTicks_ReadFromBdaToAX
    71     add     [bx], ax                    ; Add latest time to timeout ticks
     71    add     [bx], ax                    ; [bx] now contains end time for timeout
    7272    ret
    7373
Note: See TracChangeset for help on using the changeset viewer.