Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r128 r148 10 10 ; AH0h_HandlerForDiskControllerReset 11 11 ; Parameters: 12 ; AH: Bios function 0h 13 ; DL: Drive number (ignored so all drives are reset) 12 ; DL: Translated Drive number (ignored so all drives are reset) 14 13 ; If bit 7 is set all hard disks and floppy disks reset. 15 ; Parameters loaded by Int13h_Jump:16 ; DS: RAMVARS segment17 ; Returns :14 ; DS:DI: Ptr to DPT (in RAMVARS segment) 15 ; SS:BP: Ptr to INTPACK 16 ; Returns with INTPACK in SS:BP: 18 17 ; AH: Int 13h return status (from drive requested in DL) 19 18 ; CF: 0 if succesfull, 1 if error 20 ; IF: 121 ; Corrupts registers:22 ; Flags23 19 ;-------------------------------------------------------------------- 24 20 ALIGN JUMP_ALIGN 25 21 AH0h_HandlerForDiskControllerReset: 26 push dx27 push cx28 push bx29 push ax30 31 22 eMOVZX bx, dl ; Copy requested drive to BL, zero BH to assume no errors 32 23 call ResetFloppyDrivesWithInt40h … … 35 26 call ResetForeignHardDisks 36 27 call AH0h_ResetHardDisksHandledByOurBIOS 37 ALIGN JUMP_ALIGN38 28 .SkipHardDiskReset: 39 mov ah, bh ; Copy error code to AH 40 xor al, al ; Zero AL... 41 cmp al, bh ; ...and set CF if error 42 jmp Int13h_PopXRegsAndReturn 29 mov ah, bh 30 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 43 31 44 32 … … 57 45 and dl, 7Fh ; Clear hard disk bit 58 46 xor ah, ah ; Disk Controller Reset 59 int INTV_FLOPPY_FUNC47 int BIOS_DISKETTE_INTERRUPT_40h 60 48 jmp SHORT BackupErrorCodeFromTheRequestedDriveToBH 61 49 … … 96 84 jnc SHORT .Return ; Return what was in BL unmodified 97 85 mov dl, 80h 98 ALIGN JUMP_ALIGN99 86 .Return: 100 87 ret … … 171 158 BackupErrorCodeFromTheRequestedDriveToBH: 172 159 cmp dl, bl ; Requested drive? 173 jne SHORT .Return 174 mov bh, ah 175 ALIGN JUMP_ALIGN 176 .Return: 160 eCMOVE bh, ah 177 161 ret
Note:
See TracChangeset
for help on using the changeset viewer.