Changeset 97 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


Ignore:
Timestamp:
Jan 30, 2011, 6:43:08 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Inlined some initialization functions.
  • Removed alignment bytes from some initialization functions.
  • Removed creation of compatible DPTs.
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r90 r97  
    1313;       Nothing
    1414;   Returns:
    15 ;       Nothing
    16 ;   Corrupts registers:
    17 ;       AX, CX, DI, DS
    18 ;--------------------------------------------------------------------
    19 ALIGN JUMP_ALIGN
     15;       DS:     RAMVARS segment
     16;   Corrupts registers:
     17;       AX, CX, DI
     18;--------------------------------------------------------------------
    2019RamVars_Initialize:
    2120    push    es
    22     call    .StealMemoryForRAMVARS  ; Get RAMVARS segment to DS even if no stealing
    23     call    .ClearRamvarsFromDS
    24     pop     es
    25     jmp     DriveXlate_Reset
     21    ; Fall to .StealMemoryForRAMVARS
    2622
    2723;--------------------------------------------------------------------
     
    3430;       AX
    3531;--------------------------------------------------------------------
    36 ALIGN JUMP_ALIGN
    3732.StealMemoryForRAMVARS:
    3833    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    39     jz      SHORT RamVars_GetSegmentToDS
    40 
    41     LOAD_BDA_SEGMENT_TO ds, ax      ; Zero AX
     34    jz      SHORT .InitializeRamvars    ; No need to steal RAM
     35
     36    LOAD_BDA_SEGMENT_TO ds, ax          ; Zero AX
    4237    mov     al, [cs:ROMVARS.bStealSize]
    4338    sub     [BDA.wBaseMem], ax
    4439    mov     ax, [BDA.wBaseMem]
    45     eSHL_IM ax, 6                   ; Segment to first stolen kB (*=40h)
     40    eSHL_IM ax, 6                       ; Segment to first stolen kB (*=40h)
    4641    mov     ds, ax
    47     ret
    48 
    49 ;--------------------------------------------------------------------
    50 ; .ClearRamvarsFromDS
    51 ;   Parameters:
    52 ;       DS:     RAMVARS segment
    53 ;   Returns:
    54 ;       Nothing
     42    mov     WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS
     43    ; Fall to .InitializeRamvarsFromDS
     44
     45;--------------------------------------------------------------------
     46; .InitializeRamvars
     47;   Parameters:
     48;       Nothing
     49;   Returns:
     50;       DS:     RAMVARS segment
    5551;   Corrupts registers:
    5652;       AX, CX, DI, ES
    5753;--------------------------------------------------------------------
    58 ALIGN JUMP_ALIGN
    59 .ClearRamvarsFromDS:
    60     call    FindDPT_PointToFirstDPT ; Get RAMVARS/FULLRAMVARS size to DI
    61     mov     cx, di                  ; Copy byte count to CX
     54.InitializeRamvars:
     55    call    RamVars_GetSegmentToDS
     56    mov     cx, RAMVARS_size
     57    xor     di, di
    6258    push    ds
    6359    pop     es
    64     xor     di, di                  ; ES:DI now points to RAMVARS/FULLRAMVARS
    65     xor     ax, ax                  ; Store zeroes
    66     rep stosb
    67     mov     WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS
    68     ret
     60    call    Memory_ZeroESDIwithSizeInCX
     61    ; Fall to .InitializeDriveTranslationAndReturn
     62
     63;--------------------------------------------------------------------
     64; .InitializeDriveTranslationAndReturn
     65;   Parameters:
     66;       DS:     RAMVARS segment
     67;   Returns:
     68;       Nothing
     69;   Corrupts registers:
     70;       AX
     71;--------------------------------------------------------------------
     72.InitializeDriveTranslationAndReturn:
     73    pop     es
     74    jmp     DriveXlate_Reset
    6975
    7076
Note: See TracChangeset for help on using the changeset viewer.