Changeset 567 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- May 26, 2014, 1:25:15 PM (11 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r545 r567 173 173 ; Returns: 174 174 ; AX: Translate Mode (TRANSLATEMODE_NORMAL, TRANSLATEMODE_LARGE or TRANSLATEMODE_ASSISTED_LBA) 175 ; 176 ; ZF:Set based on value in AL175 ; unshifted (still shifted where it is in bFlagsLow) 176 ; ZF: Set based on value in AL 177 177 ; Corrupts registers: 178 178 ; Nothing -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
r549 r567 199 199 dec cx ; CX = 15 200 200 div cx ; AX = (Cylinders * 16) / 15 201 ; Fall to ConvertPCHfromAXB XtoEnhancedCHinAXBX201 ; Fall to ConvertPCHfromAXBLtoEnhancedCHinAXBL 202 202 203 203 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r558 r567 109 109 call AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI 110 110 dec dl ; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL 111 js SHORT .NothingToChange 112 jz SHORT .LimitHeadsForLargeAddressingMode 111 jle SHORT .JumpOverSetBitForAssistedLBA 113 112 114 113 ; Set LBA bit for Assisted LBA 115 114 or cl, FLGL_DPT_LBA 116 jmp SHORT .NothingToChange 115 .JumpOverSetBitForAssistedLBA: 116 jnz SHORT .NothingToChange 117 117 118 118 .LimitHeadsForLargeAddressingMode: … … 218 218 ; Since the floppy DPT's come after the hard disk DPT's, without expensive (code size) code to relocate a DPT, 219 219 ; this was necessary. Now, this situation shouldn't happen in normal operation, for a couple of reasons: 220 ; 221 ; 222 ; 220 ; A. xtidecfg always puts configured serial ports at the end of the IDEVARS list 221 ; B. the auto serial code is always executed last 222 ; C. the serial server always returns floppy drives last 223 223 ; 224 224 adc byte [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt], 0 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r526 r567 75 75 jb SHORT .DiskIsNotHandledByThisBIOS 76 76 %endif 77 ; fall-through toCalcDPTForDriveNumber77 ; Fall to .CalcDPTForDriveNumber 78 78 79 79 ;-------------------------------------------------------------------- … … 81 81 ; Not intended to be called except by FindDPT_ForDriveNumberInDL 82 82 ; 83 ; CalcDPTForDriveNumber83 ; .CalcDPTForDriveNumber 84 84 ; Parameters: 85 85 ; DL: Drive number 86 86 ; DS: RAMVARS segment 87 ; DI:Saved copy of AX from entry at FindDPT_ForDriveNumberInDL87 ; DI: Saved copy of AX from entry at FindDPT_ForDriveNumberInDL 88 88 ; Returns: 89 89 ; DS:DI: Ptr to DPT 90 ; CF:Clear90 ; CF: Clear 91 91 ; Corrupts registers: 92 92 ; Nothing … … 136 136 137 137 ;-------------------------------------------------------------------- 138 ; FindDPT_MasterOrSingleForIdevarsOffsetInDL139 ; Parameters:140 ; DL: Offset to IDEVARS to search for141 ; DS: RAMVARS segment142 ; Returns:143 ; DS:DI: Ptr to first DPT with same IDEVARS as in DL144 ; CF: Clear if wanted DPT found145 ; Set if DPT not found, or no DPTs present146 ; Corrupts registers:147 ; SI148 ;--------------------------------------------------------------------149 FindDPT_MasterOrSingleForIdevarsOffsetInDL:150 mov si, IterateFindFirstDPTforIdevars ; iteration routine (see below)151 jmp SHORT FindDPT_IterateAllDPTs ; look for the first drive on this controller, if any152 153 ;--------------------------------------------------------------------154 ; FindDPT_SlaveForIdevarsOffsetInDL155 ; Parameters:156 ; DL: Offset to IDEVARS to search for157 ; DS: RAMVARS segment158 ; Returns:159 ; DS:DI: Ptr to second DPT with same IDEVARS as in DL160 ; CF: Clear if wanted DPT found161 ; Set if DPT not found, or no DPTs present162 ; Corrupts registers:163 ; SI164 ;--------------------------------------------------------------------165 FindDPT_SlaveForIdevarsOffsetInDL:166 mov si, IterateFindSecondDPTforIdevars ; iteration routine (see below)167 jmp SHORT FindDPT_IterateAllDPTs ; look for the second drive on this controller, if any168 169 ;--------------------------------------------------------------------170 138 ; Iteration routines for FindDPT_MasterOrSingleForIdevarsOffsetInDL and 171 139 ; FindDPT_SlaveForIdevarsOffsetInDL, for use with IterateAllDPTs … … 175 143 ; IterateFindSecondDPTforIdevars 176 144 ; IterateFindFirstDPTforIdevars 177 ; 145 ; DL: Offset to IDEVARS to search from DPTs 178 146 ; SI: Offset to this callback function 179 147 ; DS:DI: Ptr to DPT to examine 180 148 ; Returns: 181 ; CF: Clear if wanted DPT found149 ; CF: Cleared if wanted DPT found 182 150 ; Set if wrong DPT 183 151 ;-------------------------------------------------------------------- … … 192 160 IterateFindFirstDPTforIdevars: 193 161 cmp dl, [di+DPT.bIdevarsOffset] ; Clears CF if matched 194 je . done162 je .Done 195 163 stc ; Set CF for not found 196 . done:164 .Done: 197 165 ret 198 166 … … 221 189 %endif 222 190 223 jmp shortFindDPT_ForDriveNumberInDL.CalcDPTForNewDrive191 jmp SHORT FindDPT_ForDriveNumberInDL.CalcDPTForNewDrive 224 192 225 193 ;-------------------------------------------------------------------- … … 227 195 ; Parameters: 228 196 ; DS:DI: Ptr to DPT to examine 229 ; 230 ; Returns: 231 ; CF: Clear if wanted DPT found197 ; BL: Bit(s) to test in DPT.bFlagsHigh 198 ; Returns: 199 ; CF: Cleared if wanted DPT found 232 200 ; Set if wrong DPT 233 201 ; Corrupts registers: 234 202 ; Nothing 235 203 ;-------------------------------------------------------------------- 204 %ifdef MODULE_SERIAL 236 205 ALIGN JUMP_ALIGN 237 206 IterateToDptWithFlagsHighInBL: … … 241 210 .ReturnRightDPT: 242 211 ret 212 %endif 243 213 244 214 ;-------------------------------------------------------------------- … … 248 218 ; Returns: 249 219 ; DS:DI: Ptr to DPT 250 ; CF: Setif wanted DPT found251 ; Cleared if DPT not found220 ; CF: Cleared if wanted DPT found 221 ; Set if DPT not found, or no DPTs present 252 222 ; Corrupts registers: 253 223 ; SI … … 257 227 FindDPT_ToDSDIforSerialDevice: 258 228 mov bl, FLGH_DPT_SERIAL_DEVICE 259 ; fall-through 260 %endif 261 262 ;-------------------------------------------------------------------- 263 ; FindDPT_ToDSDIforFlagsHigh 264 ; Parameters: 265 ; DS: RAMVARS segment 266 ; 229 ; Fall to FindDPT_ToDSDIforFlagsHighInBL 230 %endif 231 232 ;-------------------------------------------------------------------- 233 ; FindDPT_ToDSDIforFlagsHighInBL 234 ; Parameters: 235 ; DS: RAMVARS segment 236 ; BL: Bit(s) to test in DPT.bFlagsHigh 267 237 ; Returns: 268 238 ; DS:DI: Ptr to DPT 269 ; CF: Setif wanted DPT found270 ; Cleared if DPT not found239 ; CF: Cleared if wanted DPT found 240 ; Set if DPT not found, or no DPTs present 271 241 ; Corrupts registers: 272 242 ; SI 273 243 ;-------------------------------------------------------------------- 274 %ifdef MODULE_IRQ 275 ALIGN JUMP_ALIGN 276 FindDPT_ToDSDIforFlagsHighInBL: 277 %endif 244 %ifdef MODULE_SERIAL 245 ;%ifdef MODULE_IRQ 246 ;ALIGN JUMP_ALIGN 247 ;FindDPT_ToDSDIforFlagsHighInBL: ; This label is unused 248 ;%endif 278 249 mov si, IterateToDptWithFlagsHighInBL 279 ; Fall to IterateAllDPTs 250 jmp SHORT FindDPT_IterateAllDPTs 251 %endif 252 253 ;-------------------------------------------------------------------- 254 ; FindDPT_MasterOrSingleForIdevarsOffsetInDL 255 ; Parameters: 256 ; DL: Offset to IDEVARS to search for 257 ; DS: RAMVARS segment 258 ; Returns: 259 ; DS:DI: Ptr to first DPT with same IDEVARS as in DL 260 ; CF: Cleared if wanted DPT found 261 ; Set if DPT not found, or no DPTs present 262 ; Corrupts registers: 263 ; SI 264 ;-------------------------------------------------------------------- 265 FindDPT_MasterOrSingleForIdevarsOffsetInDL: 266 mov si, IterateFindFirstDPTforIdevars 267 jmp SHORT FindDPT_IterateAllDPTs 268 269 ;-------------------------------------------------------------------- 270 ; FindDPT_SlaveForIdevarsOffsetInDL 271 ; Parameters: 272 ; DL: Offset to IDEVARS to search for 273 ; DS: RAMVARS segment 274 ; Returns: 275 ; DS:DI: Ptr to second DPT with same IDEVARS as in DL 276 ; CF: Cleared if wanted DPT found 277 ; Set if DPT not found, or no DPTs present 278 ; Corrupts registers: 279 ; SI 280 ;-------------------------------------------------------------------- 281 FindDPT_SlaveForIdevarsOffsetInDL: 282 mov si, IterateFindSecondDPTforIdevars 283 ; Fall to FindDPT_IterateAllDPTs 280 284 281 285 ;-------------------------------------------------------------------- … … 286 290 ; AX,BX,DX: Parameters to callback function 287 291 ; CS:SI: Ptr to callback function 288 ; 292 ; Callback routine should return CF=clear if found 289 293 ; DS: RAMVARS segment 290 294 ; Returns: 291 295 ; DS:DI: Ptr to wanted DPT (if found) 292 296 ; If not found, points to first empty DPT 293 ; CF: Clear if wanted DPT found297 ; CF: Cleared if wanted DPT found 294 298 ; Set if DPT not found, or no DPTs present 295 299 ; Corrupts registers: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r556 r567 44 44 ; DS: RAMVARS segment 45 45 ; Corrupts registers: 46 ; AX 46 ; AX, CL 47 47 ;-------------------------------------------------------------------- 48 48 .StealMemoryForRAMVARS: … … 56 56 mov al, [cs:ROMVARS.bStealSize] 57 57 sub [BDA.wBaseMem], ax 58 mov ax, [BDA.wBaseMem] ; We can save a byte here by using INT 12h instead 59 eSHL_IM ax, 6 ; Segment to first stolen kB (*=40h) 58 mov ax, [BDA.wBaseMem] 59 %ifdef USE_186 60 shl ax, 6 ; Segment to first stolen kB (*=40h) 61 %else 62 mov cl, 6 63 shl ax, cl 64 %endif 60 65 ; Fall to .InitializeRamvars 61 66 … … 186 191 ; Returns: 187 192 ; AL: First floppy drive number supported 188 ; 193 ; CF: Number of floppy drives supported (clear = 1, set = 2) 189 194 ; SF: Emulating drives (clear = yes, set = no) 190 195 ; Corrupts registers:
Note:
See TracChangeset
for help on using the changeset viewer.