Changeset 551 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- Jun 6, 2013, 3:31:51 PM (11 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
r545 r551 1 1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : IDE Read/Write functions for transferring 3 ; 4 ; 5 3 ; block using DMA. 4 ; These functions should only be called from IdeTransfer.asm. 5 ; Modified JJP 05-Jun-13 6 6 ; 7 7 ; XTIDE Universal BIOS and Associated Tools … … 19 19 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 20 20 ; 21 22 21 23 22 ; Section containing code … … 81 80 add dl, XTCF_CONTROL_REGISTER 82 81 83 ; Calculate bytes for first page 84 mov ax, di 85 neg ax ; AX = Max BYTEs for first page 82 ; convert sectors in CX to BYTES 86 83 %ifdef USE_186 87 84 shl cx, 9 ; CX = Block size in BYTEs 88 85 %else 89 xchg cl, ch86 xchg cl, ch 90 87 shl cx, 1 91 88 %endif 89 90 ; Calculate bytes for first page 91 mov ax, di 92 neg ax ; 2s compliment 93 94 ; if DI was zero carry flag will be cleared (and set otherwise) 95 ; When DI is zero only one transfer is required since we've limited the 96 ; XT-CFv3 block size to 32k 97 jnc .TransferLastDmaPageWithSizeInCX 98 99 ; CF was set, so DI != 0 and we might need one or two transfers 92 100 cmp cx, ax ; if we won't cross a physical page boundary... 93 jbe 101 jbe SHORT .TransferLastDmaPageWithSizeInCX ; ...perform the transfer in one operation 94 102 95 103 ; Calculate how much we can transfer on first and second rounds 96 xchg cx, ax; CX = BYTEs for first page97 sub ax, cx 98 push ax; Save bytes for second transfer on stack104 xchg cx, ax ; CX = BYTEs for first page 105 sub ax, cx ; AX = BYTEs for second page 106 push ax ; Save bytes for second transfer on stack 99 107 100 108 ; Transfer first DMA page … … 111 119 ; Parameters: 112 120 ; BL: Byte for DMA Mode Register 113 ; CX: Number of BYTEs to transfer ( 512...32768 since max block size is limited to 64)121 ; CX: Number of BYTEs to transfer (1...32768 since max block size is limited to 64) 114 122 ; DX: XT-CFv3 Control Register 115 123 ; ES: Bits 3..0 have physical address bits 19..16 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm
r547 r551 175 175 cwd ; Floppy Drive 00h 176 176 int BIOS_DISKETTE_INTERRUPT_40h 177 xchg dx, ax ; Number of Floppy Drives to AL177 xchg ax, dx ; Number of Floppy Drives to AL 178 178 179 179 pop dx -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r550 r551 52 52 mov WORD [BIOS_BOOT_LOADER_INTERRUPT_19h*4], Int19h_BootLoaderHandler 53 53 mov [BIOS_BOOT_LOADER_INTERRUPT_19h*4+2], cs 54 ;mov WORD [BIOS_BOOT_FAILURE_INTERRUPT_18h*4], Int19h_BootLoaderHandler 55 ;mov [BIOS_BOOT_FAILURE_INTERRUPT_18h*4+2], cs 54 56 55 57 .SkipRomInitialization: … … 78 80 call RamVars_Initialize 79 81 call BootVars_Initialize 82 call Interrupts_InitializeInterruptVectors ; HotkeyBar requires INT 40h so install handlers before drive detection 80 83 call DetectDrives_FromAllIDEControllers 81 call Interrupts_InitializeInterruptVectors82 84 ; Fall to .StoreDptPointersToIntVectors 83 85
Note:
See TracChangeset
for help on using the changeset viewer.