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

Last change on this file since 93 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
RevLine 
[88]1; Project name : XTIDE Universal BIOS
[3]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:
[88]16; AX, SI
[3]17;--------------------------------------------------------------------
18ALIGN JUMP_ALIGN
19DetectPrint_RomFoundAtSegment:
[88]20 push bp
21
[3]22 mov si, g_szRomAt
[88]23 mov bp, sp
24 ePUSH_T ax, ROMVARS.szTitle ; Bios title string
25 push cs ; BIOS segment
26 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
[3]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:
[88]39; AX, SI
[3]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:
[88]55; CS:AX: Ptr to "Master" or "Slave" string
[3]56; CS:BP: Ptr to IDEVARS
57; Returns:
58; Nothing
59; Corrupts registers:
[88]60; AX, SI
[3]61;--------------------------------------------------------------------
62ALIGN JUMP_ALIGN
63DetectPrint_StartingDriveDetect:
[88]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
[3]70 mov si, g_szDetect
[88]71 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
[3]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:
[88]86; AX, SI
[3]87;--------------------------------------------------------------------
88ALIGN JUMP_ALIGN
89DetectPrint_DriveNameOrNotFound:
[88]90 push di
[3]91 jc SHORT .PrintDriveNotFound
[88]92 push bx
93
[3]94 lea si, [bx+BOOTNFO.szDrvName]
[88]95 mov bx, es
96 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
97 CALL_DISPLAY_LIBRARY PrintNewlineCharacters
98
99 pop bx
100 pop di
101 ret
102
[3]103ALIGN JUMP_ALIGN
104.PrintDriveNotFound:
105 mov si, g_szNotFound
[88]106 call PrintNullTerminatedStringFromCSSIandSetCF
107 pop di
108 ret
Note: See TracBrowser for help on using the repository browser.