Changeset 445 in xtideuniversalbios
- Timestamp:
- Aug 29, 2012, 12:59:23 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Emulate.inc
r420 r445 465 465 eSHIFT_IM %1, %2, shr 466 466 %endmacro 467 467 468 %macro eSHL_IM 2 469 %ifdef USE_386 470 %if %2 = 1 471 add %1, %1 ; Same size but faster on 386 and 486. Fails if %1 is a memory operand. 472 %else 473 eSHIFT_IM %1, %2, shl 474 %endif 475 %else 468 476 eSHIFT_IM %1, %2, shl 469 %endmacro 477 %endif 478 %endmacro 479 470 480 %macro eROR_IM 2 471 481 eSHIFT_IM %1, %2, ror 472 482 %endmacro 483 473 484 %macro eROL_IM 2 474 485 eSHIFT_IM %1, %2, rol 475 486 %endmacro 487 476 488 %macro eRCR_IM 2 477 489 eSHIFT_IM %1, %2, rcr 478 490 %endmacro 491 479 492 %macro eRCL_IM 2 480 493 eSHIFT_IM %1, %2, rcl -
trunk/Assembly_Library/Inc/Math.inc
r287 r445 79 79 ALIGN JUMP_ALIGN 80 80 .ShiftNextBit: 81 shlax, 181 eSHL_IM ax, 1 82 82 rcl dx, 1 83 83 loop .ShiftNextBit -
trunk/Assembly_Library/Src/Display/DisplayCursor.asm
r407 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 72 72 xor dh, dh 73 73 add ax, dx ; Add column offset 74 shlax, 1 ; Convert to WORD offset74 eSHL_IM ax, 1 ; Convert to WORD offset 75 75 add ax, [VIDEO_BDA.wPageOffset] ; AX = Video RAM offset 76 76 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], ax -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r376 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 137 137 .ConvertIndexToFunctionOffset: 138 138 sub bx, .rgcFormatCharToLookupIndex 139 shlbx, 1 ; Shift for WORD lookup139 eSHL_IM bx, 1 ; Shift for WORD lookup 140 140 mov ax, [cs:bx+.rgfnFormatSpecifierParser] 141 141 ret -
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r376 r445 6 6 7 7 ; 8 ; XTIDE Universal BIOS and Associated Tools 8 ; XTIDE Universal BIOS and Associated Tools 9 9 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 10 10 ; … … 13 13 ; the Free Software Foundation; either version 2 of the License, or 14 14 ; (at your option) any later version. 15 ; 15 ; 16 16 ; This program is distributed in the hope that it will be useful, 17 17 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 18 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 ; GNU General Public License for more details. 19 ; GNU General Public License for more details. 20 20 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 21 21 ; … … 194 194 195 195 .process_after_output: 196 shlch,1 ; check high order bits for end of string or space196 eSHL_IM ch,1 ; check high order bits for end of string or space 197 197 jns short DisplayFormatCompressed_ret 198 198 jnc .decode … … 208 208 ; DisplayFormatCompressed_BaseFormatOffset and jump targets (must fit in 256 bytes) 209 209 ; 210 shlch,1 ; setup ch for later testing of null in .process_after_output210 eSHL_IM ch,1 ; setup ch for later testing of null in .process_after_output 211 211 and ax,0001fh ; also clears AH for addition with BX and DX below 212 212 -
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r376 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 18 ; 19 19 20 20 21 21 ; Section containing code … … 40 40 ; Get last text line column offset to AX 41 41 call MenuLocation_GetMaxTextLineLengthToAX 42 shlax, 1 ; Characters to BYTEs42 eSHL_IM ax, 1 ; Characters to BYTEs 43 43 add ax, dx 44 44 … … 62 62 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX 63 63 xor ah, ah 64 shlax, 164 eSHL_IM ax, 1 65 65 ret 66 66 … … 82 82 83 83 mov dl, [VIDEO_BDA.wColumns] 84 shldl, 1 ; DX = bytes per row84 eSHL_IM dl, 1 ; DX = bytes per row 85 85 mov ax, di 86 86 div dl ; AL = row index, AH = column index -
trunk/Assembly_Library/Src/Util/Memory.asm
r440 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 151 151 ; Returns: 152 152 ; AL: Sum of bytes 153 ; ZF: Set if result is zero 154 ; Cleared if result is non-zero 153 155 ; Corrupts registers: 154 156 ; CX 155 157 ;-------------------------------------------------------------------- 158 %ifndef EXCLUDE_FROM_XTIDECFG 156 159 ALIGN JUMP_ALIGN 157 160 Memory_SumCXbytesFromESSItoAL: 158 161 push si 162 dec si 159 163 xor al, al 160 164 ALIGN JUMP_ALIGN 161 165 .AddNextByteToAL: 166 inc si 162 167 add al, [es:si] 163 inc si164 168 loop .AddNextByteToAL 165 169 pop si 166 170 ret 171 %endif -
trunk/Assembly_Library/Src/Util/Sort.asm
r376 r445 7 7 8 8 ; 9 ; XTIDE Universal BIOS and Associated Tools 9 ; XTIDE Universal BIOS and Associated Tools 10 10 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 11 11 ; … … 14 14 ; the Free Software Foundation; either version 2 of the License, or 15 15 ; (at your option) any later version. 16 ; 16 ; 17 17 ; This program is distributed in the hope that it will be useful, 18 18 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 19 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 ; GNU General Public License for more details. 20 ; GNU General Public License for more details. 21 21 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 22 ; 22 ; 23 23 24 24 ; Algorith is from http://www.algolist.net/Algorithms/Sorting/Quicksort … … 62 62 push di 63 63 mov di, cx 64 shlcx, 1 ; Reserve temp and pivot items64 eSHL_IM cx, 1 ; Reserve temp and pivot items 65 65 add cx, BYTE QSORT_PARAMS_size 66 66 eENTER_STRUCT cx -
trunk/BIOS_Drive_Information_Tool/Src/AtaInfo.asm
r426 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 18 ; … … 175 175 ;-------------------------------------------------------------------- 176 176 DisplayBlockModeInformationUsingAtaInfoFromDSBX: 177 eMOVZX ax, BYTE [bx+ATA1.bBlockSel] ; ATA2+ has flag on high word 178 eMOVZX dx, BYTE [bx+ATA1.bBlckSize] 177 eMOVZX ax, [bx+ATA1.bBlockSel] ; ATA2+ has flag on high word 178 cwd 179 mov dl, [bx+ATA1.bBlckSize] 179 180 mov si, g_szBlockMode 180 181 jmp Print_FormatStringFromSIwithParametersInAXDX -
trunk/Configurator/Src/Libraries/math.asm
r181 r445 104 104 push bx 105 105 mov bx, dx ; Copy hiword to BX 106 xor dx, dx ; Zero DX for multiplication107 106 mul cx ; DX:AX = AX (loword) * CX (multiplier) 108 107 push dx ; Push possible overflow 109 108 xchg ax, bx ; => AX=old hiword, BX=new loword 110 xor dx, dx ; Zero DX for division111 109 mul cx ; DX:AX = AX (hiword) * CX (multiplier) 112 110 pop dx ; Pop possible overflow from first mul -
trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
r442 r445 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ; GNU General Public License for more details. 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 19 ; … … 25 25 ; UNROLL_SECTORS_IN_CX_TO_DWORDS 26 26 ; UNROLL_SECTORS_IN_CX_TO_QWORDS 27 ; UNROLL_SECTORS_IN_CX_TO_OWORDS 27 28 ; Parameters: 28 29 ; CX: Number of sectors in block 29 30 ; Returns: 30 ; CX: Number of DWORDs or QWORDs in block31 ; CX: Number of DWORDs, QWORDs or OWORDs in block 31 32 ; Corrupts registers: 32 33 ; Nothing … … 46 47 %else 47 48 UNROLL_SECTORS_IN_CX_TO_DWORDS 49 shr cx, 1 50 %endif 51 %endmacro 52 53 %macro UNROLL_SECTORS_IN_CX_TO_OWORDS 0 54 %ifdef USE_186 55 shl cx, 5 56 %else 57 UNROLL_SECTORS_IN_CX_TO_QWORDS 48 58 shr cx, 1 49 59 %endif -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r444 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 79 79 test bh, FLG_DRVNHEAD_DRV ; Wait already done for Master 80 80 jnz SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 81 call AHDh_WaitUn ilDriveMotorHasReachedFullSpeed81 call AHDh_WaitUntilDriveMotorHasReachedFullSpeed 82 82 .SkipLongWaitSinceDriveIsNotPrimaryMaster: 83 83 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r444 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Structure containing variables for PIO transfer functions. … … 119 119 jc SHORT ReturnWithTransferErrorInAH 120 120 121 ; All sectors succes fully transferred121 ; All sectors successfully transferred 122 122 add cx, [bp+PIOVARS.bSectorsDone] ; Never sets CF 123 123 ret … … 244 244 ALIGN JUMP_ALIGN 245 245 ReadBlockFromXtideRev1: 246 UNROLL_SECTORS_IN_CX_TO_ QWORDS246 UNROLL_SECTORS_IN_CX_TO_OWORDS 247 247 mov bl, 8 ; Bit mask for toggling data low/high reg 248 248 ALIGN JUMP_ALIGN 249 249 .InswLoop: 250 %rep 8 ; WORDs 250 251 XTIDE_INSW 251 XTIDE_INSW 252 XTIDE_INSW 253 XTIDE_INSW 252 %endrep 254 253 loop .InswLoop 255 254 ret … … 259 258 ALIGN JUMP_ALIGN 260 259 ReadBlockFromXtideRev2: 261 UNROLL_SECTORS_IN_CX_TO_QWORDS 262 ALIGN JUMP_ALIGN 263 .ReadNextQword: 264 in ax, dx ; Read 1st WORD 265 stosw ; Store 1st WORD to [ES:DI] 266 in ax, dx 267 stosw ; 2nd 268 in ax, dx 269 stosw ; 3rd 270 in ax, dx 271 stosw ; 4th 272 loop .ReadNextQword 260 UNROLL_SECTORS_IN_CX_TO_OWORDS 261 ALIGN JUMP_ALIGN 262 .ReadNextOword: 263 %rep 8 ; WORDs 264 in ax, dx ; Read WORD 265 stosw ; Store WORD to [ES:DI] 266 %endrep 267 loop .ReadNextOword 273 268 ret 274 269 %endif … … 283 278 284 279 %else ; If 8088/8086 285 280 ALIGN JUMP_ALIGN 286 281 ReadBlockFrom8bitDataPort: 287 UNROLL_SECTORS_IN_CX_TO_DWORDS 288 ALIGN JUMP_ALIGN 289 .ReadNextDword: 290 in al, dx ; Read 1st BYTE 291 stosb ; Store 1st BYTE to [ES:DI] 292 in al, dx 293 stosb 294 295 in al, dx 296 stosb 297 in al, dx 298 stosb 299 loop .ReadNextDword 282 UNROLL_SECTORS_IN_CX_TO_OWORDS 283 ALIGN JUMP_ALIGN 284 .ReadNextOword: 285 %rep 16 ; BYTEs 286 in al, dx ; Read BYTE 287 stosb ; Store BYTE to [ES:DI] 288 %endrep 289 loop .ReadNextOword 300 290 ret 301 291 %endif … … 349 339 ALIGN JUMP_ALIGN 350 340 .OutswLoop: 341 %rep 4 ; WORDs 351 342 XTIDE_OUTSW 352 XTIDE_OUTSW 353 XTIDE_OUTSW 354 XTIDE_OUTSW 343 %endrep 355 344 loop .OutswLoop 356 345 pop ds … … 366 355 ALIGN JUMP_ALIGN 367 356 .WriteNextQword: 357 %rep 4 ; WORDs 368 358 XTIDE_MOD_OUTSW 369 XTIDE_MOD_OUTSW 370 XTIDE_MOD_OUTSW 371 XTIDE_MOD_OUTSW 359 %endrep 372 360 loop .WriteNextQword 373 361 pop ds … … 392 380 ALIGN JUMP_ALIGN 393 381 .WriteNextDword: 394 lodsb ; Load 1st BYTE from [DS:SI] 395 out dx, al ; Write 1st BYTE 396 lodsb 397 out dx, al 398 399 lodsb 400 out dx, al 401 lodsb 402 out dx, al 382 %rep 4 ; BYTEs 383 lodsb ; Load BYTE from [DS:SI] 384 out dx, al ; Write BYTE 385 %endrep 403 386 loop .WriteNextDword 404 387 pop ds -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
r419 r445 121 121 jc SHORT ReturnWithMemoryIOtransferErrorInAH 122 122 123 ; All rectors succesfully transferred123 ; All sectors successfully transferred 124 124 add cx, [bp+PIOVARS.bSectorsDone] ; Never sets CF 125 125 ret -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
r376 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 37 37 38 38 ; 39 ; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY. It is important to 39 ; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY. It is important to 40 40 ; distinguish floppy disks presented by the server and not treat them as hard disks, even 41 41 ; if the floppy support is disabled. 42 42 ; 43 43 mov al, [es:si+SerialServer_ATA_wDriveFlags] 44 shlal, 144 eSHL_IM al, 1 45 45 mov byte [di+DPT.bFlagsHigh], al 46 46 47 47 ret 48 48 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r443 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 103 103 ; Jump to correct BIOS function 104 104 eMOVZX bx, ah 105 shlbx, 1105 eSHL_IM bx, 1 106 106 cmp ah, 25h ; Possible EBIOS function? 107 107 %ifndef MODULE_EBIOS -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r443 r445 244 244 ; Nothing 245 245 ;-------------------------------------------------------------------- 246 DoNotEnable8bitMode: 246 247 IgnoreInvalidCommandError: 247 248 xor ah, ah ; Clears CF … … 270 271 ;-------------------------------------------------------------------- 271 272 AH9h_Enable8bitPioModeForXTCF: 272 eMOVZX bx, BYTE[di+DPT.bIdevarsOffset]273 eMOVZX bx, [di+DPT.bIdevarsOffset] 273 274 cmp BYTE [cs:bx+IDEVARS.bDevice], DEVICE_8BIT_XTCF 274 je SHORT .Enable8bitMode 275 xor ah, ah ; Do nothing for this device 276 ret 277 .Enable8bitMode: 275 jne SHORT DoNotEnable8bitMode 276 278 277 mov si, FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE 279 278 jmp AH23h_SetControllerFeatures -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r429 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 106 106 push cx 107 107 push ax 108 call AHDh_WaitUn ilDriveMotorHasReachedFullSpeed108 call AHDh_WaitUntilDriveMotorHasReachedFullSpeed 109 109 call AH9h_InitializeDriveForUse ; Initialize Master or Slave (Master will come first in DPT list) 110 110 … … 133 133 134 134 ;-------------------------------------------------------------------- 135 ; AHDh_WaitUn ilDriveMotorHasReachedFullSpeed135 ; AHDh_WaitUntilDriveMotorHasReachedFullSpeed 136 136 ; Parameters: 137 137 ; DS:DI: Ptr to DPT … … 142 142 ; AL, BX, CX, DX 143 143 ;-------------------------------------------------------------------- 144 AHDh_WaitUn ilDriveMotorHasReachedFullSpeed:144 AHDh_WaitUntilDriveMotorHasReachedFullSpeed: 145 145 %ifdef MODULE_SERIAL 146 146 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r421 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 55 55 call Prepare_GetOldInt13hCommandIndexToBX 56 56 mov al, [di+DPT.bFlagsLow] 57 shlal, 1 ; Set CF if LBA48 supported57 eSHL_IM al, 1 ; Set CF if LBA48 supported 58 58 adc bl, bh ; LBA48 EXT commands 59 59 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r442 r445 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ; GNU General Public License for more details. 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 ; 19 ; 20 20 21 21 ; Section containing code … … 28 28 ; Returns: 29 29 ; CF: Set if failed to verify ATA-ID 30 ; Cleared if ATA-ID verified succes fully30 ; Cleared if ATA-ID verified successfully 31 31 ; Corrupts registers: 32 32 ; AX, BX, CX … … 44 44 call .CompareCHorSfromOffsetBXtoMaxValueInCX 45 45 46 add bx, BYTE ATA1.wHeadCnt - ATA1.wCylCnt46 mov bl, ATA1.wHeadCnt & 0FFh 47 47 mov cx, MAX_VALID_PCHS_HEADS 48 48 call .CompareCHorSfromOffsetBXtoMaxValueInCX 49 49 50 add bx, BYTE ATA1.wSPT - ATA1.wHeadCnt50 mov bl, ATA1.wSPT & 0FFh 51 51 mov cl, MAX_VALID_PCHS_SECTORS_PER_TRACK 52 52 call .CompareCHorSfromOffsetBXtoMaxValueInCX … … 69 69 ; Check checksum byte 70 70 mov cx, ATA6_size 71 call Memory_SumCXbytesFromESSItoAL 72 test al, al 71 call Memory_SumCXbytesFromESSItoAL ; Returns with ZF set according to result 73 72 jnz SHORT .FailedToVerifyAtaID 74 73 … … 119 118 mov bx, [es:si+ATA1.bPioMode] 120 119 mov ax, bx ; AH = 0, AL = PIO mode 0, 1 or 2 121 shlbx, 1 ; Shift for WORD lookup120 eSHL_IM bx, 1 ; Shift for WORD lookup 122 121 mov cx, [cs:bx+.rgwPio0to2CycleTimeInNanosecs] 123 122 … … 187 186 ;-------------------------------------------------------------------- 188 187 AtaID_GetActiveTimeToAXfromPioModeInBX: 189 shl bx, 1 190 mov ax, [cs:bx+.rgwPioModeToActiveTimeNs] 191 shr bx, 1 192 ret 193 194 .rgwPioModeToActiveTimeNs: 195 dw PIO_0_MIN_ACTIVE_TIME_NS 196 dw PIO_1_MIN_ACTIVE_TIME_NS 197 dw PIO_2_MIN_ACTIVE_TIME_NS 198 dw PIO_3_MIN_ACTIVE_TIME_NS 199 dw PIO_4_MIN_ACTIVE_TIME_NS 200 dw PIO_5_MIN_ACTIVE_TIME_NS 201 dw PIO_6_MIN_ACTIVE_TIME_NS 188 eMOVZX ax, [cs:bx+.rgbPioModeToActiveTimeNs] 189 ret 190 191 .rgbPioModeToActiveTimeNs: 192 db PIO_0_MIN_ACTIVE_TIME_NS 193 db PIO_1_MIN_ACTIVE_TIME_NS 194 db PIO_2_MIN_ACTIVE_TIME_NS 195 db PIO_3_MIN_ACTIVE_TIME_NS 196 db PIO_4_MIN_ACTIVE_TIME_NS 197 db PIO_5_MIN_ACTIVE_TIME_NS 198 db PIO_6_MIN_ACTIVE_TIME_NS 202 199 203 200 %endif ; MODULE_ADVANCED_ATA -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
r423 r445 4 4 ; 5 5 ; These algorithms are taken from: http://www.mossywell.com/boot-sequence 6 ; Take a look at it for more detailed information. 6 ; Take a look at it for more detailed information. 7 7 ; 8 8 ; This file is shared with BIOS Drive Information Tool. 9 9 10 10 ; 11 ; XTIDE Universal BIOS and Associated Tools 11 ; XTIDE Universal BIOS and Associated Tools 12 12 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 13 13 ; … … 16 16 ; the Free Software Foundation; either version 2 of the License, or 17 17 ; (at your option) any later version. 18 ; 18 ; 19 19 ; This program is distributed in the hope that it will be useful, 20 20 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 21 21 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 ; GNU General Public License for more details. 22 ; GNU General Public License for more details. 23 23 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 24 24 ; 25 25 26 26 ; Section containing code 27 27 SECTION .text … … 33 33 ; ES:SI: Ptr to 512-byte ATA information read from the drive 34 34 ; Returns: 35 ; BX:DX:AX: 48-bit secto hr count35 ; BX:DX:AX: 48-bit sector count 36 36 ; CL: FLGL_DPT_LBA48 if LBA48 supported 37 37 ; Zero if only LBA28 is supported … … 239 239 jbe SHORT ReturnLCHSinAXBLBH 240 240 shr ax, 1 ; Halve cylinders 241 shlbl, 1 ; Double heads241 eSHL_IM bl, 1 ; Double heads 242 242 inc cx ; Increment bit shift count 243 243 mov dl, TRANSLATEMODE_LARGE … … 300 300 cmp ax, cx 301 301 jbe SHORT .NumberOfHeadsNowInCX 302 shl cx, 1 ; Double number of heads 303 test ch, ch ; Reached 256 heads? 304 jz SHORT .CompareNextValidNumberOfHeads 305 dec cx ; If so, limit heads to 255 302 eSHL_IM cl, 1 ; Double number of heads 303 jnz SHORT .CompareNextValidNumberOfHeads ; Reached 256 heads? 304 dec cl ; If so, limit heads to 255 306 305 .NumberOfHeadsNowInCX: 307 306 mov bx, cx ; Number of heads are returned in BL -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r422 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 145 145 146 146 ; Compare user defined and ATA-ID sector count and select smaller 147 xor dx, dx148 x chg bx, dx ; User defined LBA now in BX:DX:AX147 mov dx, bx 148 xor bx, bx ; User defined LBA now in BX:DX:AX 149 149 cmp bx, [di+DPT.twLbaSectors+4] 150 150 jb SHORT .StoreUserDefinedSectorCountToDPT -
trunk/XTIDE_Universal_BIOS/makefile
r421 r445 1 ################################################################################################## 2 # Makefile to build XTIDE Universal BIOS. #3 # #4 # Valid makefile targets are: #5 # all Removes existing files and builds binary files in \Build #6 # small Builds 8 kiB binaries only (without checksum) #7 # large Builds 15 kiB binaries only (without checksum) #8 # clean Removes all files from \Build #9 # checksum* Builds all and then generates checksum byte to all binary files #10 # strings* Compress src\Strings.asm to src\StringsCompressed.asm #11 # #12 # * at the end of target name means that Perl is required for the job. #13 # Build directory must be created manually if it does not exist. #14 # #15 # #16 # Following modules can be included or excluded: #17 # MODULE_8BIT_IDE 18 # MODULE_JRIDE Support for JR-IDE/ISA #19 # MODULE_ADVANCED_ATA Native support for some VLB IDE controllers #20 # MODULE_BOOT_MENU Boot Menu for selection of drive to boot from #21 # MODULE_EBIOS Enhanced functions for accessing drives over 8.4 GB #22 # MODULE_HOTKEYS Hotkey Bar to boot from any drive #23 # MODULE_IRQ 24 # MODULE_SERIAL Virtual hard disks using serial port #25 # MODULE_SERIAL_FLOPPY Virtual floppy drives using serial port (requires MODULE_SERIAL) #26 # MODULE_STRINGS_COMPRESSED Use compressed strings to save space #27 # MODULE_FEATURE_SETS Power Management support #28 # #29 # Not modules but these affect the assembly: #30 # ELIMINATE_CGA_SNOW Prevents CGA snowing at the cost of a few bytes #31 # RELOCATE_INT13H_STACK Relocates INT 13h stack to top of stolen conventional memory #32 # RESERVE_DIAGNOSTIC_CYLINDER Reserve one L-CHS cylinder for compatibility with old BIOSes #33 # USE_186 Use instructions supported by 80188/80186 and V20/V30 and later #34 # USE_286 Use instructions supported by 286 and later #35 # USE_386 Use instructions supported by 386 and later #36 # USE_AT Use features supported on AT and later systems (not available on XT) #37 # #38 ################################################################################################## 1 #################################################################################################### 2 # Makefile to build XTIDE Universal BIOS. # 3 # # 4 # Valid makefile targets are: # 5 # all Removes existing files and builds binary files in \Build # 6 # small Builds 8 kiB binaries only (without checksum) # 7 # large Builds 15 kiB binaries only (without checksum) # 8 # clean Removes all files from \Build # 9 # checksum* Builds all and then generates checksum byte to all binary files # 10 # strings* Compress src\Strings.asm to src\StringsCompressed.asm # 11 # # 12 # * at the end of target name means that Perl is required for the job. # 13 # Build directory must be created manually if it does not exist. # 14 # # 15 # # 16 # Following modules can be included or excluded: # 17 # MODULE_8BIT_IDE Support for 8-BIT IDE cards like XTIDE # 18 # MODULE_JRIDE Support for JR-IDE/ISA # 19 # MODULE_ADVANCED_ATA Native support for some VLB IDE controllers # 20 # MODULE_BOOT_MENU Boot Menu for selection of drive to boot from # 21 # MODULE_EBIOS Enhanced functions for accessing drives over 8.4 GB # 22 # MODULE_HOTKEYS Hotkey Bar to boot from any drive # 23 # MODULE_IRQ IDE IRQ support # 24 # MODULE_SERIAL Virtual hard disks using serial port # 25 # MODULE_SERIAL_FLOPPY Virtual floppy drives using serial port (requires MODULE_SERIAL) # 26 # MODULE_STRINGS_COMPRESSED Use compressed strings to save space # 27 # MODULE_FEATURE_SETS Power Management support # 28 # # 29 # Not modules but these affect the assembly: # 30 # ELIMINATE_CGA_SNOW Prevents CGA snowing at the cost of a few bytes # 31 # RELOCATE_INT13H_STACK Relocates INT 13h stack to top of stolen conventional memory # 32 # RESERVE_DIAGNOSTIC_CYLINDER Reserve one L-CHS cylinder for compatibility with old BIOSes # 33 # USE_186 Use instructions supported by 80188/80186 and V20/V30 and later # 34 # USE_286 Use instructions supported by 286 and later # 35 # USE_386 Use instructions supported by 386 and later # 36 # USE_AT Use features supported on AT and later systems (not available on XT) # 37 # # 38 #################################################################################################### 39 39 40 40 ########################################### -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r376 r445 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 219 219 cmp ax,[si] 220 220 jz .found 221 inc bx 222 inc bx 221 223 inc si 222 224 inc si 223 inc bx224 inc bx225 225 cmp word [bx],0 226 226 jnz .wordLoop
Note:
See TracChangeset
for help on using the changeset viewer.