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


Ignore:
Timestamp:
Feb 9, 2012, 11:08:59 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimizations in the Boot Menu and BootInfo routines, taking advantage of nested %s. Optimization in the init of RamVars to avoid writing the signature twice. Preparing for addition of serial floppy support, starting to break the assumption that our drives are always 80h or higher.

File:
1 edited

Legend:

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

    r181 r241  
    3131;--------------------------------------------------------------------
    3232.StealMemoryForRAMVARS:
     33    mov     ax, LITE_MODE_RAMVARS_SEGMENT
    3334    test    BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    3435    jz      SHORT .InitializeRamvars    ; No need to steal RAM
     
    3940    mov     ax, [BDA.wBaseMem]
    4041    eSHL_IM ax, 6                       ; Segment to first stolen kB (*=40h)
     42    ; Fall to .InitializeRamvars
     43
     44;--------------------------------------------------------------------
     45; .InitializeRamvars
     46;   Parameters:
     47;       AX:     RAMVARS segment
     48;   Returns:
     49;       DS:     RAMVARS segment
     50;   Corrupts registers:
     51;       AX, CX, DI, ES
     52;--------------------------------------------------------------------
     53.InitializeRamvars:
    4154    mov     ds, ax
    42     mov     WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
    43     ; Fall to .InitializeRamvars
    44 
    45 ;--------------------------------------------------------------------
    46 ; .InitializeRamvars
    47 ;   Parameters:
    48 ;       Nothing
    49 ;   Returns:
    50 ;       DS:     RAMVARS segment
    51 ;   Corrupts registers:
    52 ;       AX, CX, DI, ES
    53 ;--------------------------------------------------------------------
    54 .InitializeRamvars:
    55     call    RamVars_GetSegmentToDS
     55    mov     es, ax
    5656    mov     cx, RAMVARS_size
    5757    xor     di, di
    58     push    ds
    59     pop     es
    6058    call    Memory_ZeroESDIwithSizeInCX
    6159    mov     WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
Note: See TracChangeset for help on using the changeset viewer.