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

Last change on this file since 87 was 86, checked in by krille_n_@…, 14 years ago

Size optimizations in various files in the XTIDE BIOS.
Also added a new include file for generic macros (macros.inc).

File size: 2.5 KB
Line 
1; Project name : IDE 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, CX, DX, SI
17;--------------------------------------------------------------------
18ALIGN JUMP_ALIGN
19DetectPrint_RomFoundAtSegment:
20 push cs
21 ePUSH_T ax, ROMVARS.szTitle
22 mov si, g_szRomAt
23 jmp SHORT DetectPrint_4BytesPushedToStack
24
25
26;--------------------------------------------------------------------
27; Displays IDE drive detection string for specific device.
28;
29; DetectPrint_StartingMasterDetect
30; DetectPrint_StartingSlaveDetect
31; Parameters:
32; CS:BP: Ptr to IDEVARS
33; Returns:
34; Nothing
35; Corrupts registers:
36; AX, CX, DX, SI
37;--------------------------------------------------------------------
38ALIGN JUMP_ALIGN
39DetectPrint_StartingMasterDetect:
40 mov ax, g_szMaster
41 jmp SHORT DetectPrint_StartingDriveDetect
42ALIGN JUMP_ALIGN
43DetectPrint_StartingSlaveDetect:
44 mov ax, g_szSlave
45 ; Fall to DetectPrint_StartingDriveDetect
46
47;--------------------------------------------------------------------
48; Displays IDE drive detection string.
49;
50; DetectPrint_StartingDriveDetect
51; Parameters:
52; AX: Offset to "Master" or "Slave" string
53; CS:BP: Ptr to IDEVARS
54; Returns:
55; Nothing
56; Corrupts registers:
57; AX, CX, DX, SI
58;--------------------------------------------------------------------
59ALIGN JUMP_ALIGN
60DetectPrint_StartingDriveDetect:
61 push WORD [cs:bp+IDEVARS.wPort]
62 push ax
63 mov si, g_szDetect
64DetectPrint_4BytesPushedToStack:
65 mov dh, 4 ; 4 bytes pushed to stack
66 jmp PrintString_JumpToFormat
67
68
69;--------------------------------------------------------------------
70; Displays Detected Drive Name from BOOTVARS or
71; drive not found string if no drive was found.
72;
73; DetectPrint_DriveNameOrNotFound
74; Parameters:
75; ES:BX: Ptr to BOOTNFO (if drive found)
76; CF: Cleared if drive found
77; Set it drive not found
78; Returns:
79; Nothing
80; Corrupts registers:
81; AX, DX, SI
82;--------------------------------------------------------------------
83ALIGN JUMP_ALIGN
84DetectPrint_DriveNameOrNotFound:
85 jc SHORT .PrintDriveNotFound
86 lea si, [bx+BOOTNFO.szDrvName]
87 call PrintString_FromES
88 jmp Print_Newline
89ALIGN JUMP_ALIGN
90.PrintDriveNotFound:
91 mov si, g_szNotFound
92 jmp PrintString_FromCS
Note: See TracBrowser for help on using the repository browser.