- Timestamp:
- Mar 19, 2012, 2:22:17 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/BIOS_Drive_Information_Tool
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BIOS_Drive_Information_Tool/Src/Main.asm
r332 r359 7 7 %define INCLUDE_KEYBOARD_LIBRARY 8 8 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first! 9 %include "ATA_ID.inc" 10 %include "Int13h.inc" 11 %include "EBIOS.inc" 9 %include "Version.inc" ; From XTIDE Universal BIOS 10 %include "ATA_ID.inc" ; From XTIDE Universal BIOS 11 %include "Int13h.inc" ; From XTIDE Universal BIOS 12 %include "EBIOS.inc" ; From XTIDE Universal BIOS 13 FLG_DRVNHEAD_DRV EQU (1<<4) ; Required by CustomDPT.inc 14 %include "CustomDPT.inc" ; From XTIDE Universal BIOS 12 15 13 16 … … 22 25 ; Include library and other sources 23 26 %include "AssemblyLibrary.asm" 27 %include "LbaAssist.asm" ; From XTIDE Universal BIOS 24 28 %include "Strings.asm" 25 29 %include "Bios.asm" … … 33 37 StartBiosDriveInformationTool: 34 38 CALL_DISPLAY_LIBRARY InitializeDisplayContext 35 mov bl, ATTRIBUTES_NOT_USED 36 mov ax, Print_DosCharOut 37 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 39 call Print_SetCharacterOutputToSTDOUT 38 40 39 41 mov si, g_szProgramName … … 60 62 call Print_NullTerminatedStringFromSI 61 63 call Keyboard_GetKeystrokeToAXandWaitIfNecessary 64 62 65 .DisplayFirstDrive: 63 66 mov si, g_szHeaderDrive … … 126 129 mov si, g_szLBA48 127 130 call Print_NullTerminatedStringFromSI 131 mov si, bx 128 132 mov ax, [bx+ATA6.qwLBACnt] 129 133 mov dx, [bx+ATA6.qwLBACnt+2] 130 134 mov bx, [bx+ATA6.qwLBACnt+4] 131 135 call Print_TotalSectorsFromBXDXAX 136 mov bx, si 132 137 .SkipLBA48: 138 139 ; Print L-CHS generated by XTIDE Universal BIOS 140 mov ax, g_szXTUBversion 141 mov si, g_szXTUB 142 call Print_VersionStringFromAXusingFormatStringInSI 143 call DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX 144 133 145 .SkipAtaInfoSinceError: 134 146 pop dx 135 147 pop cx 148 ret 149 150 151 ALIGN JUMP_ALIGN 152 DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX: 153 test WORD [bx+ATA1.wCaps], A1_wCaps_LBA 154 jz SHORT .LbaNotSupported 155 test WORD [bx+ATA6.wSetSup83], A6_wSetSup83_LBA48 156 jz SHORT .LoadLba28SectorCount 157 158 ; Load LBA48 Sector Count 159 mov ax, [bx+ATA6.qwLBACnt] 160 mov dx, [bx+ATA6.qwLBACnt+2] 161 mov bx, [bx+ATA6.qwLBACnt+4] 162 jmp SHORT .ConvertLbaToLCHS 163 .LoadLba28SectorCount: 164 mov ax, [bx+ATA1.dwLBACnt] 165 mov dx, [bx+ATA1.dwLBACnt+2] 166 xor bx, bx 167 168 .ConvertLbaToLCHS: 169 call LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH 170 LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS 171 xchg cx, ax 172 eMOVZX dx, bl 173 eMOVZX ax, bh 174 call Print_CHSfromCXDXAX 175 .LbaNotSupported: 136 176 ret 137 177 -
trunk/BIOS_Drive_Information_Tool/Src/Print.asm
r327 r359 7 7 8 8 ;-------------------------------------------------------------------- 9 ; Print_SetCharacterOutputToSTDOUT 10 ; Parameters: 11 ; Nothing 12 ; Returns: 13 ; Nothing 14 ; Corrupts registers: 15 ; AX, BX, DI 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN 18 Print_SetCharacterOutputToSTDOUT: 19 mov bl, ATTRIBUTES_NOT_USED 20 mov ax, DosCharOut 21 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 22 ret 23 24 ;-------------------------------------------------------------------- 9 25 ; Use DOS standard output so strings can be redirected to a file. 10 26 ; 11 ; Print_DosCharOut27 ; DosCharOut 12 28 ; Parameters: 13 29 ; AL: Character to output … … 20 36 ;-------------------------------------------------------------------- 21 37 ALIGN JUMP_ALIGN 22 Print_DosCharOut:38 DosCharOut: 23 39 xchg dx, ax 24 40 mov ah, 02h ; DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT … … 51 67 ;--------------------------------------------------------------------- 52 68 ; Print_DriveNumberFromDLusingFormatStringInSI 69 ; Print_VersionStringFromAXusingFormatStringInSI 53 70 ; Print_BiosFunctionNumberFromAXusingFormatStringInSI 54 71 ; Print_SectorSizeFromAXusingFormatStringInSI … … 64 81 Print_DriveNumberFromDLusingFormatStringInSI: 65 82 eMOVZX ax, dl 83 Print_VersionStringFromAXusingFormatStringInSI: 66 84 Print_BiosFunctionNumberFromAXusingFormatStringInSI: 67 85 Print_SectorSizeFromAXusingFormatStringInSI: -
trunk/BIOS_Drive_Information_Tool/Src/Strings.asm
r347 r359 6 6 SECTION .data 7 7 8 g_szProgramName: db "BIOS Drive Information Tool v1.0. 0",LF,CR8 g_szProgramName: db "BIOS Drive Information Tool v1.0.1",LF,CR 9 9 db "(C) 2012 by XTIDE Universal BIOS Team",LF,CR 10 10 db "Released under GNU GPL v2",LF,CR … … 22 22 g_szLBA48: db " LBA48 sectors: ",NULL 23 23 24 g_szXTUB: db "XTIDE Universal BIOS %s generates following L-CHS...",LF,CR,NULL 25 g_szXTUBversion: db ROM_VERSION_STRING ; This one is NULL terminated 26 24 27 g_szOldInfoHeader: db "Old INT 13h information from AH=08h and AH=15h...",LF,CR,NULL 25 28 ; Cylinders -
trunk/BIOS_Drive_Information_Tool/makefile
r327 r359 45 45 LIBS += ../Assembly_Library/Src/Util/ 46 46 LIBS += ../XTIDE_Universal_BIOS/Inc/ 47 LIBS += ../XTIDE_Universal_BIOS/Src/VariablesAndDPTs/ 47 48 HEADERS += $(LIBS) 48 49
Note:
See TracChangeset
for help on using the changeset viewer.