Changeset 262 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
- Timestamp:
- Feb 24, 2012, 10:28:31 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r261 r262 37 37 38 38 %ifdef MODULE_SERIAL 39 jcxz . done; Set to zero on .ideVarsSerialAuto iteration (if any)39 jcxz .AddHardDisks ; Set to zero on .ideVarsSerialAuto iteration (if any) 40 40 %endif 41 41 … … 48 48 ; 49 49 call FindDPT_ToDSDIforSerialDevice 50 j c .done50 jnc .AddHardDisks 51 51 52 52 mov bp, ROMVARS.ideVarsSerialAuto ; Point to our special IDEVARS structure, just for serial scans … … 58 58 %endif 59 59 60 .done: 61 %ifdef MODULE_SERIAL_FLOPPY 60 .AddHardDisks: 62 61 ;---------------------------------------------------------------------- 63 62 ; 64 ; Add in any emulated serial floppy drives. 65 ; 66 mov al, [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt] 67 dec al 68 mov cl, al 69 js .NoFloppies ; if no drives are present, we store 0ffh 63 ; Add in hard disks to BDA, finalize our Count and First variables 64 ; 65 mov cx, [RAMVARS.wDrvCntAndFlopCnt] ; Our count of hard disks 66 test cl, cl 67 jz .AddFloppies ; If none, nothing more to do 68 69 mov al, [es:BDA.bHDCount] 70 add cl, al ; Add our drives to the system count 71 mov [es:BDA.bHDCount], cl 72 or al, 80h ; Or in hard disk flag 73 mov [RAMVARS.bFirstDrv], al ; Store first drive number 74 75 76 .AddFloppies: 77 ;%ifdef MODULE_SERIAL_FLOPPY 78 ;---------------------------------------------------------------------- 79 ; 80 ; Add in any emulated serial floppy drives, finalize our packed Count and First variables 81 ; 82 dec ch 83 mov al, ch 84 js .NoFloppies ; if no drives are present, we store 0ffh 70 85 71 86 call FloppyDrive_GetCountFromBIOS_or_BDA … … 73 88 push ax 74 89 75 add al, c l; Add our drives to existing drive count90 add al, ch ; Add our drives to existing drive count 76 91 cmp al, 3 ; For BDA, max out at 4 drives (ours is zero based) 77 92 jl .MaxBDAFloppiesExceeded … … 92 107 pop ax 93 108 94 shr c l, 1 ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2)109 shr ch, 1 ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2) 95 110 rcl al, 1 ; starting drive number in upper 7 bits, number of drives in low bit 96 111 .NoFloppies: 97 112 mov [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], al 98 %endif113 ;%endif 99 114 100 115 ret
Note:
See TracChangeset
for help on using the changeset viewer.