Changeset 241 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc


Ignore:
Timestamp:
Feb 9, 2012, 11:08:59 AM (12 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/Inc/BootVars.inc

    r221 r241  
    1313LEN_BOOTNFO_DRV     EQU     26      ; Bytes reserved for drive name
    1414struc BOOTNFO
     15    .szDrvName      resb    LEN_BOOTNFO_DRV     ; Drive name
     16                    resb    2       ; Zero word (ensures string terminates)
    1517    .twSectCnt      resb    6       ; Total user addressable sectors
    16     .szDrvName      resb    LEN_BOOTNFO_DRV+1   ; Drive name
    17                     resb    1       ; Alignment
     18                    resb    2       ; padding to make BOOTNFO size an even multiple of DPT size
    1819endstruc
     20
     21DPT_BOOTNFO_SIZE_MULTIPLIER  equ    BOOTNFO_size / LARGEST_DPT_SIZE
     22
     23%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     24
     25%if BOOTNFO_size % LARGEST_DPT_SIZE <> 0
     26%error "BOOTNFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of BOOTNFO to bring the two sizes into alignment.  As BOOTNFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
     27%endif
     28
     29%if BOOTNFO.szDrvName <> 0
     30%error "BOOTNFO.szDrvName is assumed to be the first member of struc BOOTNFO, in BootMenuPrint_RefreshItem"
     31%endif
     32
     33%if BOOTNFO.szDrvName + LEN_BOOTNFO_DRV + 2 <> BOOTNFO.twSectCnt
     34%error "BOOTNFO.twSectCnt is assumed to come immediately after BOOTNFO.szDrvName (with zero padding), in BootInfo_CreateForHardDisk"
     35%endif
     36
     37%endif
    1938
    2039
Note: See TracChangeset for help on using the changeset viewer.