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

Last change on this file since 193 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
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:
[120]16; AX, SI, DI
[3]17;--------------------------------------------------------------------
18DetectPrint_RomFoundAtSegment:
[88]19 push bp
[97]20 mov bp, sp
[3]21 mov si, g_szRomAt
[88]22 ePUSH_T ax, ROMVARS.szTitle ; Bios title string
23 push cs ; BIOS segment
[192]24
25DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
[88]26 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
[3]27
28
29;--------------------------------------------------------------------
[97]30; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
[3]31; Parameters:
[88]32; CS:AX: Ptr to "Master" or "Slave" string
[3]33; CS:BP: Ptr to IDEVARS
[189]34; SI: Ptr to template string
[3]35; Returns:
36; Nothing
37; Corrupts registers:
[120]38; AX, SI, DI
[3]39;--------------------------------------------------------------------
[97]40DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
[88]41 push bp
[189]42 mov di, [cs:bp+IDEVARS.wPort]
[88]43 mov bp, sp
44 push ax ; Push "Master" or "Slave"
[189]45 push di ; Push port number
[192]46 jmp DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
[3]47
48
49;--------------------------------------------------------------------
[98]50; DetectPrint_DriveNameFromBootnfoInESBX
[3]51; Parameters:
52; ES:BX: Ptr to BOOTNFO (if drive found)
53; Returns:
54; Nothing
55; Corrupts registers:
[88]56; AX, SI
[3]57;--------------------------------------------------------------------
[98]58DetectPrint_DriveNameFromBootnfoInESBX:
[88]59 push di
60 push bx
61
[3]62 lea si, [bx+BOOTNFO.szDrvName]
[88]63 mov bx, es
64 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
65 CALL_DISPLAY_LIBRARY PrintNewlineCharacters
66
67 pop bx
68 pop di
69 ret
70
[98]71
72;--------------------------------------------------------------------
73; DetectPrint_DriveNotFound
74; Parameters:
75; Nothing
76; Returns:
77; Nothing
78; Corrupts registers:
79; AX, SI
80;--------------------------------------------------------------------
81DetectPrint_DriveNotFound:
[3]82 mov si, g_szNotFound
[98]83 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
Note: See TracBrowser for help on using the repository browser.