Changeset 110 in xtideuniversalbios for trunk/Assembly_Library/Inc/Emulate.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/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
Note: See TracChangeset for help on using the changeset viewer.