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

Last change on this file since 195 was 192, checked in by gregli@…, 13 years ago

Optimized away some long jumps, by rearranging routines within files, and file order within main.asm. Also added some 'relay' entry points for popular destinations, so that a short jump can go to an existing short jump and then on to the final destination, instead of using a long jump - clearly space over speed optimization. All 'relay's are limited to the UI code, and will not have an impact on IDE operational performance.

File size: 2.3 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, DI
17;--------------------------------------------------------------------
18DetectPrint_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
25DetectPrint_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;--------------------------------------------------------------------
40DetectPrint_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;--------------------------------------------------------------------
58DetectPrint_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;--------------------------------------------------------------------
81DetectPrint_DriveNotFound:
82 mov si, g_szNotFound
83 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
Note: See TracBrowser for help on using the repository browser.