Changeset 254 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm


Ignore:
Timestamp:
Feb 18, 2012, 2:51:54 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Changed BOOTNFO to BOOTMENUINFO and moved it to BootMenu.inc.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm

    r253 r254  
    77
    88;--------------------------------------------------------------------
    9 ; Creates new BOOTNFO struct for detected hard disk.
     9; Creates new BOOTMENUINFO struct for detected hard disk.
    1010;
    11 ; BootInfo_CreateForHardDisk
     11; BootMenuInfo_CreateForHardDisk
    1212;   Parameters:
    1313;       DL:     Drive number
     
    1515;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    1616;   Returns:
    17 ;       ES:BX:  Ptr to BOOTNFO (if successful)
     17;       ES:BX:  Ptr to BOOTMENUINFO (if successful)
    1818;   Corrupts registers:
    19 ;       AX, BX, CX, DX, DI, SI
     19;       AX, BX, CX, DX, DI
    2020;--------------------------------------------------------------------
    21 BootInfo_CreateForHardDisk:
    22     call    BootInfo_ConvertDPTtoBX     ; ES:BX now points to new BOOTNFO
    23     push    bx                          ; Preserve for return
     21BootMenuInfo_CreateForHardDisk:
     22    call    BootMenuInfo_ConvertDPTtoBX         ; ES:BX now points to new BOOTMENUINFO
     23    push    bx                                  ; Preserve for return
    2424
    25     mov     di, bx                      ; Starting pointer at beginning of structure
     25    mov     di, bx                              ; Starting pointer at beginning of structure
    2626
    27 ;
    28 ; Store Drive Name
    29 ;       
    30     push    ds                          ; Preserve RAMVARS
    31     push    si                          ; Preserve SI for call to GetTotalSectorCount...
     27    ; Store Drive Name
     28    push    ds                                  ; Preserve RAMVARS
     29    push    si
    3230
    33     push    es                          ; ES copied to DS
     31    push    es                                  ; ES copied to DS
    3432    pop     ds
    3533
    36     add     si, BYTE ATA1.strModel      ; DS:SI now points drive name
    37     lea     di, [bx+BOOTNFO.szDrvName]  ; ES:DI now points to name destination
    38     mov     cx, LEN_BOOTNFO_DRV / 2     ; Max number of WORDs allowed
     34    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name
     35    lea     di, [bx+BOOTMENUINFO.szDrvName]     ; ES:DI now points to name destination
     36    mov     cx, MAX_HARD_DISK_NAME_LENGTH / 2   ; Max number of WORDs allowed
    3937.CopyNextWord:
    4038    lodsw
    41     xchg    al, ah                      ; Change endianness
     39    xchg    al, ah                              ; Change endianness
    4240    stosw
    4341    loop    .CopyNextWord
    44     xor     ax, ax                      ; Zero AX and clear CF
    45     stosw                               ; Terminate with NULL
     42    xor     ax, ax                              ; Zero AX and clear CF
     43    stosw                                       ; Terminate with NULL
    4644
    4745    pop     si
     
    5351
    5452;--------------------------------------------------------------------
    55 ; BootInfo_GetTotalSectorCount
     53; BootMenuInfo_GetTotalSectorCount
    5654;   Parameters:
    5755;       DS:DI:      DPT Pointer
     
    6260;--------------------------------------------------------------------
    6361ALIGN JUMP_ALIGN
    64 BootInfo_GetTotalSectorCount:
     62BootMenuInfo_GetTotalSectorCount:
    6563    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    6664    jnz     SHORT .ReturnFullCapacity
     
    7169
    7270;--------------------------------------------------------------------
    73 ; Returns offset to BOOTNFO based on DPT pointer.
     71; Returns offset to BOOTMENUINFO based on DPT pointer.
    7472;
    75 ; BootInfo_ConvertDPTtoBX
     73; BootMenuInfo_ConvertDPTtoBX
    7674;   Parameters:
    7775;       DS:DI:  DPT Pointer
    7876;   Returns:
    79 ;       BX:     Offset to BOOTNFO struct
     77;       BX:     Offset to BOOTMENUINFO struct
    8078;   Corrupts registers:
    8179;       AX
    8280;--------------------------------------------------------------------
    8381ALIGN JUMP_ALIGN
    84 BootInfo_ConvertDPTtoBX:
     82BootMenuInfo_ConvertDPTtoBX:
    8583    mov     ax, di
    86     sub     ax, RAMVARS_size                ; subtract off base of DPTs
    87     mov     bl, DPT_BOOTNFO_SIZE_MULTIPLIER ; BOOTNFO's are a whole number multiple of DPT size
     84    sub     ax, RAMVARS_size                        ; subtract off base of DPTs
     85    mov     bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER    ; BOOTMENUINFO's are a whole number multiple of DPT size
    8886    mul     bl                             
    89     add     ax, BOOTVARS.rgBootNfo          ; add base of BOOTNFO
     87    add     ax, BOOTVARS.rgBootNfo                  ; add base of BOOTMENUINFO
    9088    xchg    ax, bx
    9189    ret         
Note: See TracChangeset for help on using the changeset viewer.