source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm@ 89

Last change on this file since 89 was 88, checked in by Tomi Tilli, 14 years ago

Changes to XTIDE Universal BIOS:

  • Now uses new libraries (untested)
  • Non-working since code size is too large
File size: 2.8 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Functions for printing drive detection strings.
3
4; Section containing code
5SECTION .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
17;--------------------------------------------------------------------
18ALIGN JUMP_ALIGN
19DetectPrint_RomFoundAtSegment:
20 push bp
21
22 mov si, g_szRomAt
23 mov bp, sp
24 ePUSH_T ax, ROMVARS.szTitle ; Bios title string
25 push cs ; BIOS segment
26 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
27
28
29;--------------------------------------------------------------------
30; Displays IDE drive detection string for specific device.
31;
32; DetectPrint_StartingMasterDetect
33; DetectPrint_StartingSlaveDetect
34; Parameters:
35; CS:BP: Ptr to IDEVARS
36; Returns:
37; Nothing
38; Corrupts registers:
39; AX, SI
40;--------------------------------------------------------------------
41ALIGN JUMP_ALIGN
42DetectPrint_StartingMasterDetect:
43 mov ax, g_szMaster
44 jmp SHORT DetectPrint_StartingDriveDetect
45ALIGN JUMP_ALIGN
46DetectPrint_StartingSlaveDetect:
47 mov ax, g_szSlave
48 ; Fall to DetectPrint_StartingDriveDetect
49
50;--------------------------------------------------------------------
51; Displays IDE drive detection string.
52;
53; DetectPrint_StartingDriveDetect
54; Parameters:
55; CS:AX: Ptr to "Master" or "Slave" string
56; CS:BP: Ptr to IDEVARS
57; Returns:
58; Nothing
59; Corrupts registers:
60; AX, SI
61;--------------------------------------------------------------------
62ALIGN JUMP_ALIGN
63DetectPrint_StartingDriveDetect:
64 push bp
65
66 mov si, [cs:bp+IDEVARS.wPort]
67 mov bp, sp
68 push ax ; Push "Master" or "Slave"
69 push si ; Push port number
70 mov si, g_szDetect
71 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
72
73
74;--------------------------------------------------------------------
75; Displays Detected Drive Name from BOOTVARS or
76; drive not found string if no drive was found.
77;
78; DetectPrint_DriveNameOrNotFound
79; Parameters:
80; ES:BX: Ptr to BOOTNFO (if drive found)
81; CF: Cleared if drive found
82; Set it drive not found
83; Returns:
84; Nothing
85; Corrupts registers:
86; AX, SI
87;--------------------------------------------------------------------
88ALIGN JUMP_ALIGN
89DetectPrint_DriveNameOrNotFound:
90 push di
91 jc SHORT .PrintDriveNotFound
92 push bx
93
94 lea si, [bx+BOOTNFO.szDrvName]
95 mov bx, es
96 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
97 CALL_DISPLAY_LIBRARY PrintNewlineCharacters
98
99 pop bx
100 pop di
101 ret
102
103ALIGN JUMP_ALIGN
104.PrintDriveNotFound:
105 mov si, g_szNotFound
106 call PrintNullTerminatedStringFromCSSIandSetCF
107 pop di
108 ret
Note: See TracBrowser for help on using the repository browser.