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