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 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|
25 | |
---|
26 | |
---|
27 | ;-------------------------------------------------------------------- |
---|
28 | ; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP |
---|
29 | ; Parameters: |
---|
30 | ; CS:AX: Ptr to "Master" or "Slave" string |
---|
31 | ; CS:BP: Ptr to IDEVARS |
---|
32 | ; Returns: |
---|
33 | ; Nothing |
---|
34 | ; Corrupts registers: |
---|
35 | ; AX, SI, DI |
---|
36 | ;-------------------------------------------------------------------- |
---|
37 | DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP: |
---|
38 | push bp |
---|
39 | mov si, [cs:bp+IDEVARS.wPort] |
---|
40 | mov bp, sp |
---|
41 | push ax ; Push "Master" or "Slave" |
---|
42 | push si ; Push port number |
---|
43 | mov si, g_szDetect |
---|
44 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP |
---|
45 | |
---|
46 | |
---|
47 | ;-------------------------------------------------------------------- |
---|
48 | ; DetectPrint_DriveNameFromBootnfoInESBX |
---|
49 | ; Parameters: |
---|
50 | ; ES:BX: Ptr to BOOTNFO (if drive found) |
---|
51 | ; Returns: |
---|
52 | ; Nothing |
---|
53 | ; Corrupts registers: |
---|
54 | ; AX, SI |
---|
55 | ;-------------------------------------------------------------------- |
---|
56 | DetectPrint_DriveNameFromBootnfoInESBX: |
---|
57 | push di |
---|
58 | push bx |
---|
59 | |
---|
60 | lea si, [bx+BOOTNFO.szDrvName] |
---|
61 | mov bx, es |
---|
62 | CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI |
---|
63 | CALL_DISPLAY_LIBRARY PrintNewlineCharacters |
---|
64 | |
---|
65 | pop bx |
---|
66 | pop di |
---|
67 | ret |
---|
68 | |
---|
69 | |
---|
70 | ;-------------------------------------------------------------------- |
---|
71 | ; DetectPrint_DriveNotFound |
---|
72 | ; Parameters: |
---|
73 | ; Nothing |
---|
74 | ; Returns: |
---|
75 | ; Nothing |
---|
76 | ; Corrupts registers: |
---|
77 | ; AX, SI |
---|
78 | ;-------------------------------------------------------------------- |
---|
79 | DetectPrint_DriveNotFound: |
---|
80 | mov si, g_szNotFound |
---|
81 | jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF |
---|