[88] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Functions for printing drive detection strings.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .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:
|
---|
[88] | 16 | ; AX, SI
|
---|
[3] | 17 | ;--------------------------------------------------------------------
|
---|
| 18 | DetectPrint_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
|
---|
| 24 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
[3] | 25 |
|
---|
| 26 |
|
---|
| 27 | ;--------------------------------------------------------------------
|
---|
[97] | 28 | ; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
|
---|
[3] | 29 | ; Parameters:
|
---|
[88] | 30 | ; CS:AX: Ptr to "Master" or "Slave" string
|
---|
[3] | 31 | ; CS:BP: Ptr to IDEVARS
|
---|
| 32 | ; Returns:
|
---|
| 33 | ; Nothing
|
---|
| 34 | ; Corrupts registers:
|
---|
[88] | 35 | ; AX, SI
|
---|
[3] | 36 | ;--------------------------------------------------------------------
|
---|
[97] | 37 | DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
|
---|
[88] | 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
|
---|
[3] | 43 | mov si, g_szDetect
|
---|
[88] | 44 | jmp BootMenuPrint_FormatCSSIfromParamsInSSBP
|
---|
[3] | 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:
|
---|
[88] | 59 | ; AX, SI
|
---|
[3] | 60 | ;--------------------------------------------------------------------
|
---|
| 61 | DetectPrint_DriveNameOrNotFound:
|
---|
[88] | 62 | push di
|
---|
[3] | 63 | jc SHORT .PrintDriveNotFound
|
---|
[88] | 64 | push bx
|
---|
| 65 |
|
---|
[3] | 66 | lea si, [bx+BOOTNFO.szDrvName]
|
---|
[88] | 67 | mov bx, es
|
---|
| 68 | CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
|
---|
| 69 | CALL_DISPLAY_LIBRARY PrintNewlineCharacters
|
---|
| 70 |
|
---|
| 71 | pop bx
|
---|
| 72 | pop di
|
---|
| 73 | ret
|
---|
| 74 |
|
---|
[3] | 75 | .PrintDriveNotFound:
|
---|
| 76 | mov si, g_szNotFound
|
---|
[96] | 77 | call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
|
---|
[88] | 78 | pop di
|
---|
| 79 | ret
|
---|