[88] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Functions for printing boot related strings.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .text
|
---|
| 6 |
|
---|
| 7 | ;--------------------------------------------------------------------
|
---|
| 8 | ; BootPrint_TryToBootFromDL
|
---|
| 9 | ; Parameters:
|
---|
| 10 | ; DL: Drive to boot from (translated, 00h or 80h)
|
---|
| 11 | ; DS: RAMVARS segment
|
---|
| 12 | ; Returns:
|
---|
| 13 | ; Nothing
|
---|
| 14 | ; Corrupts registers:
|
---|
[88] | 15 | ; AX, SI
|
---|
[3] | 16 | ;--------------------------------------------------------------------
|
---|
| 17 | ALIGN JUMP_ALIGN
|
---|
| 18 | BootPrint_TryToBootFromDL:
|
---|
[88] | 19 | push bp
|
---|
| 20 | mov bp, sp
|
---|
[3] | 21 |
|
---|
[95] | 22 | mov ax, g_szHDD
|
---|
[88] | 23 | test dl, 80h
|
---|
[95] | 24 | eCMOVZ ax, g_szFDD
|
---|
| 25 | push ax
|
---|
[88] | 26 |
|
---|
[3] | 27 | call DriveXlate_ToOrBack
|
---|
| 28 | push dx ; Push untranslated drive number
|
---|
[88] | 29 | call DriveXlate_ToOrBack
|
---|
| 30 | push dx ; Push translated drive number
|
---|
[3] | 31 |
|
---|
| 32 | mov si, g_szTryToBoot
|
---|
[88] | 33 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
[3] | 34 |
|
---|
| 35 |
|
---|
| 36 | ;--------------------------------------------------------------------
|
---|
[95] | 37 | ; BootPrint_BootSectorResultStringFromBX
|
---|
[3] | 38 | ; Parameters:
|
---|
[95] | 39 | ; CS:BX: Ptr to "found" or "not found"
|
---|
[3] | 40 | ; Returns:
|
---|
| 41 | ; Nothing
|
---|
| 42 | ; Corrupts registers:
|
---|
[88] | 43 | ; AX, SI
|
---|
[3] | 44 | ;--------------------------------------------------------------------
|
---|
| 45 | ALIGN JUMP_ALIGN
|
---|
[95] | 46 | BootPrint_BootSectorResultStringFromBX:
|
---|
[88] | 47 | push bp
|
---|
| 48 | mov bp, sp
|
---|
| 49 | ePUSH_T ax, g_szBootSector
|
---|
[95] | 50 | push bx ; "found" or "not found"
|
---|
[3] | 51 | mov si, g_szSectRead
|
---|
[88] | 52 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
[3] | 53 |
|
---|
| 54 |
|
---|
| 55 | ;--------------------------------------------------------------------
|
---|
| 56 | ; BootPrint_FailedToLoadFirstSector
|
---|
| 57 | ; Parameters:
|
---|
| 58 | ; AH: INT 13h error code
|
---|
| 59 | ; Returns:
|
---|
| 60 | ; Nothing
|
---|
| 61 | ; Corrupts registers:
|
---|
[95] | 62 | ; AX, BX, SI
|
---|
[3] | 63 | ;--------------------------------------------------------------------
|
---|
| 64 | ALIGN JUMP_ALIGN
|
---|
| 65 | BootPrint_FailedToLoadFirstSector:
|
---|
[88] | 66 | push bp
|
---|
| 67 | mov bp, sp
|
---|
[95] | 68 | eMOVZX bx, ah
|
---|
| 69 | push bx ; Push INT 13h error code
|
---|
[3] | 70 | mov si, g_szReadError
|
---|
[88] | 71 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|