Changeset 110 in xtideuniversalbios for trunk/Assembly_Library


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

Changes to Assembly Library:

  • Moved eENTER_STRUCT and eLEAVE_STRUCT to Macros.inc.
Location:
trunk/Assembly_Library/Inc
Files:
3 edited

Legend:

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

    r105 r110  
    66; Include .inc files
    77%include "Emulate.inc"          ; Must be included first!
     8%include "Macros.inc"
    89%include "BiosData.inc"
    910%include "BiosFunctions.inc"
     
    1213%include "DosFunctions.inc"
    1314%include "File.inc"
    14 %include "Macros.inc"
    1515%include "Math.inc"
    1616%include "Registers.inc"
  • trunk/Assembly_Library/Inc/Emulate.inc

    r94 r110  
    236236    push    dx
    237237    push    bx
    238     ; SP before first push should be pushed here
     238    push    bx      ; SP before first push should be pushed here
    239239    push    bp
    240240    push    si
     
    263263    pop     si
    264264    pop     bp
    265     ; Old SP should be skipped here
     265    pop     di      ; Skip SP
    266266    pop     bx
    267267    pop     dx
     
    318318    leave
    319319%endif
    320 %endmacro
    321 
    322 
    323 ;--------------------------------------------------------------------
    324 ; eENTER_STRUCT
    325 ;   Parameters:
    326 ;       %1:     Number of bytes to reserve from stack
    327 ;   Returns:
    328 ;       SS:BP:  Ptr to beginning of struct reserved from stack
    329 ;   Corrupts registers:
    330 ;       FLAGS
    331 ;--------------------------------------------------------------------
    332 %macro eENTER_STRUCT 1
    333     push    bp
    334     sub     sp, %1
    335     mov     bp, sp
    336 %endmacro
    337 
    338 ;--------------------------------------------------------------------
    339 ; eLEAVE_STRUCT
    340 ;   Parameters:
    341 ;       %1:     Number of bytes reserved with eENTER_STRUCT
    342 ;   Returns:
    343 ;       BP:     What it was before eENTER_STRUCT
    344 ;   Corrupts registers:
    345 ;       FLAGS
    346 ;--------------------------------------------------------------------
    347 %macro eLEAVE_STRUCT 1
    348     add     sp, %1
    349     pop     bp
    350320%endmacro
    351321
  • 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.