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


Ignore:
Timestamp:
Feb 22, 2011, 7:06:50 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Moved eENTER_STRUCT and eLEAVE_STRUCT to Macros.inc.
File:
1 edited

Legend:

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

    r104 r110  
    22; Description   :   This is the place to put various generic macros.
    33;                   Should be included immediately after emulate.inc
     4%ifndef MACROS_INC
     5%define MACROS_INC
    46
    57;--------------------------------------------------------------------
     
    4042    %endif
    4143%endmacro
     44
     45
     46;--------------------------------------------------------------------
     47; eENTER_STRUCT
     48;   Parameters:
     49;       %1:     Number of bytes to reserve from stack
     50;   Returns:
     51;       SS:BP:  Ptr to beginning of struct reserved from stack
     52;   Corrupts registers:
     53;       FLAGS
     54;--------------------------------------------------------------------
     55%macro eENTER_STRUCT 1
     56    push    bp
     57    sub     sp, %1
     58    mov     bp, sp
     59%endmacro
     60
     61;--------------------------------------------------------------------
     62; eLEAVE_STRUCT
     63;   Parameters:
     64;       %1:     Number of bytes reserved with eENTER_STRUCT
     65;   Returns:
     66;       BP:     What it was before eENTER_STRUCT
     67;   Corrupts registers:
     68;       FLAGS
     69;--------------------------------------------------------------------
     70%macro eLEAVE_STRUCT 1
     71    add     sp, %1
     72    pop     bp
     73%endmacro
     74
     75
     76%endif ; MACROS_INC
Note: See TracChangeset for help on using the changeset viewer.