Ignore:
Timestamp:
Jan 25, 2011, 9:13:56 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Size optimizations in various files in the XTIDE BIOS.
Also added a new include file for generic macros (macros.inc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r33 r86  
    1 ; File name     :   DetectDrives.asm
    21; Project name  :   IDE BIOS
    3 ; Created date  :   17.3.2010
    4 ; Last update   :   23.8.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for detecting drive for the BIOS.
    7 
    83
    94; Section containing code
     
    8075DetectDrives_DetectMasterDrive:
    8176    mov     bh, MASK_IDE_DRVHD_SET      ; Select Master drive
    82     jmp     SHORT DetectDrives_StartDetection
    83 ALIGN JUMP_ALIGN
     77    SKIP2B  ax                          ; mov ax, <next instruction>
    8478DetectDrives_DetectSlaveDrive:
    8579    mov     bh, MASK_IDE_DRVHD_SET | FLG_IDE_DRVHD_DRV
     
    134128    call    AH25h_GetDriveInfo
    135129    mov     si, di                      ; ES:SI now points to ATA information
    136     ret
    137 
    138 
    139 ;--------------------------------------------------------------------
    140 ; Reads ATAPI information from the drive (for CD/DVD-ROMs).
    141 ;
    142 ; DetectDrives_ReadAtapiInfoFromDrive
    143 ;   Parameters:
    144 ;       BH:     Drive Select byte for Drive and Head Register
    145 ;       CS:BP:  Ptr to IDEVARS for the drive
    146 ;       DS:     RAMVARS segment
    147 ;       ES:     Zero (BDA segment)
    148 ;   Returns:
    149 ;       ES:SI   Ptr to ATAPI information (read with IDENTIFY PACKET DEVICE command)
    150 ;       CF:     Cleared if ATAPI-information read successfully
    151 ;               Set if any error
    152 ;   Corrupts registers:
    153 ;       AX, BL, CX, DX, DI
    154 ;--------------------------------------------------------------------
    155 ALIGN JUMP_ALIGN
    156 DetectDrives_ReadAtapiInfoFromDrive:
    157     stc
    158130    ret
    159131
     
    188160
    189161;--------------------------------------------------------------------
     162; Reads ATAPI information from the drive (for CD/DVD-ROMs).
     163;
     164; DetectDrives_ReadAtapiInfoFromDrive
     165;   Parameters:
     166;       BH:     Drive Select byte for Drive and Head Register
     167;       CS:BP:  Ptr to IDEVARS for the drive
     168;       DS:     RAMVARS segment
     169;       ES:     Zero (BDA segment)
     170;   Returns:
     171;       ES:SI   Ptr to ATAPI information (read with IDENTIFY PACKET DEVICE command)
     172;       CF:     Cleared if ATAPI-information read successfully
     173;               Set if any error
     174;   Corrupts registers:
     175;       AX, BL, CX, DX, DI
     176;--------------------------------------------------------------------
     177ALIGN JUMP_ALIGN
     178DetectDrives_ReadAtapiInfoFromDrive:
     179    ;stc
     180    ;ret
     181    ; Fall through to DetectDrives_CreateBiosTablesForCDROM
     182
     183
     184;--------------------------------------------------------------------
    190185; Creates all BIOS tables for detected CD/DVD-ROM.
    191186;
Note: See TracChangeset for help on using the changeset viewer.