Changeset 597 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm


Ignore:
Timestamp:
Jul 11, 2018, 9:44:43 AM (6 years ago)
Author:
aitotat
Message:

Windows 95 CMOS hack now works with Award BIOSes.
Some small optimizations to INT 19h and INT 19h reset handlers.
Added menuitem to configurator for clearing BDA drive count.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r596 r597  
    199199    call    DriveXlate_Reset                    ; Clean up any drive mappings before Rom Boot
    200200%endif
    201     clc
    202     ;; fall through to Int19h_JumpToBootSectorOrRomBoot
    203 
    204 ;--------------------------------------------------------------------
    205 ; Int19h_JumpToBootSectorOrRomBoot
     201    stc
     202    ;; fall through to Int19h_JumpToBootSectorInESBXOrRomBoot
     203
     204;--------------------------------------------------------------------
     205; Int19h_JumpToBootSectorInESBXOrRomBoot
    206206;
    207207; Switches back to the POST stack, clears the DS and ES registers,
     
    211211;   Parameters:
    212212;       DL:     Drive to boot from (translated, 00h or 80h)
    213 ;       CF:     Set for Boot Sector Boot
    214 ;               Clear for ROM Boot
    215 ;       ES:BX:  (if CF set) Ptr to boot sector (ES = zero)
     213;       CF:     Clear for Boot Sector Boot
     214;               Set for ROM Boot
     215;       ES:BX:  (if CF clear) Ptr to boot sector (ES = zero)
    216216;
    217217;   Returns:
    218218;       Never returns
    219219;--------------------------------------------------------------------
    220 Int19h_JumpToBootSectorOrRomBoot:
    221     mov     ax, es      ; Preserve MBR segment (can't push because of stack change)
    222                         ; NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
     220Int19h_JumpToBootSectorInESBXOrRomBoot:
     221    mov     ax, es      ; Clear AX. NOTE: can't use XOR (LOAD_BDA_SEGMENT_TO) as it impacts CF
    223222    SWITCH_BACK_TO_POST_STACK
    224223
    225224; clear segment registers before boot sector or rom call
     225Int19h_JumpToBootSectorInESBXOrRomBootWithoutStackChange:
     226    mov     ax, es      ; Clear AX and preserve CF
    226227    mov     ds, ax
    227228%ifdef USE_386
     
    229230    mov     gs, ax
    230231%endif
    231     jnc     SHORT .RomBoot
     232    jc      SHORT .RomBoot
    232233
    233234; jump to boot sector
    234     push    ax          ; sgment address for MBR
     235    push    es          ; sgment address for MBR
    235236    push    bx          ; offset address for MBR
    236237    retf                ; NOTE: DL is set to the drive number
Note: See TracChangeset for help on using the changeset viewer.