Ignore:
Timestamp:
Jan 31, 2011, 11:27:17 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Even more initialization code inlining.
File:
1 edited

Legend:

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

    r86 r99  
    1818;       BX, CX, DI
    1919;--------------------------------------------------------------------
    20 ;ALIGN JUMP_ALIGN
    2120FloppyDrive_IsInt40hInstalled:
    2221    cmp     WORD [es:INTV_FLOPPY_FUNC*4+2], 0C000h  ; Any ROM segment?
    2322    jb      SHORT .Int40hHandlerIsNotInstalled
     23%ifdef USE_AT
    2424    call    .VerifyInt40hHandlerSinceSomeBiosesSimplyReturnFromInt40h
     25%else
     26    clc     ; INT 40h installed. No need to verify on XT systems.
     27%endif
    2528.Int40hHandlerIsNotInstalled:
    2629    cmc
     
    3740;       BX, CX, DI
    3841;--------------------------------------------------------------------
    39 ;ALIGN JUMP_ALIGN
     42%ifdef USE_AT
    4043.VerifyInt40hHandlerSinceSomeBiosesSimplyReturnFromInt40h:
    4144    push    es
     
    4548    call    .LoadInt40hVerifyParameters
    4649    int     INTV_DISK_FUNC
    47     jc      SHORT .AH08hNotSupported    ; AH=08h not supported on XTs but that doesn't
    48     push    es                          ; matter since INT 40h does not need to be verified
    49     push    di                          ; on XTs
     50    jc      SHORT .Int40hIsInstalled    ; Maybe there are not any floppy drives at all
     51    push    es
     52    push    di
    5053
    5154    call    .LoadInt40hVerifyParameters
     
    5861    mov     dx, es
    5962    cmp     cx, dx                      ; Difference in segments?
    60     jne     SHORT .Int40hNotInstalled
    61 .AH08hNotSupported:
    62     clc
    63     jmp     SHORT .Int40hIsInstalled
     63    je      SHORT .Int40hIsInstalled
    6464.Int40hNotInstalled:
    6565    stc
     
    8181;       DH
    8282;--------------------------------------------------------------------
    83 ;ALIGN JUMP_ALIGN
    8483.LoadInt40hVerifyParameters:
    8584    mov     ah, 08h             ; Get Drive Parameters
     
    8887    mov     es, dx              ; ES:DI = 0000:0000h to guard against BIOS bugs
    8988    ret
     89%endif
    9090
    9191
     
    133133FloppyDrive_GetCount:
    134134    push    es
     135%ifdef USE_AT
    135136    call    FloppyDrive_GetCountFromBIOS
    136     jnc     SHORT .CompareToUserMinimum
     137%else
    137138    call    FloppyDrive_GetCountFromBDA
    138 ALIGN JUMP_ALIGN
    139 .CompareToUserMinimum:
     139%endif
    140140    MAX_U   cl, [cs:ROMVARS.bMinFddCnt]
    141141    xor     ch, ch
     
    159159;       CH, ES
    160160;--------------------------------------------------------------------
     161%ifdef USE_AT
    161162ALIGN JUMP_ALIGN
    162163FloppyDrive_GetCountFromBIOS:
     
    176177    pop     di
    177178    ret
     179%endif
    178180
    179181
     
    190192;       CH, ES
    191193;--------------------------------------------------------------------
     194%ifndef USE_AT
    192195ALIGN JUMP_ALIGN
    193196FloppyDrive_GetCountFromBDA:
     
    199202    add     cl, ch                          ; CL = Floppy Drive count
    200203    ret
     204%endif
Note: See TracChangeset for help on using the changeset viewer.