Changeset 623 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Jun 15, 2022, 2:48:59 PM (3 years ago)
- Location:
- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r621 r623 65 65 66 66 cmp ah, dl ; Check second drive if two, first drive if only one 67 j zSHORT .CalcDPTForDriveNumber67 je SHORT .CalcDPTForDriveNumber 68 68 cmp al, dl ; Check first drive in all cases, redundant but OK to repeat 69 jn zSHORT .DiskIsNotHandledByThisBIOS69 jne SHORT .DiskIsNotHandledByThisBIOS 70 70 %else 71 71 cmp dl, ah ; Above last supported? … … 100 100 101 101 test dl, dl 102 js .harddisk102 js SHORT .Harddisk 103 103 104 104 call RamVars_UnpackFlopCntAndFirstToAL … … 106 106 107 107 ALIGN JUMP_ALIGN 108 . harddisk:108 .Harddisk: 109 109 sub dl, al ; subtract off beginning of either hard disk or floppy list (as appropriate) 110 110 %else … … 114 114 .CalcDPTForNewDrive: 115 115 mov al, LARGEST_DPT_SIZE 116 117 116 mul dl 118 117 add ax, RAMVARS_size ; Clears CF (will not overflow) -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r592 r623 135 135 136 136 137 ;--------------------------------------------------------------------138 ; RamVars_GetCountOfKnownDrivesToAX139 ; Parameters:140 ; DS: RAMVARS segment141 ; Returns:142 ; AX: Total hard disk count143 ; Corrupts registers:144 ; None145 ;--------------------------------------------------------------------146 ALIGN JUMP_ALIGN147 RamVars_GetCountOfKnownDrivesToAX:148 mov ax, [RAMVARS.wFirstDrvAndCount]149 add al, ah150 and ax, BYTE 7fh151 ret152 153 ;--------------------------------------------------------------------154 ; RamVars_GetIdeControllerCountToCX155 ; Parameters:156 ; Nothing157 ; Returns:158 ; CX: Number of IDE controllers to handle159 ; Corrupts registers:160 ; Nothing161 ;--------------------------------------------------------------------162 ALIGN JUMP_ALIGN163 RamVars_GetIdeControllerCountToCX:164 eMOVZX cx, [cs:ROMVARS.bIdeCnt]165 ret166 167 168 137 %ifdef MODULE_SERIAL_FLOPPY 169 138 ;-------------------------------------------------------------------- … … 184 153 ret 185 154 %endif 155 156 157 ;-------------------------------------------------------------------- 158 ; RamVars_GetIdeControllerCountToCX 159 ; Parameters: 160 ; Nothing 161 ; Returns: 162 ; CX: Number of IDE controllers to handle 163 ; Corrupts registers: 164 ; Nothing 165 ;-------------------------------------------------------------------- 166 ALIGN JUMP_ALIGN 167 RamVars_GetIdeControllerCountToCX: 168 eMOVZX cx, [cs:ROMVARS.bIdeCnt] 169 ret 170 171 172 ;-------------------------------------------------------------------- 173 ; RamVars_GetCountOfKnownDrivesToAX 174 ; Parameters: 175 ; DS: RAMVARS segment 176 ; Returns: 177 ; AX: Total hard disk count 178 ; Corrupts registers: 179 ; None 180 ;-------------------------------------------------------------------- 181 ALIGN JUMP_ALIGN 182 RamVars_GetCountOfKnownDrivesToAX: 183 mov ax, [RAMVARS.wFirstDrvAndCount] 184 add al, ah 185 and ax, BYTE 7Fh 186 ret
Note:
See TracChangeset
for help on using the changeset viewer.