Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
- Timestamp:
- May 22, 2016, 12:26:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r567 r589 214 214 call Buffers_GetFileBufferToESDI 215 215 call EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 216 dec cx ; Leave space for checksum byte 217 xor ax, ax 218 ALIGN JUMP_ALIGN 216 217 ; Compatibility fix for 3Com 3C503 cards where the ASIC returns 8080h as the last two bytes of the ROM. 218 219 ; Assume the BIOS size is not 8K, ie generate a normal checksum. 220 dec cx 221 mov ax, 100h 222 cmp cx, 8192 - 1 223 jne SHORT .BiosSizeIsNot8K 224 ; The BIOS size is 8K and therefore a potential candidate for a 3Com 3C503 card. 225 dec cx 226 dec cx 227 mov ah, 3 228 ALIGN JUMP_ALIGN 229 .BiosSizeIsNot8K: 219 230 .SumNextByte: 220 231 add al, [es:di] 232 .NextChecksumByte: 221 233 inc di 222 234 loop .SumNextByte 223 235 neg al 224 236 mov [es:di], al 237 inc cx 238 dec ah 239 jnz SHORT .NextChecksumByte 225 240 226 241 pop dx … … 271 286 ; ES:DI: Ptr to file buffer 272 287 ; Corrupts registers: 273 ; AX288 ; Nothing 274 289 ;-------------------------------------------------------------------- 275 290 ALIGN JUMP_ALIGN 276 291 Buffers_GetIdeControllerCountToCX: 277 call Buffers_GetFileBufferToESDI 278 mov al, [es:di+ROMVARS.bIdeCnt] 279 280 ; Limit controller count for lite mode 292 xor cx, cx 293 call Buffers_GetFileBufferToESDI 294 or cl, [es:di+ROMVARS.bIdeCnt] 295 jnz SHORT .LimitControllerCountForLiteMode 296 inc cx ; Make sure there is at least one controller 297 298 .LimitControllerCountForLiteMode: 281 299 test BYTE [es:di+ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 282 300 jnz SHORT .ReturnControllerCountInCX 283 MIN_U al, MAX_LITE_MODE_CONTROLLERS301 MIN_U cl, MAX_LITE_MODE_CONTROLLERS 284 302 285 303 .ReturnControllerCountInCX: 286 cbw ; A maximum of 127 controllers should be sufficient287 xchg cx, ax288 304 ret 289 305
Note: See TracChangeset
for help on using the changeset viewer.