source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm@ 29

Last change on this file since 29 was 28, checked in by Tomi Tilli, 14 years ago
  • v1.1.1 broke booting from foreign drives, it is now fixed.
  • Improved error handling a bit.
  • Longer DRQ and IRQ timeouts to minimize write timouts with some (bad) CF cards.
  • Default boot menu drive should now be properly selected.
File size: 1.0 KB
Line 
1; File name : AH1h_HStatus.asm
2; Project name : IDE BIOS
3; Created date : 27.9.2007
4; Last update : 29.7.2010
5; Author : Tomi Tilli
6; Description : Int 13h function AH=1h, Read Disk Status.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; Int 13h function AH=1h, Read Disk Status.
13;
14; AH1h_HandlerForReadDiskStatus
15; Parameters:
16; AH: Bios function 1h
17; DL: Drive number (8xh)
18; Parameters loaded by Int13h_Jump:
19; DS: RAMVARS segment
20; Returns:
21; AH: Int 13h floppy return status
22; CF: 0 if AH = RET_HD_SUCCESS, 1 otherwise (error)
23; IF: 1
24; Corrupts registers:
25; Flags
26;--------------------------------------------------------------------
27ALIGN JUMP_ALIGN
28AH1h_HandlerForReadDiskStatus:
29 push ds
30
31 LOAD_BDA_SEGMENT_TO ds, di
32 xor ah, ah ; Zero AH
33 cmp ah, [BDA.bHDLastSt] ; Set CF if error code is non-zero
34 xchg ah, [BDA.bHDLastSt] ; Last error to AH, zero to BDA
35
36 pop ds
37 jmp Int13h_PopDiDsAndReturn
Note: See TracBrowser for help on using the repository browser.