Changeset 143
- Timestamp:
- Apr 8, 2017, 12:27:39 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r140 r143 1720 1720 1721 1721 ;------------------------------------------------------------------------------ 1722 ; Scan all disks to gather information 1723 ;------------------------------------------------------------------------------ 1724 ; IN : None 1725 ; OUT : CF=1 - some failure occured 1726 ; : ZF=1 - no harddisks 1727 ; NOTE : This does the preliminary gathering of disk information 1728 ;------------------------------------------------------------------------------ 1729 DriveIO_ScanDisks Proc Near 1730 1731 IFDEF AUX_DEBUG 1732 IF 1 1733 DBG_TEXT_OUT_AUX 'DriveIO_ScanDisks:' 1734 PUSHRF 1735 call DEBUG_DumpRegisters 1736 ;~ call AuxIO_DumpParagraph 1737 ;~ call AuxIO_TeletypeNL 1738 POPRF 1739 ENDIF 1740 ENDIF 1741 1742 ; Save all registers 1743 pusha 1744 1745 ; Get number of disks in DH 1746 call DriveIO_GetHardDriveCount 1747 1748 ; Check if there are any disks to scan 1749 xor cx, cx ; Prepare 16-bit counter 1750 mov cl, dh ; Number of disks now in CX 1751 jcxz DriveIO_ScanDisks_end ; Quit if no disks 1752 1753 ; Scan disks from 80h upward 1754 mov dl, 80h ; BIOS number of first disk 1755 DriveIO_ScanDisks_next: 1756 call DriveIO_GatherDiskInfo ; Gather info for this disk 1757 jc DriveIO_ScanDisks_end ; Quit if some error occured 1758 inc dl ; Advance to next disk 1759 loop DriveIO_ScanDisks_next ; Scan next disk if there is one 1760 test dl, dl ; Set ZF=0 1761 clc ; Indicate success 1762 1763 DriveIO_ScanDisks_end: 1764 ; Restore all registers 1765 popa 1766 1767 ret 1768 DriveIO_ScanDisks EndP 1769 1770 ;------------------------------------------------------------------------------ 1722 1771 ; Calculate pointer to entry in DISKINFO structure 1723 1772 ;------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.