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

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

Reworked the 'skip detecting the slave if there was no master' code to be more complete (includes configurator drives) and to take into account int13h/25h calls. Some of the changes in my last checkin have been rolled back as a result (they are no longer needed). I did take a byte out of RAMVARS, but there was an alignment byte available for the taking. I also added a perl script for padding and adding the checksum byte to a binary image, which can be invoked manually or with 'make checksum'.

File size: 2.4 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, CX
39;--------------------------------------------------------------------
40DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
41 push bp
42 mov di, [cs:bp+IDEVARS.wPort]
43%ifdef MODULE_SERIAL
44 mov cx, [cs:bp+IDEVARS.wSerialPackedPrintBaud]
45%endif
46
47 mov bp, sp
48
49 push ax ; Push "Master" or "Slave"
50
51 push di ; Push Port address or COM port number
52
53%ifdef MODULE_SERIAL
54;
55; Print baud rate from .wSerialPackedPrintBaud, in two parts - %u and then %c
56;
57 mov ax,cx ; Unpack baud rate number
58 and ax,DEVICE_SERIAL_PRINTBAUD_NUMBERMASK
59 push ax
60
61 mov al,ch ; Unpack baud rate postfix ('0' or 'K')
62 eSHR_IM al,2 ; also effectively masks off the postfix
63 add al,DEVICE_SERIAL_PRINTBAUD_POSTCHARADD
64 push ax
65%endif
66
67 jmp short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
68
69
70;--------------------------------------------------------------------
71; DetectPrint_DriveNameFromBootnfoInESBX
72; Parameters:
73; ES:BX: Ptr to BOOTNFO (if drive found)
74; Returns:
75; Nothing
76; Corrupts registers:
77; AX, SI
78;--------------------------------------------------------------------
79DetectPrint_DriveNameFromBootnfoInESBX:
80 push di
81 push bx
82
83 lea si, [bx+BOOTNFO.szDrvName]
84 mov bx, es
85 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
86 CALL_DISPLAY_LIBRARY PrintNewlineCharacters
87
88 pop bx
89 pop di
90 ret
91
92
93
Note: See TracBrowser for help on using the repository browser.