1 | ; Project name : XTIDE Universal BIOS
|
---|
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:
|
---|
15 | ; AX, SI, DI
|
---|
16 | ;--------------------------------------------------------------------
|
---|
17 | ALIGN JUMP_ALIGN
|
---|
18 | BootPrint_TryToBootFromDL:
|
---|
19 | push bp
|
---|
20 | mov bp, sp
|
---|
21 |
|
---|
22 | mov ax, g_szHDD
|
---|
23 | test dl, 80h
|
---|
24 | eCMOVZ ax, g_szFDD
|
---|
25 | push ax
|
---|
26 |
|
---|
27 | call DriveXlate_ToOrBack
|
---|
28 | push dx ; Push untranslated drive number
|
---|
29 | call DriveXlate_ToOrBack
|
---|
30 | push dx ; Push translated drive number
|
---|
31 |
|
---|
32 | mov si, g_szTryToBoot
|
---|
33 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
34 |
|
---|
35 |
|
---|
36 | ;--------------------------------------------------------------------
|
---|
37 | ; BootPrint_BootSectorResultStringFromBX
|
---|
38 | ; Parameters:
|
---|
39 | ; CS:BX: Ptr to "found" or "not found"
|
---|
40 | ; Returns:
|
---|
41 | ; Nothing
|
---|
42 | ; Corrupts registers:
|
---|
43 | ; AX, SI, DI
|
---|
44 | ;--------------------------------------------------------------------
|
---|
45 | ALIGN JUMP_ALIGN
|
---|
46 | BootPrint_BootSectorResultStringFromBX:
|
---|
47 | push bp
|
---|
48 | mov bp, sp
|
---|
49 | ePUSH_T ax, g_szBootSector
|
---|
50 | push bx ; "found" or "not found"
|
---|
51 | mov si, g_szSectRead
|
---|
52 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
53 |
|
---|
54 |
|
---|
55 | ;--------------------------------------------------------------------
|
---|
56 | ; BootPrint_FailedToLoadFirstSector
|
---|
57 | ; Parameters:
|
---|
58 | ; AH: INT 13h error code
|
---|
59 | ; Returns:
|
---|
60 | ; Nothing
|
---|
61 | ; Corrupts registers:
|
---|
62 | ; AX, BX, SI, DI
|
---|
63 | ;--------------------------------------------------------------------
|
---|
64 | ALIGN JUMP_ALIGN
|
---|
65 | BootPrint_FailedToLoadFirstSector:
|
---|
66 | push bp
|
---|
67 | mov bp, sp
|
---|
68 | eMOVZX bx, ah
|
---|
69 | push bx ; Push INT 13h error code
|
---|
70 | mov si, g_szReadError
|
---|
71 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|