Changeset 322 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers
- Timestamp:
- Mar 11, 2012, 4:17:46 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r294 r322 30 30 mov [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl 31 31 32 call FindDPT_ForDriveNumberInDL ; DS:DI points to our DPT, or NULL if not our drive 33 jnc SHORT .OurFunction ; DPT found, this is one of our drives, and thus our function 34 35 test ah, ah 36 jz SHORT .OurFunction ; we handle all function 0h requests (resets) 37 cmp ah, 8 38 jne SHORT Int13h_DirectCallToAnotherBios ; non-8h function, handled by foreign bios 39 40 %ifndef MODULE_SERIAL_FLOPPY 41 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and 42 ; floppy drive counts. Without floppy support, we handle only hard disk traffic for function 08h, 43 ; and thus need the check below. 44 ; 45 test dl, dl 46 jns SHORT Int13h_DirectCallToAnotherBios 47 %endif 32 call FindDPT_ForDriveNumberInDL ; DS:DI points to our DPT, or NULL if not our drive 33 jc SHORT .NotOurDrive ; DPT not found so this is not one of our drives 48 34 49 35 .OurFunction: … … 65 51 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 66 52 jz SHORT Int13h_UnsupportedFunction ; No eINT 13h for CHS drives 53 sub bl, 41h<<1 ; BX = Offset to eINT 13h jump table 54 jb SHORT Int13h_UnsupportedFunction 67 55 cmp ah, 48h 68 56 ja SHORT Int13h_UnsupportedFunction 69 sub bl, 41h<<1 ; BX = Offset to eINT 13h jump table70 jb SHORT Int13h_UnsupportedFunction71 57 jmp [cs:bx+g_rgwEbiosFunctionJumpTable] 72 58 %endif 73 59 60 ALIGN JUMP_ALIGN 61 .NotOurDrive: 62 test ah, ah 63 jz SHORT .OurFunction ; We handle all function 0h requests (resets) 64 65 %ifndef MODULE_SERIAL_FLOPPY 66 ; Without floppy support, we handle only hard disk traffic for function 08h. 67 test dl, dl 68 jns SHORT Int13h_DirectCallToAnotherBios 69 %endif 70 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts. 71 cmp ah, 8 72 je SHORT .OurFunction 73 ; Fall to Int13h_DirectCallToAnotherBios 74 74 75 75 ;-------------------------------------------------------------------- … … 103 103 pop bp ; Standard INT 13h functions never uses BP as return register 104 104 %ifdef USE_386 105 mov [bp+IDEPACK.intpack+INTPACK.gs], gs106 mov [bp+IDEPACK.intpack+INTPACK.fs], fs105 ; mov [bp+IDEPACK.intpack+INTPACK.gs], gs 106 ; mov [bp+IDEPACK.intpack+INTPACK.fs], fs 107 107 %endif 108 108 mov [bp+IDEPACK.intpack+INTPACK.es], es -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r305 r322 22 22 ALIGN JUMP_ALIGN 23 23 AH25h_HandlerForGetDriveInformation: 24 mov al, 1 ; Read 1 sector 25 call Prepare_BufferToESSIforOldInt13hTransfer 26 mov ah, COMMAND_IDENTIFY_DEVICE 24 mov ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1) ; Read 1 sector 25 call Prepare_BufferToESSIforOldInt13hTransfer ; Preserves AX 27 26 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ) 28 27 %ifdef USE_186 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r294 r322 111 111 cmp al, 128 112 112 ja SHORT InvalidNumberOfSectorsRequested 113 mov ah, RET_HD_BOUNDARY114 113 test si, si ; Offset must be zero to xfer 128 sectors 115 114 jnz SHORT CannotAlignPointerProperly … … 120 119 Prepare_ReturnFromInt13hWithInvalidFunctionError: 121 120 mov ah, RET_HD_INVALID 121 SKIP2B f 122 CannotAlignPointerProperly: 123 mov ah, RET_HD_BOUNDARY 122 124 ZeroSectorsRequestedSoNoErrors: 123 CannotAlignPointerProperly:124 125 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 125 126
Note:
See TracChangeset
for help on using the changeset viewer.