Changeset 400 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
- Timestamp:
- Apr 20, 2012, 2:30:16 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
r376 r400 27 27 %endmacro 28 28 29 %macro CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE 130 xchg ax, bx31 eMOVZX bx, [di+DPT.bIdevarsOffset]32 cmp BYTE [cs:bx+IDEVARS.bDevice], DEVICE_JRIDE_ISA33 xchg bx, ax ; Restore BX34 je SHORT %135 %endmacro36 37 29 %macro CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF 2 38 30 cmp BYTE [cs:bp+IDEVARS.bDevice], %1 … … 53 45 ; AX, BX, CX, DX 54 46 ;-------------------------------------------------------------------- 55 %ifdef MODULE_SERIAL 47 %ifdef MODULE_SERIAL ; IDE + Serial 56 48 Device_FinalizeDPT: 57 49 ; needs to check IDEVARS vs. checking the DPT as the serial bit in the DPT is set in the Finalize routine 58 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF 50 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_SERIAL_PORT, .FinalizeDptForSerialPortDevice 59 51 jmp IdeDPT_Finalize 60 52 .FinalizeDptForSerialPortDevice: 61 53 jmp SerialDPT_Finalize 62 54 63 %else ; IDE or JR-IDE/ISA64 Device_FinalizeDPT EQUIdeDPT_Finalize55 %else ; IDE 56 Device_FinalizeDPT EQU IdeDPT_Finalize 65 57 %endif 66 58 … … 76 68 ; AL, BX, CX, DX 77 69 ;-------------------------------------------------------------------- 78 %ifdef MODULE_JRIDE 79 %ifdef MODULE_SERIAL ; IDE + JR-IDE/ISA + Serial 80 Device_ResetMasterAndSlaveController: 81 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE ReturnSuccessForSerialPort 82 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .ResetJrIDE 83 jmp IdeCommand_ResetMasterAndSlaveController 84 85 %else ; IDE + JR-IDE/ISA 86 Device_ResetMasterAndSlaveController: 87 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .ResetJrIDE 88 jmp IdeCommand_ResetMasterAndSlaveController 89 %endif 90 91 %elifdef MODULE_SERIAL ; IDE + Serial 70 %ifdef MODULE_SERIAL ; IDE + Serial 92 71 Device_ResetMasterAndSlaveController: 93 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE 72 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE ReturnSuccessForSerialPort 94 73 jmp IdeCommand_ResetMasterAndSlaveController 95 74 96 %else ; IDE 97 Device_ResetMasterAndSlaveController EQU IdeCommand_ResetMasterAndSlaveController 98 %endif 99 100 %ifdef MODULE_JRIDE 101 .ResetJrIDE: 102 jmp MemIdeCommand_ResetMasterAndSlaveController 75 %else ; IDE 76 Device_ResetMasterAndSlaveController EQU IdeCommand_ResetMasterAndSlaveController 103 77 %endif 104 78 … … 117 91 ; AL, BL, CX, DX, SI, DI, ES 118 92 ;-------------------------------------------------------------------- 119 %ifdef MODULE_JRIDE 120 %ifdef MODULE_SERIAL ; IDE + JR-IDE/ISA + Serial 121 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH: 122 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_SERIAL_PORT, .IdentifyDriveFromSerialPort 123 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_JRIDE_ISA, .IdentifyDriveFromJrIde 124 jmp IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 125 126 %else ; IDE + JR-IDE/ISA 127 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH: 128 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_JRIDE_ISA, .IdentifyDriveFromJrIde 129 jmp IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 130 %endif 131 132 %elifdef MODULE_SERIAL ; IDE + Serial 93 %ifdef MODULE_SERIAL ; IDE + Serial 133 94 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH: 134 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF 95 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_SERIAL_PORT, .IdentifyDriveFromSerialPort 135 96 jmp IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 136 137 %else ; IDE138 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH EQU IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH139 %endif140 141 %ifdef MODULE_JRIDE142 .IdentifyDriveFromJrIde:143 jmp MemIdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH144 %endif145 146 %ifdef MODULE_SERIAL147 97 .IdentifyDriveFromSerialPort: 148 98 jmp SerialCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 99 100 %else ; IDE 101 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH EQU IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 149 102 %endif 150 103 … … 165 118 ; AL, BX, (CX), DX, (ES:SI for data transfer commands) 166 119 ;-------------------------------------------------------------------- 167 %ifdef MODULE_JRIDE 168 %ifdef MODULE_SERIAL ; IDE + JR-IDE/ISA + Serial 169 Device_OutputCommandWithParameters: 170 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE .OutputCommandToSerialPort 171 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .OutputCommandToJrIDE 172 jmp IdeCommand_OutputWithParameters 173 174 %else ; IDE + JR-IDE/ISA 175 Device_OutputCommandWithParameters: 176 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .OutputCommandToJrIDE 177 jmp IdeCommand_OutputWithParameters 178 %endif 179 180 %elifdef MODULE_SERIAL ; IDE + Serial 120 %ifdef MODULE_SERIAL ; IDE + Serial 121 ALIGN JUMP_ALIGN 181 122 Device_OutputCommandWithParameters: 182 123 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE .OutputCommandToSerialPort 183 124 jmp IdeCommand_OutputWithParameters 184 125 185 %else ; IDE186 Device_OutputCommandWithParameters EQU IdeCommand_OutputWithParameters187 %endif188 189 %ifdef MODULE_JRIDE190 ALIGN JUMP_ALIGN191 .OutputCommandToJrIDE:192 jmp MemIdeCommand_OutputWithParameters193 %endif194 195 %ifdef MODULE_SERIAL196 126 ALIGN JUMP_ALIGN 197 127 .OutputCommandToSerialPort: 198 128 jmp SerialCommand_OutputWithParameters 129 130 %else ; IDE 131 Device_OutputCommandWithParameters EQU IdeCommand_OutputWithParameters 199 132 %endif 200 133 … … 211 144 ; AL, BX, CX, DX 212 145 ;-------------------------------------------------------------------- 213 %ifdef MODULE_JRIDE 214 %ifdef MODULE_SERIAL ; IDE + JR-IDE/ISA + Serial 215 Device_SelectDrive: 216 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE ReturnSuccessForSerialPort 217 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .SelectJrIdeDrive 218 jmp IdeCommand_SelectDrive 219 220 %else ; IDE + JR-IDE/ISA 221 Device_SelectDrive: 222 CMP_USING_DPT_AND_JUMP_IF_JRIDE_DEVICE .SelectJrIdeDrive 223 jmp IdeCommand_SelectDrive 224 %endif 225 226 %elifdef MODULE_SERIAL ; IDE + Serial 146 %ifdef MODULE_SERIAL ; IDE + Serial 227 147 Device_SelectDrive: 228 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE 148 TEST_USING_DPT_AND_JUMP_IF_SERIAL_DEVICE ReturnSuccessForSerialPort 229 149 jmp IdeCommand_SelectDrive 230 150 231 %else 232 Device_SelectDrive EQUIdeCommand_SelectDrive151 %else ; IDE 152 Device_SelectDrive EQU IdeCommand_SelectDrive 233 153 %endif 234 154 235 %ifdef MODULE_JRIDE236 ALIGN JUMP_ALIGN237 .SelectJrIdeDrive:238 jmp MemIdeCommand_SelectDrive239 %endif240 155 241 156 %ifdef MODULE_SERIAL
Note:
See TracChangeset
for help on using the changeset viewer.