Changeset 119 in xtideuniversalbios for trunk/Assembly_Library/Inc/Macros.inc


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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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:
Note: See TracChangeset for help on using the changeset viewer.