Changeset 39 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Sep 13, 2010, 11:16:42 AM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm
r27 r39 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 25.3.2010 4 ; Last update : 28.7.20104 ; Last update : 13.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Various floppy drive related functions that … … 22 22 ; BX, CX, DI 23 23 ;-------------------------------------------------------------------- 24 ALIGN JUMP_ALIGN24 ;ALIGN JUMP_ALIGN 25 25 FloppyDrive_IsInt40hInstalled: 26 26 cmp WORD [es:INTV_FLOPPY_FUNC*4+2], 0C000h ; Any ROM segment? 27 jb SHORT .Int40hHandlerIsNotInstalled 28 call .VerifyInt40hHandlerSinceSomeBiosesSimplyReturnFromInt40h 29 .Int40hHandlerIsNotInstalled: 27 30 cmc 31 ret 32 33 ;-------------------------------------------------------------------- 34 ; .VerifyInt40hHandlerSinceSomeBiosesSimplyReturnFromInt40h 35 ; Parameters: 36 ; Nothing 37 ; Returns: 38 ; CF: Cleared if INT 40h is installed 39 ; Set if INT 40h is not installed 40 ; Corrupts registers: 41 ; BX, CX, DI 42 ;-------------------------------------------------------------------- 43 ;ALIGN JUMP_ALIGN 44 .VerifyInt40hHandlerSinceSomeBiosesSimplyReturnFromInt40h: 45 push es 46 push dx 47 push ax 48 49 call .LoadInt40hVerifyParameters 50 int INTV_DISK_FUNC 51 jc SHORT .AH08hNotSupported ; AH=08h not supported on XTs but that doesn't 52 push es ; matter since INT 40h does not need to be verified 53 push di ; on XTs 54 55 call .LoadInt40hVerifyParameters 56 int INTV_FLOPPY_FUNC 57 58 pop dx 59 pop cx 60 cmp dx, di ; Difference in offsets? 61 jne SHORT .Int40hNotInstalled 62 mov dx, es 63 cmp cx, dx ; Difference in segments? 64 jne SHORT .Int40hNotInstalled 65 .AH08hNotSupported: 66 clc 67 jmp SHORT .Int40hIsInstalled 68 .Int40hNotInstalled: 69 stc 70 .Int40hIsInstalled: 71 pop ax 72 pop dx 73 pop es 74 ret 75 76 ;-------------------------------------------------------------------- 77 ; .LoadInt40hVerifyParameters 78 ; Parameters: 79 ; Nothing 80 ; Returns: 81 ; AH: 08h (Get Drive Parameters) 82 ; DL: 00h (floppy drive) 83 ; ES:DI: 0:0h (to guard against BIOS bugs) 84 ; Corrupts registers: 85 ; DH 86 ;-------------------------------------------------------------------- 87 ;ALIGN JUMP_ALIGN 88 .LoadInt40hVerifyParameters: 89 xor dx, dx ; Floppy drive 0 90 mov di, dx 91 mov es, dx ; ES:DI = 0000:0000h to guard against BIOS bugs 92 mov ah, 08h ; Get Drive Parameters 28 93 ret 29 94
Note:
See TracChangeset
for help on using the changeset viewer.