Changeset 50 in xtideuniversalbios for trunk/Assembly_Library/Src/Util/Memory.asm


Ignore:
Timestamp:
Oct 9, 2010, 5:47:26 PM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:
Removed Memory_ExchangeSSBPwithESDI since it obviously corrupted stack.
CGA detection is now only done once when initializing Display Context.
Moved File Library defines to File.inc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r46 r50  
    22; Project name  :   Assembly Library
    33; Created date  :   14.7.2010
    4 ; Last update   :   1.10.2010
     4; Last update   :   9.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for memory access.
     
    6767ALIGN JUMP_ALIGN
    6868Memory_ZeroSSBPwithSizeInCX:
     69    push    es
     70    push    di
    6971    push    ax
    70 
    71     call    Memory_ExchangeSSBPwithESDI
     72    call    Memory_CopySSBPtoESDI
    7273    call    Memory_ZeroESDIwithSizeInCX
    73     call    Memory_ExchangeSSBPwithESDI
    74 
    7574    pop     ax
     75    pop     di
     76    pop     es
    7677    ret
    7778
     
    8283;       ES:DI:  Ptr to destination buffer
    8384;   Returns:
    84 ;       Nothing
     85;       DI:     Updated by number of BYTEs stored
    8586;   Corrupts registers:
    8687;       AX
     
    9899;       ES:DI:  Ptr to destination buffer
    99100;   Returns:
    100 ;       Nothing
     101;       DI:     Updated by number of BYTEs stored
    101102;   Corrupts registers:
    102103;       Nothing
     
    105106Memory_StoreCXbytesFromAccumToESDI:
    106107    OPTIMIZE_STRING_OPERATION rep, stos
    107     sub     di, cx
    108108    ret
    109109
    110110
    111111;--------------------------------------------------------------------
    112 ; Memory_ExchangeSSBPwithESDI
    113112; Memory_ExchangeDSSIwithESDI
    114113;   Parameters
    115114;       Nothing
    116115;   Returns:
    117 ;       SS:BP/DS:SI and ES:DI are exchanged.
     116;       DS:SI and ES:DI are exchanged.
    118117;   Corrupts registers:
    119118;       Nothing
    120119;--------------------------------------------------------------------
    121120ALIGN JUMP_ALIGN
    122 Memory_ExchangeSSBPwithESDI:
    123     xchg    bp, di
    124     push    ss
    125     push    es
    126     pop     ss
    127     pop     es
    128     ret
    129 
    130 ALIGN JUMP_ALIGN
    131121Memory_ExchangeDSSIwithESDI:
    132     xchg    si, di
    133122    push    ds
    134123    push    es
    135124    pop     ds
    136125    pop     es
     126    xchg    si, di
    137127    ret
    138128
     
    140130;--------------------------------------------------------------------
    141131; Memory_CopySSBPtoESDI
     132; Memory_CopySSBPtoDSSI
     133; Memory_CopyESDItoDSSI
    142134;   Parameters
    143135;       Nothing
    144136;   Returns:
    145 ;       ES:DI:      Same as SS:BP
     137;       Copies farm pointer to different segment/pointer register pair
    146138;   Corrupts registers:
    147139;       Nothing
     
    152144    pop     es
    153145    mov     di, bp
     146    ret
     147
     148ALIGN JUMP_ALIGN
     149Memory_CopySSBPtoDSSI:
     150    push    ss
     151    pop     ds
     152    mov     si, bp
     153    ret
     154
     155ALIGN JUMP_ALIGN
     156Memory_CopyESDItoDSSI:
     157    push    es
     158    pop     ds
     159    mov     si, di
    154160    ret
    155161
Note: See TracChangeset for help on using the changeset viewer.