Changeset 424 in xtideuniversalbios for trunk/BIOS_Drive_Information_Tool/Src/Print.asm
- Timestamp:
- May 16, 2012, 4:23:10 PM (13 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BIOS_Drive_Information_Tool/Src/Print.asm
r376 r424 30 30 ; AX, BX, DI 31 31 ;-------------------------------------------------------------------- 32 ALIGN JUMP_ALIGN33 32 Print_SetCharacterOutputToSTDOUT: 34 33 mov bl, ATTRIBUTES_NOT_USED … … 50 49 ; AX, DX 51 50 ;-------------------------------------------------------------------- 52 ALIGN JUMP_ALIGN53 51 DosCharOut: 54 52 xchg dx, ax … … 68 66 ; AX, BP, SI, DI (CF remains unchanged) 69 67 ;-------------------------------------------------------------------- 70 ALIGN JUMP_ALIGN71 68 Print_ErrorMessageFromAHifError: 72 69 jnc SHORT .NoErrors 73 70 eMOVZX ax, ah 74 71 mov si, g_szBiosError 75 call Print_ BiosFunctionNumberFromAXusingFormatStringInSI72 call Print_FormatStringFromSIwithParameterInAX 76 73 stc ; Keep the CF set 77 74 ALIGN JUMP_ALIGN … … 82 79 ;--------------------------------------------------------------------- 83 80 ; Print_DriveNumberFromDLusingFormatStringInSI 84 ; Print_VersionStringFromAXusingFormatStringInSI85 ; Print_BiosFunctionNumberFromAXusingFormatStringInSI86 ; Print_SectorSizeFromAXusingFormatStringInSI87 81 ; Parameters: 88 82 ; DL: Drive Number 89 ; AX: Function number83 ; SI: Offset to format string 90 84 ; Returns: 91 85 ; Nothing … … 93 87 ; AX, BP, DI 94 88 ;-------------------------------------------------------------------- 95 ALIGN JUMP_ALIGN96 89 Print_DriveNumberFromDLusingFormatStringInSI: 97 90 eMOVZX ax, dl 98 Print_VersionStringFromAXusingFormatStringInSI: 99 Print_BiosFunctionNumberFromAXusingFormatStringInSI: 100 Print_SectorSizeFromAXusingFormatStringInSI: 101 mov bp, sp 102 push ax 103 jmp SHORT JumpToFormatNullTerminatedStringFromSI 91 ; Fall to Print_FormatStringFromSIwithParameterInAX 92 93 94 ;--------------------------------------------------------------------- 95 ; Print_FormatStringFromSIwithParameterInAX 96 ; Print_FormatStringFromSIwithParametersInAXDX 97 ; Print_FormatStringFromSIwithParametersInAXDXCX 98 ; Parameters: 99 ; AX: Format parameter 1 100 ; DX: Format parameter 2 101 ; CX: Format parameter 3 102 ; SI: Offset to format string 103 ; Returns: 104 ; Nothing 105 ; Corrupts registers: 106 ; AX, BP, DI 107 ;-------------------------------------------------------------------- 108 Print_FormatStringFromSIwithParameterInAX: 109 mov bp, sp 110 push ax 111 jmp JumpToFormatNullTerminatedStringFromSI 112 113 Print_FormatStringFromSIwithParametersInAXDX: 114 mov bp, sp 115 push ax 116 push dx 117 jmp JumpToFormatNullTerminatedStringFromSI 118 119 Print_FormatStringFromSIwithParametersInAXDXCX: 120 mov bp, sp 121 push ax 122 push dx 123 push cx 124 jmp SHORT JumpToFormatNullTerminatedStringFromSI 125 126 127 ;--------------------------------------------------------------------- 128 ; Print_ModeFromDLandCHSfromAXBLBH 129 ; Parameters: 130 ; AX: Number of L-CHS cylinders (1...1024) 131 ; BL: Number of L-CHS heads (1...255) 132 ; BH: Number of L-CHS sectors per track (1...63) 133 ; DL: CHS Translate Mode 134 ; Returns: 135 ; Nothing 136 ; Corrupts registers: 137 ; AX, BP, SI, DI 138 ;-------------------------------------------------------------------- 139 Print_ModeFromDLandCHSfromAXLBH: 140 mov bp, sp 141 142 xor dh, dh 143 mov si, dx 144 shl si, 1 ; Shift for WORD lookup 145 push WORD [si+.rgszXlateModeToString] 146 147 ePUSH_T si, g_szFormatCHS 148 push ax ; Cylinders 149 eMOVZX ax, bl 150 push ax ; Heads 151 mov al, bh 152 push ax ; Sectors per track 153 154 mov si, g_szXlateAndCHS 155 jmp SHORT JumpToFormatNullTerminatedStringFromSI 156 157 .rgszXlateModeToString: 158 dw g_szNormal 159 dw g_szLarge 160 dw g_szLBA 104 161 105 162 … … 115 172 ; AX, BP, DI 116 173 ;-------------------------------------------------------------------- 117 ALIGN JUMP_ALIGN118 174 Print_CHSfromCXDXAX: 119 175 push si … … 139 195 ; AX, CX, BP, SI, DI 140 196 ;-------------------------------------------------------------------- 141 ALIGN JUMP_ALIGN142 197 Print_NameFromAtaInfoInBX: 143 198 cld … … 171 226 ; AX, BX, BP, DI 172 227 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN174 228 Print_TotalSectorsFromBXDXAX: 175 229 ePUSH_T di, 0 … … 200 254 ; AX, BP, SI, DI 201 255 ;-------------------------------------------------------------------- 202 ALIGN JUMP_ALIGN203 256 Print_EbiosVersionFromBXandExtensionsFromCX: 204 257 mov bp, sp … … 219 272 ; AX, DI 220 273 ;-------------------------------------------------------------------- 221 ALIGN JUMP_ALIGN222 274 JumpToFormatNullTerminatedStringFromSI: 223 275 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI … … 234 286 ; AX, DI 235 287 ;-------------------------------------------------------------------- 236 ALIGN JUMP_ALIGN237 288 Print_NullTerminatedStringFromSI: 238 289 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
Note:
See TracChangeset
for help on using the changeset viewer.