[3] | 1 | ; Project name : IDE BIOS
|
---|
| 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:
|
---|
| 16 | ; AX, CX, DX, SI
|
---|
| 17 | ;--------------------------------------------------------------------
|
---|
| 18 | ALIGN JUMP_ALIGN
|
---|
| 19 | DetectPrint_RomFoundAtSegment:
|
---|
| 20 | push cs
|
---|
| 21 | ePUSH_T ax, ROMVARS.szTitle
|
---|
| 22 | mov si, g_szRomAt
|
---|
[86] | 23 | jmp SHORT DetectPrint_4BytesPushedToStack
|
---|
[3] | 24 |
|
---|
| 25 |
|
---|
| 26 | ;--------------------------------------------------------------------
|
---|
| 27 | ; Displays IDE drive detection string for specific device.
|
---|
| 28 | ;
|
---|
| 29 | ; DetectPrint_StartingMasterDetect
|
---|
| 30 | ; DetectPrint_StartingSlaveDetect
|
---|
| 31 | ; Parameters:
|
---|
| 32 | ; CS:BP: Ptr to IDEVARS
|
---|
| 33 | ; Returns:
|
---|
| 34 | ; Nothing
|
---|
| 35 | ; Corrupts registers:
|
---|
| 36 | ; AX, CX, DX, SI
|
---|
| 37 | ;--------------------------------------------------------------------
|
---|
| 38 | ALIGN JUMP_ALIGN
|
---|
| 39 | DetectPrint_StartingMasterDetect:
|
---|
| 40 | mov ax, g_szMaster
|
---|
| 41 | jmp SHORT DetectPrint_StartingDriveDetect
|
---|
| 42 | ALIGN JUMP_ALIGN
|
---|
| 43 | DetectPrint_StartingSlaveDetect:
|
---|
| 44 | mov ax, g_szSlave
|
---|
| 45 | ; Fall to DetectPrint_StartingDriveDetect
|
---|
| 46 |
|
---|
| 47 | ;--------------------------------------------------------------------
|
---|
| 48 | ; Displays IDE drive detection string.
|
---|
| 49 | ;
|
---|
| 50 | ; DetectPrint_StartingDriveDetect
|
---|
| 51 | ; Parameters:
|
---|
| 52 | ; AX: Offset to "Master" or "Slave" string
|
---|
| 53 | ; CS:BP: Ptr to IDEVARS
|
---|
| 54 | ; Returns:
|
---|
| 55 | ; Nothing
|
---|
| 56 | ; Corrupts registers:
|
---|
| 57 | ; AX, CX, DX, SI
|
---|
| 58 | ;--------------------------------------------------------------------
|
---|
| 59 | ALIGN JUMP_ALIGN
|
---|
| 60 | DetectPrint_StartingDriveDetect:
|
---|
| 61 | push WORD [cs:bp+IDEVARS.wPort]
|
---|
| 62 | push ax
|
---|
| 63 | mov si, g_szDetect
|
---|
[86] | 64 | DetectPrint_4BytesPushedToStack:
|
---|
[3] | 65 | mov dh, 4 ; 4 bytes pushed to stack
|
---|
| 66 | jmp PrintString_JumpToFormat
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | ;--------------------------------------------------------------------
|
---|
| 70 | ; Displays Detected Drive Name from BOOTVARS or
|
---|
| 71 | ; drive not found string if no drive was found.
|
---|
| 72 | ;
|
---|
| 73 | ; DetectPrint_DriveNameOrNotFound
|
---|
| 74 | ; Parameters:
|
---|
| 75 | ; ES:BX: Ptr to BOOTNFO (if drive found)
|
---|
| 76 | ; CF: Cleared if drive found
|
---|
| 77 | ; Set it drive not found
|
---|
| 78 | ; Returns:
|
---|
| 79 | ; Nothing
|
---|
| 80 | ; Corrupts registers:
|
---|
| 81 | ; AX, DX, SI
|
---|
| 82 | ;--------------------------------------------------------------------
|
---|
| 83 | ALIGN JUMP_ALIGN
|
---|
| 84 | DetectPrint_DriveNameOrNotFound:
|
---|
| 85 | jc SHORT .PrintDriveNotFound
|
---|
| 86 | lea si, [bx+BOOTNFO.szDrvName]
|
---|
| 87 | call PrintString_FromES
|
---|
| 88 | jmp Print_Newline
|
---|
| 89 | ALIGN JUMP_ALIGN
|
---|
| 90 | .PrintDriveNotFound:
|
---|
| 91 | mov si, g_szNotFound
|
---|
| 92 | jmp PrintString_FromCS
|
---|