Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
r526 r589 21 21 %ifndef IDE_8BIT_INC 22 22 %define IDE_8BIT_INC 23 24 ;--------------------------------------------------------------------25 ; UNROLL_SECTORS_IN_CX_TO_DWORDS26 ; UNROLL_SECTORS_IN_CX_TO_QWORDS27 ; UNROLL_SECTORS_IN_CX_TO_OWORDS28 ; Parameters:29 ; CX: Number of sectors in block30 ; Returns:31 ; CX: Number of DWORDs, QWORDs or OWORDs in block32 ; Corrupts registers:33 ; Nothing34 ;--------------------------------------------------------------------35 %macro UNROLL_SECTORS_IN_CX_TO_DWORDS 036 %ifdef USE_18637 shl cx, 738 %else39 xchg cl, ch ; Sectors to WORDs (SHL CX, 8)40 shr cx, 141 %endif42 %endmacro43 44 %macro UNROLL_SECTORS_IN_CX_TO_QWORDS 045 %ifdef USE_18646 shl cx, 647 %else48 UNROLL_SECTORS_IN_CX_TO_DWORDS49 shr cx, 150 %endif51 %endmacro52 53 %macro UNROLL_SECTORS_IN_CX_TO_OWORDS 054 %ifdef USE_18655 shl cx, 556 %else57 ; UNROLL_SECTORS_IN_CX_TO_QWORDS58 ; shr cx, 159 mov ch, cl ; 2 bytes shorter but possibly slower60 mov cl, 361 shr cx, cl62 %endif63 %endmacro64 65 23 66 24 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.