- Timestamp:
- Sep 18, 2011, 10:51:12 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Util/Math.asm
r172 r174 18 18 ;-------------------------------------------------------------------- 19 19 ALIGN JUMP_ALIGN 20 Math_DivQWatSSBPbyCX: 20 Math_DivQWatSSBPbyCX: ; This procedure is included but not used in XTIDECFG 21 21 xor dx, dx 22 22 mov ax, [bp+6] ; Load highest divident WORD to DX:AX … … 49 49 ; Nothing 50 50 ;-------------------------------------------------------------------- 51 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 51 52 ALIGN JUMP_ALIGN 52 Math_DivDXAXbyCX: 53 mov bx, ax54 mov ax, dx55 x or dx, dx53 Math_DivDXAXbyCX: ; This procedure is included but not used in XTIDECFG 54 xor bx, bx 55 xchg bx, ax 56 xchg dx, ax 56 57 div cx 57 58 xchg ax, bx … … 59 60 xchg dx, bx 60 61 ret 62 %endif -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r173 r174 10 10 ; this is how to fit a big drive into INT13's skimpy size requirements, 11 11 ; with a maximum of 8.4G available. 12 ; 13 ; total LBAs (as obtained by words 60+61) 12 ; 13 ; total LBAs (as obtained by words 60+61) 14 14 ; divided by 63 (sectors per track) (save as value A) 15 15 ; Sub 1 from A 16 ; divide A by 1024 + truncate. 16 ; divide A by 1024 + truncate. 17 17 ; == total number of heads to use. 18 18 ; add 1 19 19 ; this value must be either 16, 32, 64, 128, or 256 (round up) 20 20 ; then take the value A above and divide by # of heads 21 ; to get the # of cylinders to use. 21 ; to get the # of cylinders to use. 22 22 ; 23 23 ; 24 24 ; so a LBA28 drive will have 268,435,456 as maximum LBAs 25 ; 25 ; 26 26 ; 10000000h / 63 = 410410h (total cylinders or tracks) 27 27 ; 410410h / 1024 = 1041h, which is way more than 256 heads, but 256 is max. … … 35 35 ; anyway, so there's no need to use the 48bit LBA values. 36 36 ; 37 ; AtaID_GetLbaAssistedCHSto AXBLBH:37 ; AtaID_GetLbaAssistedCHStoDXAXBLBH: 38 38 ; Parameters: 39 39 ; BX:DX:AX: Total number of sectors
Note:
See TracChangeset
for help on using the changeset viewer.