1 | ; Project name : XTIDE Universal BIOS |
---|
2 | ; Description : Functions for printing drive detection strings. |
---|
3 | |
---|
4 | ; Section containing code |
---|
5 | SECTION .text |
---|
6 | |
---|
7 | ;-------------------------------------------------------------------- |
---|
8 | ; Prints BIOS name and segment address where it is found. |
---|
9 | ; |
---|
10 | ; DetectPrint_RomFoundAtSegment |
---|
11 | ; Parameters: |
---|
12 | ; Nothing |
---|
13 | ; Returns: |
---|
14 | ; Nothing |
---|
15 | ; Corrupts registers: |
---|
16 | ; AX, SI, DI |
---|
17 | ;-------------------------------------------------------------------- |
---|
18 | DetectPrint_RomFoundAtSegment: |
---|
19 | push bp |
---|
20 | mov bp, sp |
---|
21 | mov si, g_szRomAt |
---|
22 | ePUSH_T ax, ROMVARS.szTitle ; Bios title string |
---|
23 | push cs ; BIOS segment |
---|
24 | |
---|
25 | DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: |
---|
26 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|
27 | |
---|
28 | |
---|
29 | ;-------------------------------------------------------------------- |
---|
30 | ; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP |
---|
31 | ; Parameters: |
---|
32 | ; CS:AX: Ptr to "Master" or "Slave" string |
---|
33 | ; CS:BP: Ptr to IDEVARS |
---|
34 | ; SI: Ptr to template string |
---|
35 | ; Returns: |
---|
36 | ; Nothing |
---|
37 | ; Corrupts registers: |
---|
38 | ; AX, SI, DI |
---|
39 | ;-------------------------------------------------------------------- |
---|
40 | DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP: |
---|
41 | push bp |
---|
42 | mov di, [cs:bp+IDEVARS.wPort] |
---|
43 | mov bp, sp |
---|
44 | push ax ; Push "Master" or "Slave" |
---|
45 | push di ; Push port number |
---|
46 | jmp DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay |
---|
47 | |
---|
48 | |
---|
49 | ;-------------------------------------------------------------------- |
---|
50 | ; DetectPrint_DriveNameFromBootnfoInESBX |
---|
51 | ; Parameters: |
---|
52 | ; ES:BX: Ptr to BOOTNFO (if drive found) |
---|
53 | ; Returns: |
---|
54 | ; Nothing |
---|
55 | ; Corrupts registers: |
---|
56 | ; AX, SI |
---|
57 | ;-------------------------------------------------------------------- |
---|
58 | DetectPrint_DriveNameFromBootnfoInESBX: |
---|
59 | push di |
---|
60 | push bx |
---|
61 | |
---|
62 | lea si, [bx+BOOTNFO.szDrvName] |
---|
63 | mov bx, es |
---|
64 | CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI |
---|
65 | CALL_DISPLAY_LIBRARY PrintNewlineCharacters |
---|
66 | |
---|
67 | pop bx |
---|
68 | pop di |
---|
69 | ret |
---|
70 | |
---|
71 | |
---|
72 | ;-------------------------------------------------------------------- |
---|
73 | ; DetectPrint_DriveNotFound |
---|
74 | ; Parameters: |
---|
75 | ; Nothing |
---|
76 | ; Returns: |
---|
77 | ; Nothing |
---|
78 | ; Corrupts registers: |
---|
79 | ; AX, SI |
---|
80 | ;-------------------------------------------------------------------- |
---|
81 | DetectPrint_DriveNotFound: |
---|
82 | mov si, g_szNotFound |
---|
83 | jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF |
---|