Changeset 128 in xtideuniversalbios
- Timestamp:
- Mar 4, 2011, 1:47:17 PM (14 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm
r121 r128 73 73 stosw 74 74 loop .CopyNextWord 75 xor ax, ax 75 xor ax, ax ; Zero AX and clear CF 76 76 stosb ; Terminate with NULL 77 77 … … 79 79 pop si 80 80 pop ds 81 clc82 81 ret 83 82 … … 94 93 ; Corrupts registers: 95 94 ; Nothing 96 ;-------------------------------------------------------------------- 95 ;-------------------------------------------------------------------- 97 96 ALIGN JUMP_ALIGN 98 97 BootInfo_GetTotalSectorCount: -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r127 r128 24 24 cmp cx, BYTE NO_ITEM_SELECTED 25 25 je SHORT BootMenu_DisplayAndReturnSelection ; Clear screen and display menu 26 jmp SHORT BootMenu_ConvertMenuitemFromCXtoDriveInDX 26 ; Fall through to BootMenu_ConvertMenuitemFromCXtoDriveInDX 27 28 ;-------------------------------------------------------------------- 29 ; BootMenu_ConvertMenuitemFromCXtoDriveInDX 30 ; Parameters: 31 ; CX: Index of menuitem selected from Boot Menu 32 ; DS: RAMVARS segment 33 ; Returns: 34 ; DX: Drive number to be used for booting 35 ; Corrupts registers: 36 ; CX 37 ;-------------------------------------------------------------------- 38 ALIGN JUMP_ALIGN 39 BootMenu_ConvertMenuitemFromCXtoDriveInDX: 40 mov dx, cx ; Copy menuitem index to DX 41 call FloppyDrive_GetCountToCX 42 cmp dx, cx ; Floppy drive? 43 jb SHORT .ReturnFloppyDriveInDX 44 sub dx, cx ; Remove floppy drives from index 45 or dl, 80h 46 .ReturnFloppyDriveInDX: 47 ret 27 48 28 49 … … 77 98 ALIGN JUMP_ALIGN 78 99 BootMenu_GetHeightToAHwithItemCountInAL: 100 add al, BOOT_MENU_HEIGHT_WITHOUT_ITEMS 79 101 xchg cx, ax 80 add cl, BOOT_MENU_HEIGHT_WITHOUT_ITEMS81 102 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 82 103 sub ah, MENU_SCREEN_BOTTOM_LINES*2 ; Leave space for bottom info … … 109 130 ret 110 131 132 111 133 ;-------------------------------------------------------------------- 112 134 ; Returns letter for first hard disk. Usually it will be 'c' but it … … 130 152 131 153 ;-------------------------------------------------------------------- 132 ; BootMenu_ConvertMenuitemFromCXtoDriveInDX133 ; Parameters:134 ; CX: Index of menuitem selected from Boot Menu135 ; DS: RAMVARS segment136 ; Returns:137 ; DX: Drive number to be used for booting138 ; Corrupts registers:139 ; CX140 ;--------------------------------------------------------------------141 ALIGN JUMP_ALIGN142 BootMenu_ConvertMenuitemFromCXtoDriveInDX:143 mov dx, cx ; Copy menuitem index to DX144 call FloppyDrive_GetCountToCX145 cmp dx, cx ; Floppy drive?146 jb SHORT .ReturnFloppyDriveInDX147 sub dx, cx ; Remove floppy drives from index148 or dl, 80h149 .ReturnFloppyDriveInDX:150 ret151 152 153 ;--------------------------------------------------------------------154 154 ; BootMenu_GetMenuitemToDXforDriveInDL 155 155 ; Parameters: … … 163 163 BootMenu_GetMenuitemToDXforDriveInDL: 164 164 xor dh, dh ; Drive number now in DX 165 test dl, 80h166 j zSHORT .ReturnItemIndexInDX ; Return if floppy drive (HD bit not set)165 test dl, dl 166 jns SHORT .ReturnItemIndexInDX ; Return if floppy drive (HD bit not set) 167 167 call FloppyDrive_GetCountToCX 168 168 and dl, ~80h ; Clear HD bit … … 187 187 ALIGN JUMP_ALIGN 188 188 BootMenu_IsDriveInSystem: 189 test dl, 80h; Floppy drive?190 j zSHORT .IsFloppyDriveIsInSystem189 test dl, dl ; Floppy drive? 190 jns SHORT .IsFloppyDriveIsInSystem 191 191 call RamVars_GetHardDiskCountFromBDAtoCX ; Hard Disk count to CX 192 192 or cl, 80h ; Set Hard Disk bit to CX -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r127 r128 157 157 call RamVars_GetSegmentToDS 158 158 call BootMenu_ConvertMenuitemFromCXtoDriveInDX 159 test dl, 80h; Floppy drive?160 j zSHORT .DrawFloppyDrive159 test dl, dl ; Floppy drive? 160 jns SHORT .DrawFloppyDrive 161 161 jmp [cs:bx+ITEM_TYPE_REFRESH.HardDisk] 162 162 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r127 r128 22 22 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 23 23 mov si, ROMVARS.szVersion 24 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 24 ; Fall through to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 25 26 27 ;-------------------------------------------------------------------- 28 ; BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 29 ; Parameters: 30 ; CS:SI: Ptr to NULL terminated string to print 31 ; Returns: 32 ; CF: Set since menu event was handled successfully 33 ; Corrupts registers: 34 ; AX 35 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN 37 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF: 38 push di 39 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 40 pop di 41 stc 42 ret 25 43 26 44 … … 53 71 BootMenuPrint_FloppyMenuitem: 54 72 push bp 55 56 73 mov bp, sp 57 74 mov si, g_szFDLetter … … 109 126 .HardDiskMenuitemForForeignDrive: 110 127 mov si, g_szforeignHD 111 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF128 jmp SHORT BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 112 129 113 130 … … 177 194 .PrintKnownFloppyType: 178 195 push bp 179 180 196 mov bp, sp 181 197 mov si, g_szFddSize … … 320 336 321 337 ;-------------------------------------------------------------------- 322 ; BootMenuPrint_NullTerminatedStringFromCSSIandSetCF323 ; Parameters:324 ; CS:SI: Ptr to NULL terminated string to print325 ; Returns:326 ; CF: Set since menu event was handled successfully327 ; Corrupts registers:328 ; AX329 ;--------------------------------------------------------------------330 ALIGN JUMP_ALIGN331 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF:332 push di333 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI334 pop di335 stc336 ret337 338 339 ;--------------------------------------------------------------------340 338 ; BootMenuPrint_ClearInformationArea 341 339 ; Parameters: -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
r120 r128 21 21 22 22 mov ax, g_szHDD 23 test dl, 80h 24 eCMOVZ ax, g_szFDD 23 test dl, dl 24 js SHORT .NotFDD 25 mov ax, g_szFDD 26 .NotFDD: 25 27 push ax 26 28 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
r96 r128 23 23 jc SHORT .FailedToLoadFirstSector 24 24 25 test dl, 80h26 j zSHORT .AlwaysBootFromFloppyDriveForBooterGames25 test dl, dl 26 jns SHORT .AlwaysBootFromFloppyDriveForBooterGames 27 27 cmp WORD [es:bx+510], 0AA55h ; Valid boot sector? 28 28 jne SHORT .FirstHardDiskSectorNotBootable … … 84 84 .ResetBootDriveFromDL: 85 85 xor ax, ax ; AH=0h, Disk Controller Reset 86 test dl, 80h ; Floppy drive? 87 eCMOVNZ ah, 0Dh ; AH=Dh, Reset Hard Disk (Alternate reset) 86 test dl, dl ; Floppy drive? 87 jns SHORT .SkipAltReset 88 mov ah, 0Dh ; AH=Dh, Reset Hard Disk (Alternate reset) 89 .SkipAltReset: 88 90 int INTV_DISK_FUNC 89 91 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r84 r128 1 ; File name : AH0h_HReset.asm 2 ; Project name : IDE BIOS 3 ; Created date : 27.9.2007 4 ; Last update : 13.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (optimizations) 1 ; Project name : XTIDE Universal BIOS 7 2 ; Description : Int 13h function AH=0h, Disk Controller Reset. 8 3 … … 36 31 eMOVZX bx, dl ; Copy requested drive to BL, zero BH to assume no errors 37 32 call ResetFloppyDrivesWithInt40h 38 test bl, 80h39 j zSHORT .SkipHardDiskReset33 test bl, bl 34 jns SHORT .SkipHardDiskReset 40 35 call ResetForeignHardDisks 41 36 call AH0h_ResetHardDisksHandledByOurBIOS … … 56 51 ; Corrupts registers: 57 52 ; AX, DL, DI 58 ;-------------------------------------------------------------------- 53 ;-------------------------------------------------------------------- 59 54 ALIGN JUMP_ALIGN 60 55 ResetFloppyDrivesWithInt40h: … … 75 70 ; Corrupts registers: 76 71 ; AX, DL, DI 77 ;-------------------------------------------------------------------- 72 ;-------------------------------------------------------------------- 78 73 ALIGN JUMP_ALIGN 79 74 ResetForeignHardDisks: … … 94 89 ; Corrupts registers: 95 90 ; DI 96 ;-------------------------------------------------------------------- 91 ;-------------------------------------------------------------------- 97 92 ALIGN JUMP_ALIGN 98 93 GetDriveNumberForForeignBiosesToDL: -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DriveXlate.asm
r126 r128 141 141 ; Corrupts registers: 142 142 ; AX 143 ;-------------------------------------------------------------------- 143 ;-------------------------------------------------------------------- 144 144 ALIGN JUMP_ALIGN 145 145 DriveXlate_Reset: … … 160 160 ; Corrupts registers: 161 161 ; Nothing 162 ;-------------------------------------------------------------------- 162 ;-------------------------------------------------------------------- 163 163 ALIGN JUMP_ALIGN 164 164 DriveXlate_SetDriveToSwap: 165 test dl, 80h; Floppy drive?166 j nzSHORT .SetHardDiskToSwap165 test dl, dl ; Floppy drive? 166 js SHORT .SetHardDiskToSwap 167 167 .SetFloppyDriveToSwap: 168 168 mov [RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl … … 187 187 ; Corrupts registers: 188 188 ; Nothing 189 ;-------------------------------------------------------------------- 189 ;-------------------------------------------------------------------- 190 190 ALIGN JUMP_ALIGN 191 191 DriveXlate_DoesFunctionReturnSomethingInDL: 192 192 cmp ah, 08h ; AH=08h, Read Disk Drive Parameters? 193 193 je SHORT DriveXlate_FunctionReturnsSomethingInDL 194 test dl, 80h195 j zSHORT DriveXlate_DoesFloppyFunctionReturnSomethingInDL194 test dl, dl 195 jns SHORT DriveXlate_DoesFloppyFunctionReturnSomethingInDL 196 196 ; Fall to DriveXlate_DoesHardDiskFunctionReturnSomethingInDL 197 197 … … 211 211 ; Corrupts registers: 212 212 ; Nothing 213 ;-------------------------------------------------------------------- 213 ;-------------------------------------------------------------------- 214 214 ; ALIGN JUMP_ALIGN 215 215 DriveXlate_DoesHardDiskFunctionReturnSomethingInDL: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r99 r128 232 232 ; Make sure that more drives can be accepted 233 233 mov dl, [es:BDA.bHDCount] ; Load number of hard disks 234 test dl, 80h; Hard disks at maximum?234 test dl, dl ; Hard disks at maximum? 235 235 stc ; Assume error 236 j nzSHORT .TooManyDrives ; If so, return236 js SHORT .TooManyDrives ; If so, return 237 237 238 238 ; Store drive number to DPT -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r116 r128 130 130 cmp ah, 08h ; Read Disk Drive Parameters? 131 131 jne SHORT RamVars_IsDriveHandledByThisBIOS 132 test dl, 80h ; We dotnot handle floppy drives133 j zSHORT .FunctionIsNotHandledByOurBIOS132 test dl, dl ; We do not handle floppy drives 133 jns SHORT .FunctionIsNotHandledByOurBIOS 134 134 ALIGN JUMP_ALIGN 135 135 .FunctionIsHandledByOurBIOS:
Note:
See TracChangeset
for help on using the changeset viewer.