Changeset 32 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Aug 6, 2010, 7:11:04 AM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r3 r32 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 14.3.2010 4 ; Last update : 2.5.20104 ; Last update : 3.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for accessings RAMVARS. … … 130 130 RamVars_IsFunctionHandledByThisBIOS: 131 131 test ah, ah ; Reset for all floppy and hard disk drives? 132 jnz SHORT RamVars_IsDriveHandledByThisBIOS 132 jz SHORT .FunctionIsHandledByOurBIOS 133 cmp ah, 08h ; Read Disk Drive Parameters? 134 jne SHORT RamVars_IsDriveHandledByThisBIOS 135 test dl, 80h ; We dot not handle floppy drives 136 jz SHORT .FunctionIsNotHandledByOurBIOS 137 ALIGN JUMP_ALIGN 138 .FunctionIsHandledByOurBIOS: 133 139 stc 140 .FunctionIsNotHandledByOurBIOS: 134 141 ret 135 142 … … 190 197 191 198 ;-------------------------------------------------------------------- 192 ; Return number of Hard Disks in system. 193 ; 194 ; RamVars_GetDriveCounts 195 ; Parameters: 196 ; DS: RAMVARS segment 197 ; Returns: 198 ; AL: Number of hard disks handled by our BIOS 199 ; CX: Total number of hard disks in system 200 ; Corrupts registers: 201 ; AH 202 ;-------------------------------------------------------------------- 203 ALIGN JUMP_ALIGN 204 RamVars_GetDriveCounts: 199 ; RamVars_GetHardDiskCountFromBDAtoCX 200 ; Parameters: 201 ; DS: RAMVARS segment 202 ; Returns: 203 ; CX: Total hard disk count 204 ; Corrupts registers: 205 ; Nothing 206 ;-------------------------------------------------------------------- 207 ALIGN JUMP_ALIGN 208 RamVars_GetHardDiskCountFromBDAtoCX: 205 209 push es 210 push dx 211 206 212 LOAD_BDA_SEGMENT_TO es, cx ; Zero CX 207 mov cl, [es:BDA.bHDCount] ; Total hard drive count 208 mov al, [RAMVARS.bDrvCnt] ; Our drive count 213 call RamVars_GetCountOfKnownDrivesToDL 214 MAX_U dl, [es:BDA.bHDCount] 215 mov cl, dl 216 217 pop dx 209 218 pop es 210 219 ret 220 221 ;-------------------------------------------------------------------- 222 ; RamVars_GetCountOfKnownDrivesToDL 223 ; Parameters: 224 ; DS: RAMVARS segment 225 ; Returns: 226 ; DL: Total hard disk count 227 ; Corrupts registers: 228 ; Nothing 229 ;-------------------------------------------------------------------- 230 ALIGN JUMP_ALIGN 231 RamVars_GetCountOfKnownDrivesToDL: 232 mov dl, [RAMVARS.bFirstDrv] ; Number for our first drive 233 add dl, [RAMVARS.bDrvCnt] ; Our drives 234 and dl, 7Fh ; Clear HD bit for drive count 235 ret
Note:
See TracChangeset
for help on using the changeset viewer.