[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: |
---|
[120] | 15 | ; AX, SI, DI |
---|
[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 |
---|
[128] | 23 | test dl, dl |
---|
| 24 | js SHORT .NotFDD |
---|
| 25 | mov ax, g_szFDD |
---|
| 26 | .NotFDD: |
---|
[95] | 27 | push ax |
---|
[88] | 28 | |
---|
[3] | 29 | call DriveXlate_ToOrBack |
---|
| 30 | push dx ; Push untranslated drive number |
---|
[88] | 31 | call DriveXlate_ToOrBack |
---|
| 32 | push dx ; Push translated drive number |
---|
[3] | 33 | |
---|
| 34 | mov si, g_szTryToBoot |
---|
[88] | 35 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|
[3] | 36 | |
---|
| 37 | |
---|
| 38 | ;-------------------------------------------------------------------- |
---|
[130] | 39 | ; BootPrint_BootSectorResultStringFromAX |
---|
[3] | 40 | ; Parameters: |
---|
[130] | 41 | ; CS:AX: Ptr to "found" or "not found" |
---|
[3] | 42 | ; Returns: |
---|
| 43 | ; Nothing |
---|
| 44 | ; Corrupts registers: |
---|
[130] | 45 | ; AX, CX, SI, DI |
---|
[3] | 46 | ;-------------------------------------------------------------------- |
---|
| 47 | ALIGN JUMP_ALIGN |
---|
[130] | 48 | BootPrint_BootSectorResultStringFromAX: |
---|
[88] | 49 | push bp |
---|
| 50 | mov bp, sp |
---|
[130] | 51 | ePUSH_T cx, g_szBootSector |
---|
| 52 | push ax ; "found" or "not found" |
---|
[3] | 53 | mov si, g_szSectRead |
---|
[88] | 54 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|
[3] | 55 | |
---|
| 56 | |
---|
| 57 | ;-------------------------------------------------------------------- |
---|
| 58 | ; BootPrint_FailedToLoadFirstSector |
---|
| 59 | ; Parameters: |
---|
| 60 | ; AH: INT 13h error code |
---|
| 61 | ; Returns: |
---|
| 62 | ; Nothing |
---|
| 63 | ; Corrupts registers: |
---|
[130] | 64 | ; AX, CX, SI, DI |
---|
[3] | 65 | ;-------------------------------------------------------------------- |
---|
| 66 | ALIGN JUMP_ALIGN |
---|
| 67 | BootPrint_FailedToLoadFirstSector: |
---|
[88] | 68 | push bp |
---|
| 69 | mov bp, sp |
---|
[130] | 70 | eMOVZX cx, ah |
---|
| 71 | push cx ; Push INT 13h error code |
---|
[3] | 72 | mov si, g_szReadError |
---|
[88] | 73 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|