Changeset 152 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- May 1, 2011, 10:42:58 AM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r150 r152 71 71 ALIGN JUMP_ALIGN 72 72 FindDPT_ToDSDIForIdeMasterAtPortDX: 73 mov si, FindDPT_IterateToMasterAtPortCallback73 mov si, IterateToMasterAtPortCallback 74 74 jmp SHORT IterateAllDPTs 75 75 76 76 ALIGN JUMP_ALIGN 77 77 FindDPT_ToDSDIForIdeSlaveAtPortDX: 78 mov si, FindDPT_IterateToSlaveAtPortCallback78 mov si, IterateToSlaveAtPortCallback 79 79 jmp SHORT IterateAllDPTs 80 80 … … 83 83 ; IDE base port for Master or Slave drive. 84 84 ; 85 ; FindDPT_IterateToSlaveAtPortCallback86 ; FindDPT_IterateToMasterAtPortCallback85 ; IterateToSlaveAtPortCallback 86 ; IterateToMasterAtPortCallback 87 87 ; Parameters: 88 88 ; CH: Drive number … … 97 97 ;-------------------------------------------------------------------- 98 98 ALIGN JUMP_ALIGN 99 FindDPT_IterateToSlaveAtPortCallback:99 IterateToSlaveAtPortCallback: 100 100 test BYTE [di+DPT.wFlags], FLG_DPT_SLAVE ; Clears CF 101 101 jnz SHORT CompareBasePortAddress … … 103 103 104 104 ALIGN JUMP_ALIGN 105 FindDPT_IterateToMasterAtPortCallback:105 IterateToMasterAtPortCallback: 106 106 test BYTE [di+DPT.wFlags], FLG_DPT_SLAVE 107 107 jnz SHORT ReturnWrongDPT ; Return if slave drive … … 116 116 stc ; Set CF since wanted DPT 117 117 ret 118 119 120 ;-------------------------------------------------------------------- 121 ; FindDPT_ToDSDIforInterruptInService 122 ; Parameters: 123 ; DS: RAMVARS segment 124 ; Returns: 125 ; DS:DI: Ptr to DPT 126 ; CF: Set if wanted DPT found 127 ; Cleared if DPT not found 128 ; Corrupts registers: 129 ; SI 130 ;-------------------------------------------------------------------- 131 ALIGN JUMP_ALIGN 132 FindDPT_ToDSDIforInterruptInService: 133 mov si, IterateToDptWithInterruptInServiceFlagSet 134 jmp SHORT IterateAllDPTs 135 136 ;-------------------------------------------------------------------- 137 ; IterateToDptWithInterruptInServiceFlagSet 138 ; Parameters: 139 ; DS:DI: Ptr to DPT to examine 140 ; Returns: 141 ; CF: Set if wanted DPT found 142 ; Cleared if wrong DPT 143 ; Corrupts registers: 144 ; Nothing 145 ;-------------------------------------------------------------------- 146 ALIGN JUMP_ALIGN 147 IterateToDptWithInterruptInServiceFlagSet: 148 test WORD [di+DPT.wFlags], FLG_DPT_INTERRUPT_IN_SERVICE 149 jz SHORT ReturnWrongDPT 150 stc ; Set CF since wanted DPT 151 ret 118 152 ReturnWrongDPT: 119 clc 153 clc ; Clear CF since wrong DPT 120 154 ret 121 155 … … 126 160 ; IterateAllDPTs 127 161 ; Parameters: 128 ; BX,DX: Parameters to callback function129 ; CS:SI: Ptr to callback function130 ; DS: RAMVARS segment162 ; AX,BX,DX: Parameters to callback function 163 ; CS:SI: Ptr to callback function 164 ; DS: RAMVARS segment 131 165 ; Returns: 132 ; DS:DI: Ptr to wanted DPT (if found)133 ; CF: Set if wanted DPT found134 ; Cleared if DPT not found166 ; DS:DI: Ptr to wanted DPT (if found) 167 ; CF: Set if wanted DPT found 168 ; Cleared if DPT not found 135 169 ; Corrupts registers: 136 170 ; Nothing unless corrupted by callback function … … 141 175 mov cx, [RAMVARS.wDrvCntAndFirst] 142 176 jcxz .AllDptsIterated ; Return if no drives 143 call FindDPT_PointToFirstDPT; Point DS:DI to first DPT177 mov di, RAMVARS_size ; Point DS:DI to first DPT 144 178 ALIGN JUMP_ALIGN 145 179 .LoopWhileDPTsLeft: … … 155 189 pop cx 156 190 ret 157 158 159 ;--------------------------------------------------------------------160 ; Sets DI to point to first Disk Parameter Table.161 ;162 ; FindDPT_PointToFirstDPT163 ; Parameters:164 ; Nothing165 ; Returns:166 ; DI: Offset to first DPT (even if unused)167 ; Corrupts registers:168 ; Nothing169 ;--------------------------------------------------------------------170 ALIGN JUMP_ALIGN171 FindDPT_PointToFirstDPT:172 mov di, RAMVARS_size173 ret
Note:
See TracChangeset
for help on using the changeset viewer.