Changeset 130 for trunk/bootcode/regular/driveio.asm
- Timestamp:
- Apr 8, 2017, 12:27:29 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r126 r130 1794 1794 DriveIO_GatherDiskInfo EndP 1795 1795 1796 ;------------------------------------------------------------------------------ 1797 ; Calculate pointer to entry in DISKINFO structure 1798 ;------------------------------------------------------------------------------ 1799 ; IN : DL BIOS disk number (80h etc) 1800 ; OUT : BX Pointer to entry 1801 ; NOTE : BIOS disk number must be valid 1802 ;------------------------------------------------------------------------------ 1803 DriveIO_CalcDiskInfoPointer Proc Near 1804 xchg bx, ax ; AX is used for calculation 1805 mov al, DISKINFO_Size ; Size of DISKINFO structure 1806 mov ah, dl ; BIOS disk number 1807 sub ah, 80h ; Now 0-based index 1808 mul ah ; Now offset into DISKINFO array 1809 add ax, offset [DiskInformation] ; Base of DISKINFO array 1810 xchg bx, ax ; BX now points to entry for disk 1811 ret 1812 DriveIO_CalcDiskInfoPointer EndP 1796 1813 1797 1814 ;------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.