Changeset 161 in xtideuniversalbios


Ignore:
Timestamp:
May 8, 2011, 8:02:52 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Minor size optimizations.
  • Tried to minimize the time spent with interrupts disabled in IdeIrq.asm and Int13h.asm
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
8 edited

Legend:

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

    r155 r161  
    5656    CALL_DISPLAY_LIBRARY PrintNewlineCharacters
    5757    mov     si, ROMVARS.szVersion
    58     ; Fall through to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     58    ; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    5959
    6060
     
    169169    mov     si, g_szDriveNum
    170170    push    ax
    171     jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
     171    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    172172
    173173
     
    187187    call    FloppyDrive_GetType         ; Get Floppy Drive type to BX
    188188    test    bx, bx                      ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)
     189    push    bp
     190    mov     bp, sp
    189191    jz      SHORT .PrintXTFloppyType
    190192    cmp     bl, FLOPPY_TYPE_35_ED
    191193    ja      SHORT .PrintUnknownFloppyType
    192     jmp     SHORT .PrintKnownFloppyType
    193 
    194 ;--------------------------------------------------------------------
    195 ; .PrintXTFloppyType
    196 ;   Parameters:
    197 ;       Nothing
    198 ;   Returns:
    199 ;       CF:     Set since menu event was handled successfully
    200 ;   Corrupts registers:
    201 ;       AX, SI, DI
    202 ;--------------------------------------------------------------------
    203 ALIGN JUMP_ALIGN
    204 .PrintXTFloppyType:
    205     push    bp
    206     mov     si, g_szFddSizeOr
    207     jmp     SHORT .FormatXTorUnknownTypeFloppyDrive
    208 
    209 ;--------------------------------------------------------------------
    210 ; .PrintUnknownFloppyType
    211 ;   Parameters:
    212 ;       Nothing
    213 ;   Returns:
    214 ;       CF:     Set since menu event was handled successfully
    215 ;   Corrupts registers:
    216 ;       AX, SI, DI
    217 ;--------------------------------------------------------------------
    218 ALIGN JUMP_ALIGN
    219 .PrintUnknownFloppyType:
    220     push    bp
    221     mov     si, g_szFddUnknown
    222 .FormatXTorUnknownTypeFloppyDrive:
    223     mov     bp, sp
    224     ePUSH_T ax, g_szCapacity
    225     jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
     194    ; Fall to .PrintKnownFloppyType
     195
    226196
    227197;--------------------------------------------------------------------
     
    236206ALIGN JUMP_ALIGN
    237207.PrintKnownFloppyType:
    238     push    bp
    239     mov     bp, sp
    240208    mov     si, g_szFddSize
    241209    ePUSH_T ax, g_szCapacity
    242210    dec     bx                      ; Cannot be 0 (FLOPPY_TYPE_525_OR_35_DD)
    243211    shl     bx, 1                   ; Shift for WORD lookup
    244     mov     ax, [cs:bx+.rgwPhysicalSize]
     212    mov     ax, [cs:bx+FloppyTypes.rgwPhysicalSize]
    245213    push    ax                      ; '5' or '3'
    246214    mov     al, ah
    247215    push    ax                      ; '1/4' or '1/2'
    248     push    WORD [cs:bx+.rgwCapacity]
     216    push    WORD [cs:bx+FloppyTypes.rgwCapacity]
    249217    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    250218
     219
     220;--------------------------------------------------------------------
     221; .PrintXTFloppyType
     222; .PrintUnknownFloppyType
     223;   Parameters:
     224;       Nothing
     225;   Returns:
     226;       CF:     Set since menu event was handled successfully
     227;   Corrupts registers:
     228;       AX, SI, DI
     229;--------------------------------------------------------------------
     230ALIGN JUMP_ALIGN
     231.PrintXTFloppyType:
     232    mov     si, g_szFddSizeOr
     233    jmp     SHORT .FormatXTorUnknownTypeFloppyDrive
     234ALIGN JUMP_ALIGN
     235.PrintUnknownFloppyType:
     236    mov     si, g_szFddUnknown
     237.FormatXTorUnknownTypeFloppyDrive:
     238    ePUSH_T ax, g_szCapacity
     239    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
     240
     241
     242;--------------------------------------------------------------------
     243; Prints Hard Disk Menuitem information strings.
     244;
     245; BootMenuPrint_HardDiskMenuitemInformation
     246;   Parameters:
     247;       DL:     Untranslated Hard Disk number
     248;       DS:     RAMVARS segment
     249;   Returns:
     250;       CF:     Set since menu event was handled successfully
     251;   Corrupts registers:
     252;       BX, CX, DX, SI, DI, ES
     253;--------------------------------------------------------------------
     254ALIGN JUMP_ALIGN
     255BootMenuPrint_HardDiskMenuitemInformation:
     256    call    RamVars_IsDriveHandledByThisBIOS
     257    jnc     SHORT .HardDiskMenuitemInfoForForeignDrive
     258    call    FindDPT_ForDriveNumber      ; DS:DI to point DPT
     259    ; Fall to .HardDiskMenuitemInfoForOurDrive
     260
     261;--------------------------------------------------------------------
     262; .HardDiskMenuitemInfoForOurDrive
     263;   Parameters:
     264;       DL:     Untranslated Hard Disk number
     265;       DS:DI:  Ptr to DPT
     266;   Returns:
     267;       Nothing
     268;   Corrupts registers:
     269;       AX, BX, CX, DX, SI, DI, ES
     270;--------------------------------------------------------------------
     271ALIGN JUMP_ALIGN
     272.HardDiskMenuitemInfoForOurDrive:
     273    push    di
     274    ePUSH_T ax, BootMenuPrintCfg_ForOurDrive    ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP
     275    push    bp
     276    mov     bp, sp
     277    ePUSH_T ax, g_szCapacity
     278
     279    ; Get and push L-CHS size
     280    mov     [RAMVARS.bTimeoutTicksLeft], dl     ; Store drive number
     281    call    AH15h_GetSectorCountToDXAX
     282    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     283
     284    ; Get and push total LBA size
     285    mov     dl, [RAMVARS.bTimeoutTicksLeft]     ; Restore drive number
     286    call    BootInfo_GetTotalSectorCount
     287    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     288
     289    mov     si, g_szSizeDual
     290    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
     291
     292
     293;--------------------------------------------------------------------
     294; .HardDiskMenuitemInfoForForeignDrive
     295;   Parameters:
     296;       DL:     Untranslated Hard Disk number
     297;       DS:     RAMVARS segment
     298;   Returns:
     299;       CF:     Set since menu event was handled successfully
     300;   Corrupts registers:
     301;       AX, BX, CX, DX, SI, DI
     302;--------------------------------------------------------------------
     303ALIGN JUMP_ALIGN
     304.HardDiskMenuitemInfoForForeignDrive:
     305    push    bp
     306    mov     bp, sp
     307    ePUSH_T ax, g_szCapacity
     308
     309    call    DriveXlate_ToOrBack
     310    call    AH15h_GetSectorCountFromForeignDriveToDXAX
     311    call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     312
     313    mov     si, g_szSizeSingle
     314    ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP
     315
     316
     317;--------------------------------------------------------------------
     318; BootMenuPrint_FormatCSSIfromParamsInSSBP
     319;   Parameters:
     320;       CS:SI:  Ptr to string to format
     321;       BP:     SP before pushing parameters
     322;   Returns:
     323;       BP:     Popped from stack
     324;   Corrupts registers:
     325;       AX, DI
     326;--------------------------------------------------------------------
     327ALIGN JUMP_ALIGN
     328BootMenuPrint_FormatCSSIfromParamsInSSBP:
     329    CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
     330    stc             ; Successfull return from menu event
     331    pop     bp
     332    ret
     333
     334
     335;--------------------------------------------------------------------
     336; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
     337;   Parameters:
     338;       BX:DX:AX:   Sector count
     339;   Returns:
     340;       Size in stack
     341;   Corrupts registers:
     342;       AX, BX, CX, DX, SI
     343;--------------------------------------------------------------------
     344ALIGN JUMP_ALIGN
     345ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
     346    pop     si      ; Pop return address
     347    call    Size_ConvertSectorCountInBXDXAXtoKiB
     348    mov     cx, BYTE_MULTIPLES.kiB
     349    call    Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
     350    push    ax      ; Size in magnitude
     351    push    cx      ; Tenths
     352    push    dx      ; Magnitude character
     353    jmp     si
     354
     355
     356;--------------------------------------------------------------------
     357; BootMenuPrint_ClearInformationArea
     358;   Parameters:
     359;       Nothing
     360;   Returns:
     361;       CF:     Set
     362;   Corrupts registers:
     363;       AX, DI
     364;--------------------------------------------------------------------
     365ALIGN JUMP_ALIGN
     366BootMenuPrint_ClearInformationArea:
     367    CALL_MENU_LIBRARY ClearInformationArea
     368    stc
     369    ret
     370
     371
     372;--------------------------------------------------------------------
     373; BootMenuPrint_TheBottomOfScreen
     374;   Parameters:
     375;       DS:     RAMVARS segment
     376;   Returns:
     377;       Nothing
     378;   Corrupts registers:
     379;       AX, BX, CX, DX, SI, DI
     380;--------------------------------------------------------------------
     381ALIGN JUMP_ALIGN
     382BootMenuPrint_TheBottomOfScreen:
     383    call    FloppyDrive_GetCountToCX
     384    mov     bl, cl                  ; Floppy Drive count to BL
     385    call    RamVars_GetHardDiskCountFromBDAtoCX
     386    mov     bh, cl                  ; Hard Disk count to BH
     387    ; Fall to .MoveCursorToHotkeyStrings
     388
     389;--------------------------------------------------------------------
     390; .MoveCursorToHotkeyStrings
     391;   Parameters:
     392;       Nothing
     393;   Returns:
     394;       Nothing
     395;   Corrupts registers:
     396;       AX, DI
     397;--------------------------------------------------------------------
     398.MoveCursorToHotkeyStrings:
     399    CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
     400    xor     al, al
     401    dec     ah
     402    CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
     403    ; Fall to .PrintHotkeyString
     404
     405;--------------------------------------------------------------------
     406; .PrintHotkeyString
     407;   Parameters:
     408;       BL:     Floppy Drives
     409;       BH:     Hard Drives
     410;   Returns:
     411;       Nothing
     412;   Corrupts registers:
     413;       AX, CX, DX, SI, DI
     414;--------------------------------------------------------------------
     415.PrintHotkeyString:
     416    ; Display Library should not be called like this
     417    mov     si, ATTRIBUTE_CHARS.cHighlightedItem
     418    call    MenuAttribute_GetToAXfromTypeInSI
     419    xchg    dx, ax
     420    mov     cx, MONO_BRIGHT
     421
     422    test    bl, bl      ; Any Floppy Drives?
     423    jz      SHORT .SkipFloppyDriveHotkeys
     424    mov     ax, 'A' | (ANGLE_QUOTE_RIGHT<<8)
     425    mov     si, g_szFDD
     426    call    PushHotkeyParamsAndFormat
     427
     428.SkipFloppyDriveHotkeys:
     429    test    bh, bh      ; Any Hard Drives?
     430    jz      SHORT .SkipHardDriveHotkeys
     431    xchg    ax, cx      ; Store Key Attribute
     432    call    BootMenu_GetLetterForFirstHardDiskToCL
     433    mov     ch, ANGLE_QUOTE_RIGHT
     434    xchg    ax, cx
     435    mov     si, g_szHDD
     436    call    PushHotkeyParamsAndFormat
     437
     438.SkipHardDriveHotkeys:
     439    ; Fall to .PrintRomBootHotkey
     440
     441;--------------------------------------------------------------------
     442; .PrintRomBootHotkey
     443;   Parameters:
     444;       CX:     Key Attribute
     445;       DX:     Description Attribute
     446;   Returns:
     447;       Nothing
     448;   Corrupts registers:
     449;       AX, SI, DI
     450;--------------------------------------------------------------------
     451.PrintRomBootHotkey:
     452    mov     ax, 'F' | ('8'<<8)      ; F8
     453    mov     si, g_szRomBoot
     454    ; Fall to PushHotkeyParamsAndFormat
     455
     456;--------------------------------------------------------------------
     457; PushHotkeyParamsAndFormat
     458;   Parameters:
     459;       AL:     First character
     460;       AH:     Second character
     461;       CX:     Key Attribute
     462;       DX:     Description Attribute
     463;       CS:SI:  Description string
     464;   Returns:
     465;       Nothing
     466;   Corrupts registers:
     467;       AX, SI, DI
     468;--------------------------------------------------------------------
     469ALIGN JUMP_ALIGN
     470PushHotkeyParamsAndFormat:
     471    push    bp
     472    mov     bp, sp
     473
     474    push    cx          ; Key attribute
     475    push    ax          ; First character
     476    xchg    al, ah
     477    push    ax          ; Second character
     478    push    dx          ; Description attribute
     479    push    si          ; Description string
     480    push    cx          ; Key attribute for last space
     481    mov     si, g_szHotkey
     482    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
     483
    251484ALIGN WORD_ALIGN
     485FloppyTypes:
    252486.rgwCapacity:
    253487    dw      360
     
    264498    db      '3', 171    ; 5, 3.5" ED on some BIOSes
    265499    db      '3', 171    ; 6, FLOPPY_TYPE_35_ED
    266 
    267 
    268 ;--------------------------------------------------------------------
    269 ; Prints Hard Disk Menuitem information strings.
    270 ;
    271 ; BootMenuPrint_HardDiskMenuitemInformation
    272 ;   Parameters:
    273 ;       DL:     Untranslated Hard Disk number
    274 ;       DS:     RAMVARS segment
    275 ;   Returns:
    276 ;       CF:     Set since menu event was handled successfully
    277 ;   Corrupts registers:
    278 ;       BX, CX, DX, SI, DI, ES
    279 ;--------------------------------------------------------------------
    280 ALIGN JUMP_ALIGN
    281 BootMenuPrint_HardDiskMenuitemInformation:
    282     call    RamVars_IsDriveHandledByThisBIOS
    283     jnc     SHORT .HardDiskMenuitemInfoForForeignDrive
    284     call    FindDPT_ForDriveNumber      ; DS:DI to point DPT
    285     ; Fall to .HardDiskMenuitemInfoForOurDrive
    286 
    287 ;--------------------------------------------------------------------
    288 ; .HardDiskMenuitemInfoForOurDrive
    289 ;   Parameters:
    290 ;       DL:     Untranslated Hard Disk number
    291 ;       DS:DI:  Ptr to DPT
    292 ;   Returns:
    293 ;       Nothing
    294 ;   Corrupts registers:
    295 ;       AX, BX, CX, DX, SI, DI, ES
    296 ;--------------------------------------------------------------------
    297 ALIGN JUMP_ALIGN
    298 .HardDiskMenuitemInfoForOurDrive:
    299     push    di
    300     ePUSH_T ax, BootMenuPrintCfg_ForOurDrive    ; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP
    301     push    bp
    302     mov     bp, sp
    303     ePUSH_T ax, g_szCapacity
    304 
    305     ; Get and push L-CHS size
    306     mov     [RAMVARS.bTimeoutTicksLeft], dl     ; Store drive number
    307     call    AH15h_GetSectorCountToDXAX
    308     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    309 
    310     ; Get and push total LBA size
    311     mov     dl, [RAMVARS.bTimeoutTicksLeft]     ; Restore drive number
    312     call    BootInfo_GetTotalSectorCount
    313     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    314 
    315     mov     si, g_szSizeDual
    316     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    317 
    318 
    319 ;--------------------------------------------------------------------
    320 ; .HardDiskMenuitemInfoForForeignDrive
    321 ;   Parameters:
    322 ;       DL:     Untranslated Hard Disk number
    323 ;       DS:     RAMVARS segment
    324 ;   Returns:
    325 ;       CF:     Set since menu event was handled successfully
    326 ;   Corrupts registers:
    327 ;       AX, BX, CX, DX, SI, DI
    328 ;--------------------------------------------------------------------
    329 ALIGN JUMP_ALIGN
    330 .HardDiskMenuitemInfoForForeignDrive:
    331     push    bp
    332     mov     bp, sp
    333     ePUSH_T ax, g_szCapacity
    334 
    335     call    DriveXlate_ToOrBack
    336     call    AH15h_GetSectorCountFromForeignDriveToDXAX
    337     call    ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    338 
    339     mov     si, g_szSizeSingle
    340     ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP
    341 
    342 
    343 ;--------------------------------------------------------------------
    344 ; BootMenuPrint_FormatCSSIfromParamsInSSBP
    345 ;   Parameters:
    346 ;       CS:SI:  Ptr to string to format
    347 ;       BP:     SP before pushing parameters
    348 ;   Returns:
    349 ;       BP:     Popped from stack
    350 ;   Corrupts registers:
    351 ;       AX, DI
    352 ;--------------------------------------------------------------------
    353 ALIGN JUMP_ALIGN
    354 BootMenuPrint_FormatCSSIfromParamsInSSBP:
    355     CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
    356     stc             ; Successfull return from menu event
    357     pop     bp
    358     ret
    359 
    360 
    361 ;--------------------------------------------------------------------
    362 ; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    363 ;   Parameters:
    364 ;       BX:DX:AX:   Sector count
    365 ;   Returns:
    366 ;       Size in stack
    367 ;   Corrupts registers:
    368 ;       AX, BX, CX, DX, SI
    369 ;--------------------------------------------------------------------
    370 ALIGN JUMP_ALIGN
    371 ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
    372     pop     si      ; Pop return address
    373     call    Size_ConvertSectorCountInBXDXAXtoKiB
    374     mov     cx, BYTE_MULTIPLES.kiB
    375     call    Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
    376     push    ax      ; Size in magnitude
    377     push    cx      ; Tenths
    378     push    dx      ; Magnitude character
    379     jmp     si
    380 
    381 
    382 ;--------------------------------------------------------------------
    383 ; BootMenuPrint_ClearInformationArea
    384 ;   Parameters:
    385 ;       Nothing
    386 ;   Returns:
    387 ;       CF:     Set
    388 ;   Corrupts registers:
    389 ;       AX, DI
    390 ;--------------------------------------------------------------------
    391 ALIGN JUMP_ALIGN
    392 BootMenuPrint_ClearInformationArea:
    393     CALL_MENU_LIBRARY ClearInformationArea
    394     stc
    395     ret
    396 
    397 
    398 ;--------------------------------------------------------------------
    399 ; BootMenuPrint_TheBottomOfScreen
    400 ;   Parameters:
    401 ;       DS:     RAMVARS segment
    402 ;   Returns:
    403 ;       Nothing
    404 ;   Corrupts registers:
    405 ;       AX, BX, CX, DX, SI, DI
    406 ;--------------------------------------------------------------------
    407 ALIGN JUMP_ALIGN
    408 BootMenuPrint_TheBottomOfScreen:
    409     call    FloppyDrive_GetCountToCX
    410     mov     bl, cl                  ; Floppy Drive count to BL
    411     call    RamVars_GetHardDiskCountFromBDAtoCX
    412     mov     bh, cl                  ; Hard Disk count to BH
    413     ; Fall to .MoveCursorToHotkeyStrings
    414 
    415 ;--------------------------------------------------------------------
    416 ; .MoveCursorToHotkeyStrings
    417 ;   Parameters:
    418 ;       Nothing
    419 ;   Returns:
    420 ;       Nothing
    421 ;   Corrupts registers:
    422 ;       AX, DI
    423 ;--------------------------------------------------------------------
    424 .MoveCursorToHotkeyStrings:
    425     CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
    426     xor     al, al
    427     dec     ah
    428     CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    429     ; Fall to .PrintHotkeyString
    430 
    431 ;--------------------------------------------------------------------
    432 ; .PrintHotkeyString
    433 ;   Parameters:
    434 ;       BL:     Floppy Drives
    435 ;       BH:     Hard Drives
    436 ;   Returns:
    437 ;       Nothing
    438 ;   Corrupts registers:
    439 ;       AX, CX, DX, SI, DI
    440 ;--------------------------------------------------------------------
    441 .PrintHotkeyString:
    442     ; Display Library should not be called like this
    443     mov     si, ATTRIBUTE_CHARS.cHighlightedItem
    444     call    MenuAttribute_GetToAXfromTypeInSI
    445     xchg    dx, ax
    446     mov     cx, MONO_BRIGHT
    447 
    448     test    bl, bl      ; Any Floppy Drives?
    449     jz      SHORT .SkipFloppyDriveHotkeys
    450     mov     ax, 'A' | (ANGLE_QUOTE_RIGHT<<8)
    451     mov     si, g_szFDD
    452     call    PushHotkeyParamsAndFormat
    453 
    454 .SkipFloppyDriveHotkeys:
    455     test    bh, bh      ; Any Hard Drives?
    456     jz      SHORT .SkipHardDriveHotkeys
    457     xchg    ax, cx      ; Store Key Attribute
    458     call    BootMenu_GetLetterForFirstHardDiskToCL
    459     mov     ch, ANGLE_QUOTE_RIGHT
    460     xchg    ax, cx
    461     mov     si, g_szHDD
    462     call    PushHotkeyParamsAndFormat
    463 
    464 .SkipHardDriveHotkeys:
    465     ; Fall to .PrintRomBootHotkey
    466 
    467 ;--------------------------------------------------------------------
    468 ; .PrintRomBootHotkey
    469 ;   Parameters:
    470 ;       CX:     Key Attribute
    471 ;       DX:     Description Attribute
    472 ;   Returns:
    473 ;       Nothing
    474 ;   Corrupts registers:
    475 ;       AX, SI, DI
    476 ;--------------------------------------------------------------------
    477 .PrintRomBootHotkey:
    478     mov     ax, 'F' | ('8'<<8)      ; F8
    479     mov     si, g_szRomBoot
    480     ; Fall to PushHotkeyParamsAndFormat
    481 
    482 ;--------------------------------------------------------------------
    483 ; PushHotkeyParamsAndFormat
    484 ;   Parameters:
    485 ;       AL:     First character
    486 ;       AH:     Second character
    487 ;       CX:     Key Attribute
    488 ;       DX:     Description Attribute
    489 ;       CS:SI:  Description string
    490 ;   Returns:
    491 ;       Nothing
    492 ;   Corrupts registers:
    493 ;       AX, SI, DI
    494 ;--------------------------------------------------------------------
    495 ALIGN JUMP_ALIGN
    496 PushHotkeyParamsAndFormat:
    497     push    bp
    498     mov     bp, sp
    499 
    500     push    cx          ; Key attribute
    501     push    ax          ; First character
    502     xchg    al, ah
    503     push    ax          ; Second character
    504     push    dx          ; Description attribute
    505     push    si          ; Description string
    506     push    cx          ; Key attribute for last space
    507     mov     si, g_szHotkey
    508     jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
  • trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm

    r160 r161  
    2020    jnz     SHORT ReturnSuccessForSerialPort
    2121    jmp     IdeDPT_Finalize
    22 .FinalizeDptForSerialPortDevice:
    23     jmp     SerialDPT_Finalize
     22;.FinalizeDptForSerialPortDevice:   ; Dead label
     23;   jmp     SerialDPT_Finalize      ; and code
    2424
    2525
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm

    r160 r161  
    4444    stc                                 ; Set CF since wait done by OS
    4545.ReturnFromWaitNotify:
     46    sti                                 ; Enable interrupts
    4647    pop     ds
    47     sti                                 ; Enable interrupts
    4848    ret
    4949
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r158 r161  
    223223ALIGN JUMP_ALIGN
    224224DualByteReadForXtide:
     225%ifdef USE_186
     226    shr     cx, 2       ; Smaller but slower on 186/286
     227%else
    225228    times 2 shr cx, 1   ; Loop unrolling
     229%endif
    226230    mov     bx, 8       ; Bit mask for toggling data low/high reg
    227231ALIGN JUMP_ALIGN
     
    311315    push    ds
    312316    push    bx
     317%ifdef USE_186
     318    shr     cx, 2       ; Smaller but slower on 186/286
     319%else
    313320    times 2 shr cx, 1   ; Loop unrolling
     321%endif
    314322    mov     bx, 8       ; Bit mask for toggling data low/high reg
    315323    push    es          ; Copy ES...
     
    357365WordWriteForXTIDEmod:
    358366    push    ds
     367%ifdef USE_186
     368    shr     cx, 2       ; Smaller but slower on 186/286
     369%else
    359370    times 2 shr cx, 1   ; Loop unrolling
     371%endif
    360372    push    es          ; Copy ES...
    361373    pop     ds          ; ...to DS
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm

    r155 r161  
    4848;       SS:BP:  Ptr to IDEPACK
    4949;       BX, DI: Corrupted on Int13h_DiskFunctionsHandler
    50 ;       Other:  Function specific INT 13h parameters 
     50;       Other:  Function specific INT 13h parameters
    5151;   Returns:
    5252;       Depends on function
     
    152152    xchg    di, [es:BIOS_DISK_INTERRUPT_13h*4+2]
    153153    mov     [RAMVARS.fpOldI13h+2], di
     154    sti
    154155    pop     es
    155     sti
    156156    ret
    157157
     
    184184    or      BYTE [bp+IDEPACK.intpack+INTPACK.flags], FLG_FLAGS_CF
    185185    ret
    186 
    187186
    188187
     
    212211    dw  Int13h_UnsupportedFunction                      ; 14h, Controller Internal Diagnostic (All)
    213212    dw  AH15h_HandlerForReadDiskDriveSize               ; 15h, Read Disk Drive Size (AT+)
    214     dw  Int13h_UnsupportedFunction                      ; 16h, 
    215     dw  Int13h_UnsupportedFunction                      ; 17h, 
    216     dw  Int13h_UnsupportedFunction                      ; 18h, 
     213    dw  Int13h_UnsupportedFunction                      ; 16h,
     214    dw  Int13h_UnsupportedFunction                      ; 17h,
     215    dw  Int13h_UnsupportedFunction                      ; 18h,
    217216    dw  Int13h_UnsupportedFunction                      ; 19h, Park Heads (PS/2)
    218217    dw  Int13h_UnsupportedFunction                      ; 1Ah, Format ESDI Drive (PS/2)
    219218    dw  Int13h_UnsupportedFunction                      ; 1Bh, Get ESDI Manufacturing Header (PS/2)
    220219    dw  Int13h_UnsupportedFunction                      ; 1Ch, ESDI Special Functions (PS/2)
    221     dw  Int13h_UnsupportedFunction                      ; 1Dh, 
    222     dw  Int13h_UnsupportedFunction                      ; 1Eh, 
    223     dw  Int13h_UnsupportedFunction                      ; 1Fh, 
    224     dw  Int13h_UnsupportedFunction                      ; 20h, 
     220    dw  Int13h_UnsupportedFunction                      ; 1Dh,
     221    dw  Int13h_UnsupportedFunction                      ; 1Eh,
     222    dw  Int13h_UnsupportedFunction                      ; 1Fh,
     223    dw  Int13h_UnsupportedFunction                      ; 20h,
    225224    dw  Int13h_UnsupportedFunction                      ; 21h, Read Disk Sectors, Multiple Blocks (PS/1)
    226225    dw  Int13h_UnsupportedFunction                      ; 22h, Write Disk Sectors, Multiple Blocks (PS/1)
     
    228227    dw  AH24h_HandlerForSetMultipleBlocks               ; 24h, Set Multiple Blocks (PS/1)
    229228    dw  AH25h_HandlerForGetDriveInformation             ; 25h, Get Drive Information (PS/1)
    230 ;   dw  Int13h_UnsupportedFunction                      ; 26h, 
    231 ;   dw  Int13h_UnsupportedFunction                      ; 27h, 
    232 ;   dw  Int13h_UnsupportedFunction                      ; 28h, 
    233 ;   dw  Int13h_UnsupportedFunction                      ; 29h, 
    234 ;   dw  Int13h_UnsupportedFunction                      ; 2Ah, 
    235 ;   dw  Int13h_UnsupportedFunction                      ; 2Bh, 
    236 ;   dw  Int13h_UnsupportedFunction                      ; 2Ch, 
    237 ;   dw  Int13h_UnsupportedFunction                      ; 2Dh, 
    238 ;   dw  Int13h_UnsupportedFunction                      ; 2Eh, 
    239 ;   dw  Int13h_UnsupportedFunction                      ; 2Fh, 
    240 ;   dw  Int13h_UnsupportedFunction                      ; 30h, 
    241 ;   dw  Int13h_UnsupportedFunction                      ; 31h, 
    242 ;   dw  Int13h_UnsupportedFunction                      ; 32h, 
    243 ;   dw  Int13h_UnsupportedFunction                      ; 33h, 
    244 ;   dw  Int13h_UnsupportedFunction                      ; 34h, 
    245 ;   dw  Int13h_UnsupportedFunction                      ; 35h, 
    246 ;   dw  Int13h_UnsupportedFunction                      ; 36h, 
    247 ;   dw  Int13h_UnsupportedFunction                      ; 37h, 
    248 ;   dw  Int13h_UnsupportedFunction                      ; 38h, 
    249 ;   dw  Int13h_UnsupportedFunction                      ; 39h, 
    250 ;   dw  Int13h_UnsupportedFunction                      ; 3Ah, 
    251 ;   dw  Int13h_UnsupportedFunction                      ; 3Bh, 
    252 ;   dw  Int13h_UnsupportedFunction                      ; 3Ch, 
    253 ;   dw  Int13h_UnsupportedFunction                      ; 3Dh, 
    254 ;   dw  Int13h_UnsupportedFunction                      ; 3Eh, 
    255 ;   dw  Int13h_UnsupportedFunction                      ; 3Fh, 
    256 ;   dw  Int13h_UnsupportedFunction                      ; 40h, 
     229;   dw  Int13h_UnsupportedFunction                      ; 26h,
     230;   dw  Int13h_UnsupportedFunction                      ; 27h,
     231;   dw  Int13h_UnsupportedFunction                      ; 28h,
     232;   dw  Int13h_UnsupportedFunction                      ; 29h,
     233;   dw  Int13h_UnsupportedFunction                      ; 2Ah,
     234;   dw  Int13h_UnsupportedFunction                      ; 2Bh,
     235;   dw  Int13h_UnsupportedFunction                      ; 2Ch,
     236;   dw  Int13h_UnsupportedFunction                      ; 2Dh,
     237;   dw  Int13h_UnsupportedFunction                      ; 2Eh,
     238;   dw  Int13h_UnsupportedFunction                      ; 2Fh,
     239;   dw  Int13h_UnsupportedFunction                      ; 30h,
     240;   dw  Int13h_UnsupportedFunction                      ; 31h,
     241;   dw  Int13h_UnsupportedFunction                      ; 32h,
     242;   dw  Int13h_UnsupportedFunction                      ; 33h,
     243;   dw  Int13h_UnsupportedFunction                      ; 34h,
     244;   dw  Int13h_UnsupportedFunction                      ; 35h,
     245;   dw  Int13h_UnsupportedFunction                      ; 36h,
     246;   dw  Int13h_UnsupportedFunction                      ; 37h,
     247;   dw  Int13h_UnsupportedFunction                      ; 38h,
     248;   dw  Int13h_UnsupportedFunction                      ; 39h,
     249;   dw  Int13h_UnsupportedFunction                      ; 3Ah,
     250;   dw  Int13h_UnsupportedFunction                      ; 3Bh,
     251;   dw  Int13h_UnsupportedFunction                      ; 3Ch,
     252;   dw  Int13h_UnsupportedFunction                      ; 3Dh,
     253;   dw  Int13h_UnsupportedFunction                      ; 3Eh,
     254;   dw  Int13h_UnsupportedFunction                      ; 3Fh,
     255;   dw  Int13h_UnsupportedFunction                      ; 40h,
    257256;   dw  Int13h_UnsupportedFunction                      ; 41h, Check if Extensions Present (EBIOS)*
    258257;   dw  Int13h_UnsupportedFunction                      ; 42h, Extended Read Sectors (EBIOS)*
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm

    r158 r161  
    9393    shl     dx, cl                  ; DX = LCylinder << n
    9494    add     ax, dx                  ; AX = P-CHS Cylinder number
    95     mov     cx, ax                  ; Copy P-CHS Cylinder number to CX
     95    xchg    cx, ax                  ; Move P-CHS Cylinder number to CX
    9696DoNotConvertLCHS:
    9797    ret
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm

    r158 r161  
    7171ALIGN JUMP_ALIGN
    7272AccessDPT_GetLCHSfromPCHS:
    73     xchg    ax, cx
    74     mov     cl, [di+DPT.bFlagsLow]
    75     and     cl, MASKL_DPT_CHS_SHIFT_COUNT   ; Load shift count
     73    mov     al, [di+DPT.bFlagsLow]
     74    and     al, MASKL_DPT_CHS_SHIFT_COUNT   ; Load shift count
     75    xchg    cx, ax
    7676    mov     bx, [di+DPT.wPchsCylinders]     ; Load P-CHS cylinders
    7777    shr     bx, cl                          ; Shift to L-CHS cylinders
    7878    xchg    cx, ax
    79     eMOVZX  dx, BYTE [di+DPT.bLchsHeads]    ; Load L-CHS heads
    8079    eMOVZX  ax, BYTE [di+DPT.bPchsSectors]  ; Load Sectors per track
     80    cwd
     81    mov     dl, [di+DPT.bLchsHeads]         ; Load L-CHS heads
    8182    ret
    8283
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r158 r161  
    3939FindDPT_ForDriveNumber:
    4040    push    dx
    41     push    ax
     41    xchg    di, ax  ; Save the contents of AX in DI
    4242
    4343    mov     al, LARGEST_DPT_SIZE
     
    4545    mul     dl
    4646    add     ax, BYTE RAMVARS_size
    47     xchg    di, ax
    4847
    49     pop     ax
     48    xchg    di, ax  ; Restore AX and put result in DI
    5049    pop     dx
    5150    ret
     
    119118
    120119;--------------------------------------------------------------------
    121 ; FindDPT_ToDSDIforInterruptInService
    122 ;   Parameters:
    123 ;       DS:     RAMVARS segment
    124 ;   Returns:
    125 ;       DS:DI:  Ptr to DPT
    126 ;       CF:     Set if wanted DPT found
    127 ;               Cleared if DPT not found
    128 ;   Corrupts registers:
    129 ;       SI
    130 ;--------------------------------------------------------------------
    131 ALIGN JUMP_ALIGN
    132 FindDPT_ToDSDIforInterruptInService:
    133     mov     si, IterateToDptWithInterruptInServiceFlagSet
    134     jmp     SHORT IterateAllDPTs
    135 
    136 ;--------------------------------------------------------------------
    137120; IterateToDptWithInterruptInServiceFlagSet
    138121;   Parameters:
     
    153136    clc                                     ; Clear CF since wrong DPT
    154137    ret
     138
     139
     140;--------------------------------------------------------------------
     141; FindDPT_ToDSDIforInterruptInService
     142;   Parameters:
     143;       DS:     RAMVARS segment
     144;   Returns:
     145;       DS:DI:  Ptr to DPT
     146;       CF:     Set if wanted DPT found
     147;               Cleared if DPT not found
     148;   Corrupts registers:
     149;       SI
     150;--------------------------------------------------------------------
     151ALIGN JUMP_ALIGN
     152FindDPT_ToDSDIforInterruptInService:
     153    mov     si, IterateToDptWithInterruptInServiceFlagSet
     154    ; Fall to IterateAllDPTs
    155155
    156156
Note: See TracChangeset for help on using the changeset viewer.