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

Last change on this file since 97 was 97, checked in by aitotat, 13 years ago

Changes to XTIDE Universal BIOS:

  • Inlined some initialization functions.
  • Removed alignment bytes from some initialization functions.
  • Removed creation of compatible DPTs.
File size: 2.1 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
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    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
25
26
27;--------------------------------------------------------------------
28; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
29;   Parameters:
30;       CS:AX:  Ptr to "Master" or "Slave" string
31;       CS:BP:  Ptr to IDEVARS
32;   Returns:
33;       Nothing
34;   Corrupts registers:
35;       AX, SI
36;--------------------------------------------------------------------
37DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
38    push    bp
39    mov     si, [cs:bp+IDEVARS.wPort]
40    mov     bp, sp
41    push    ax                          ; Push "Master" or "Slave"
42    push    si                          ; Push port number
43    mov     si, g_szDetect
44    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
45
46
47;--------------------------------------------------------------------
48; Displays Detected Drive Name from BOOTVARS or
49; drive not found string if no drive was found.
50;
51; DetectPrint_DriveNameOrNotFound
52;   Parameters:
53;       ES:BX:  Ptr to BOOTNFO (if drive found)
54;       CF:     Cleared if drive found
55;               Set it drive not found
56;   Returns:
57;       Nothing
58;   Corrupts registers:
59;       AX, SI
60;--------------------------------------------------------------------
61DetectPrint_DriveNameOrNotFound:
62    push    di
63    jc      SHORT .PrintDriveNotFound
64    push    bx
65
66    lea     si, [bx+BOOTNFO.szDrvName]
67    mov     bx, es
68    CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
69    CALL_DISPLAY_LIBRARY PrintNewlineCharacters
70
71    pop     bx
72    pop     di
73    ret
74
75.PrintDriveNotFound:
76    mov     si, g_szNotFound
77    call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
78    pop     di
79    ret
Note: See TracBrowser for help on using the repository browser.