Changeset 223 in xtideuniversalbios
- Timestamp:
- Jan 25, 2012, 8:20:06 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Emulate.inc
r181 r223 370 370 371 371 ;-------------------------------------------------------------------- 372 ; Segment override prefix instruction.373 ;374 ; eSEG375 ; Parameters:376 ; %1: Name of the segment (ES, CS, SS, DS, FS or GS)377 ; Returns:378 ; Nothing379 ; Corrupts registers:380 ; Nothing381 ;--------------------------------------------------------------------382 %macro eSEG 1383 %ifidni %1, es384 db 00100110b385 %elifidni %1, cs386 db 00101110b387 %elifidni %1, ss388 db 00110110b389 %elifidni %1, ds390 db 00111110b391 %elifidni %1, fs392 db 01100100b393 %elifidni %1, gs394 db 01100101b395 %else396 %error "Invalid segment override passed to eSEG!"397 %endif398 %endmacro399 400 401 ;--------------------------------------------------------------------402 372 ; Repeats string instruction with segment override. 403 373 ; This macro prevents 8088/8086 restart bug. … … 416 386 %macro eSEG_STR 3 417 387 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix 418 419 420 eSEG %2; SEG is the prefix that won't be lost421 422 423 424 388 %%Loop: 389 %1 ; REP is the prefix that can be lost 390 %2 ; SEG is the prefix that won't be lost 391 %3 ; String instruction 392 jcxz %%End ; Jump to end if no repeats left (preserves FLAGS) 393 jmp SHORT %%Loop ; Loop while repeats left 394 %%End: 425 395 %else ; No bug on V20/V30 and later, don't know about 188/186 426 eSEG%2427 %1 396 %2 397 %1 %3 428 398 %endif 429 399 %endmacro -
trunk/Assembly_Library/Src/Display/CgaSnow.asm
r162 r223 99 99 cli ; Interrupt request would mess up timing 100 100 WAIT_UNTIL_SAFE_CGA_WRITE 101 eSEG es 102 movsb 101 es movsb 103 102 sti 104 103 loop .MovsbNextByte -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r184 r223 92 92 ALIGN JUMP_ALIGN 93 93 ReadCharacterAndTestForNull: 94 eSEG cs 95 lodsb ; Load from CS:SI to AL 94 cs lodsb ; Load from CS:SI to AL 96 95 test al, al ; NULL to end string? 97 96 ret … … 321 320 %endif 322 321 323 ALIGN JUMP_ALIGN 322 ALIGN JUMP_ALIGN 324 323 u_FormatUnsignedDecimalWord: 325 324 mov ax, [bp] … … 339 338 mov ax, [bp] 340 339 test ax,ax 341 jnz u_FormatUnsignedDecimalWord 340 jnz u_FormatUnsignedDecimalWord 342 341 mov [bp], word g_szDashForZero 343 342 ;;; fall-through 344 343 345 344 ALIGN JUMP_ALIGN 346 345 s_FormatStringFromSegmentCS: -
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r202 r223 157 157 158 158 .decode: 159 eSEG cs 160 lodsb ; load next byte of the string 159 cs lodsb ; load next byte of the string 161 160 162 161 mov ch,al ; save a copy for later processing of high order bits -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r194 r223 5 5 SECTION .text 6 6 7 7 8 8 ;-------------------------------------------------------------------- 9 9 ; Supports following formatting types: … … 104 104 ; AX, DX 105 105 ;-------------------------------------------------------------------- 106 106 107 107 %ifndef MODULE_STRINGS_COMPRESSED 108 108 109 109 ALIGN JUMP_ALIGN 110 110 DisplayPrint_WordFromAXWithBaseInBX: … … 126 126 .PrintNextDigit: 127 127 pop ax ; Pop digit 128 eSEG cs 129 xlatb 128 cs xlatb 130 129 call DisplayPrint_CharacterFromAL 131 130 loop .PrintNextDigit … … 152 151 ;-------------------------------------------------------------------- 153 152 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 154 155 153 ALIGN JUMP_ALIGN 156 154 DisplayPrint_CharacterBufferFromBXSIwithLengthInCX: … … 167 165 loop .PrintNextCharacter 168 166 169 ;mov ds, cx ; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS.170 167 pop cx 171 168 pop si … … 173 170 ret 174 171 %endif 175 176 177 172 178 173 … … 278 273 pop cx 279 274 .NothingToRepeat: 280 281 ret 275 ret 276 282 277 283 278 ;-------------------------------------------------------------------- … … 292 287 ; AX, DX 293 288 ;-------------------------------------------------------------------- 294 295 289 %ifndef MODULE_STRINGS_COMPRESSED 296 290 ;;; 297 291 ;;; Take care when using this routine with compressed strings (which is why it is disabled). 298 292 ;;; All strings in CSSI should go through the DisplayFormatCompressed code to be decoded. 299 ;;; 293 ;;; 300 294 ALIGN JUMP_ALIGN 301 295 DisplayPrint_NullTerminatedStringFromCSSI: … … 304 298 call DisplayPrint_NullTerminatedStringFromBXSI 305 299 pop bx 306 307 ret 308 %endif 309 310 300 ret 301 %endif 311 302 312 303 … … 314 305 ;;; Note that the following routines need to be at the bottom of this file 315 306 ;;; to accomodate short jumps from the next file (DisplayFormat/DisplayFormatCompressed) 316 ;;; 307 ;;; 317 308 318 309 ;-------------------------------------------------------------------- … … 329 320 ALIGN JUMP_ALIGN 330 321 DisplayPrint_Newline_FormatAdjustBP: 331 inc bp ; we didn't need a parameter after all, readjust BP 322 inc bp ; we didn't need a parameter after all, readjust BP 332 323 inc bp 333 324 ; fall through to DisplayPrint_Newline … … 335 326 336 327 ALIGN JUMP_ALIGN 337 338 328 DisplayPrint_Newline: 339 329 mov al, LF … … 364 354 365 355 366 367 356 ;-------------------------------------------------------------------- 368 357 ; DisplayPrint_NullTerminatedStringFromBXSI … … 396 385 pop cx 397 386 pop si 398 399 DisplayPrint_Ret: ; random ret to jump to 400 ret 401 402 387 388 DisplayPrint_Ret: ; random ret to jump to 389 ret 390 -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r116 r223 68 68 add si, .rgcColorAttributes 69 69 .LoadAttributeAndReturn: 70 eSEG cs 71 lodsb ; Load from [CS:SI] to AL 70 cs lodsb ; Load from [CS:SI] to AL 72 71 73 72 pop ds -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r194 r223 22 22 ; AX, BX, CX, DX, SI, DI 23 23 ;-------------------------------------------------------------------- 24 ALIGN JUMP_ALIGN 24 ALIGN JUMP_ALIGN 25 25 MenuBorders_RefreshAll: 26 %ifndef USE_186 26 27 call MenuBorders_AdjustDisplayContextForDrawingBorders 27 28 call MenuBorders_GetNumberOfMiddleCharactersToDX … … 31 32 call DrawBottomBorderLine 32 33 jmp DrawBottomShadowLine 34 %else 35 push DrawBottomShadowLine 36 push DrawBottomBorderLine 37 push RefreshInformationBorders 38 push RefreshItemBorders 39 push RefreshTitleBorders 40 push MenuBorders_GetNumberOfMiddleCharactersToDX 41 jmp MenuBorders_AdjustDisplayContextForDrawingBorders 42 %endif 33 43 34 44 … … 71 81 %endif 72 82 73 83 74 84 ;-------------------------------------------------------------------- 75 85 ; MenuBorders_AdjustDisplayContextForDrawingBorders … … 315 325 ALIGN JUMP_ALIGN 316 326 PrintBorderCharactersFromCSSI: 317 eSEG cs 318 lodsb ; Load from [cs:si+BORDER_CHARS.cLeft] to AL 327 cs lodsb ; Load from [cs:si+BORDER_CHARS.cLeft] to AL 319 328 call MenuBorders_PrintSingleBorderCharacterFromAL 320 329 321 eSEG cs 322 lodsb ; Load from [cs:si+BORDER_CHARS.cMiddle] to AL 330 cs lodsb ; Load from [cs:si+BORDER_CHARS.cMiddle] to AL 323 331 call MenuBorders_PrintMultipleBorderCharactersFromAL 324 332 325 eSEG cs 326 lodsb ; Load from [cs:si+BORDER_CHARS.cRight] to AL 333 cs lodsb ; Load from [cs:si+BORDER_CHARS.cRight] to AL 327 334 ; Fall to MenuBorders_PrintSingleBorderCharacterFromAL 328 335 -
trunk/Configurator/Inc/emulate.inc
r162 r223 305 305 306 306 ;-------------------------------------------------------------------- 307 ; Segment override prefix instruction.308 ;309 ; eSEG310 ; Parameters:311 ; %1: Name of the segment (ES, CS, SS, DS, FS or GS)312 ; Returns:313 ; Nothing314 ; Corrupts registers:315 ; Nothing316 ;--------------------------------------------------------------------317 %macro eSEG 1318 %ifidni %1, es319 db 00100110b320 %elifidni %1, cs321 db 00101110b322 %elifidni %1, ss323 db 00110110b324 %elifidni %1, ds325 db 00111110b326 %elifidni %1, fs327 db 01100100b328 %elifidni %1, gs329 db 01100101b330 %else331 %error "Invalid segment override passed to eSEG!"332 %endif333 %endmacro334 335 336 ;--------------------------------------------------------------------337 307 ; Repeats string instruction with segment override. 338 308 ; This macro prevents 8088/8086 restart bug. … … 351 321 %macro eSEG_STR 3 352 322 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix 353 354 355 eSEG %2; SEG is the prefix that won't be lost356 357 358 359 323 %%Loop: 324 %1 ; REP is the prefix that can be lost 325 %2 ; SEG is the prefix that won't be lost 326 %3 ; String instruction 327 jcxz %%End ; Jump to end if no repeats left (preserves FLAGS) 328 jmp SHORT %%Loop ; Loop while repeats left 329 %%End: 360 330 %else ; No bug on V20/V30 and later, don't know about 188/186 361 eSEG%2362 %1 331 %2 332 %1 %3 363 333 %endif 364 334 %endmacro -
trunk/Serial_Server/library/Library.h
r219 r223 22 22 23 23 virtual void writeSector( void *buff ) = 0; 24 24 25 25 virtual void readSector( void *buff ) = 0; 26 26 … … 35 35 36 36 unsigned long totallba; 37 37 38 38 char *shortFileName; 39 39 int readOnly; … … 58 58 #include "../win32/win32serial.h" 59 59 #else 60 // there is no standard way to read/write and configure the serial port, OS specif c only60 // there is no standard way to read/write and configure the serial port, OS specific only 61 61 #endif 62 62 -
trunk/Serial_Server/makefile
r219 r223 7 7 # Use with GNU Make and Microsoft Visual C++ 2010 8 8 # 9 # Also works with Open Watcom C/C++ Version 1.9 10 # 9 11 10 12 CL = cl … … 14 16 15 17 build/serdrive.exe: $(WIN32OBJS) 16 $(CL) /Febuild/serdrive.exe $(WIN32OBJS)18 @$(CL) /Febuild/serdrive.exe $(WIN32OBJS) 17 19 18 20 build/%.obj: win32/%.cpp 19 $(CL) /c $(CLFLAGS) $< /Fo$@21 @$(CL) /c $(CLFLAGS) $< /Fo$@ 20 22 21 23 build/%.obj: library/%.cpp 22 $(CL) /c $(CLFLAGS) $< /Fo$@24 @$(CL) /c $(CLFLAGS) $< /Fo$@ 23 25 24 26 $(WIN32OBJS): library/library.h win32/win32file.h win32/win32serial.h library/file.h library/flatimage.h 25 27 26 28 build/checksum_test.exe: library/checksum.cpp 27 $(CL) /Febuild/checksum_test.exe /Ox library/checksum.cpp /Fobuild/checksum_test.obj -D CHECKSUM_TEST29 @$(CL) /Febuild/checksum_test.exe /Ox library/checksum.cpp /Fobuild/checksum_test.obj -D CHECKSUM_TEST 28 30 29 clean: 30 del /q build\*.* 31 release: build/serdrive.exe 32 @echo Compressing with UPX... 33 @upx -qq --ultra-brute build/serdrive.exe 34 @echo Done! 31 35 36 clean: 37 @del /q build\*.* -
trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc
r221 r223 41 41 .bSize resb 1 ; 0, Size of this packet in bytes 42 42 .bReservedAt1 resb 1 ; 1, Currently unused, must be zero 43 .wSectorCount resb 1; 2, Number of sectors to process (0...127)43 .wSectorCount resb 2 ; 2, Number of sectors to process (0...127) 44 44 .dwMemoryAddress: 45 45 .wOffset resb 2 ; 4, Memory offset for transfer -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r218 r223 8 8 .wWordsLeft resb 2 ; 2, WORDs left to transfer 9 9 .wWordsDone resb 2 ; 4, Number of sectors xferred 10 resb 1 ; 6, 10 resb 1 ; 6, 11 11 resb 1 ; 7, IDEPACK.bDeviceControl 12 12 .wDataPort resb 2 ; 8, IDE Data Port … … 327 327 %ifdef USE_186 ; OUTS instruction available 328 328 shl cx, 1 ; WORD count to BYTE count 329 e SEG es; Source is ES segment329 es ; Source is ES segment 330 330 rep outsb 331 331 %else ; If 8088/8086 … … 369 369 ALIGN JUMP_ALIGN 370 370 WordWrite: 371 e SEG es; Source is ES segment371 es ; Source is ES segment 372 372 rep 373 373 db 6Fh ; OUTSW (we want this in XT build) … … 377 377 DWordWrite: 378 378 shr cx, 1 ; WORD count to DWORD count 379 e SEG es; Source is ES segment379 es ; Source is ES segment 380 380 rep 381 381 db 66h ; Override operand size to 32-bit -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
r220 r223 151 151 ; 152 152 mov bl,dl ; setup BL with proper values for read/write loops (BH comes later) 153 153 154 154 mov al,83h 155 155 add dl,SerialCommand_UART_lineControl … … 202 202 mov cx,4 ; writing 3 words (plus 1) 203 203 204 cli ; interrupts off... 204 cli ; interrupts off... 205 205 206 206 call SerialCommand_WriteProtocol.entry … … 215 215 ;;; more than 128 sectors (and for 128 specifically, the pointer must be segment aligned). 216 216 ;;; See comments below at the point this entry point was called for more details... 217 .nextSectorNormalize: 217 .nextSectorNormalize: 218 218 call Registers_NormalizeESDI 219 219 %endif 220 220 221 221 pop ax ; load command byte (done before call to .nextSector on subsequent iterations) 222 222 push ax … … 249 249 .readTimeout: 250 250 push ax ; not only does this push preserve AX (which we need), but it also 251 ; means the stack has the same number of bytes on it as when we are 251 ; means the stack has the same number of bytes on it as when we are 252 252 ; sending a packet, important for error cleanup and exit 253 253 mov ah,1 … … 256 256 test dl,1 257 257 jz .readByte1Ready 258 jmp .readByte2Ready 258 jmp .readByte2Ready 259 259 260 260 ;---------------------------------------------------------------------------- … … 275 275 adc si, 0 276 276 277 .readEntry: 277 .readEntry: 278 278 mov dl,bh 279 279 in al,dx … … 325 325 326 326 pop ax ; sector count and command byte 327 dec al ; decreme mnt sector count327 dec al ; decrement sector count 328 328 push ax ; save 329 329 jz SerialCommand_OutputWithParameters_ReturnCodeInALCF ; CF=0 from "cmp ax,bp" returning Zero above … … 336 336 ;;; This code is no longer needed as we do not support more than 128 sectors, and for 128 the pointer 337 337 ;;; must be segment aligned. If we ever do want to support more sectors, the code can help... 338 338 339 339 ; 340 340 ; Normalize buffer pointer for next go round, if needed. 341 341 ; 342 ; We need to re-no mrlize the pointer in ES:DI after processing every 7f sectors. That number could342 ; We need to re-normalize the pointer in ES:DI after processing every 7f sectors. That number could 343 343 ; have been 80 if we knew the offset was on a segment boundary, but this may not be the case. 344 344 ; … … 347 347 ; b) on transitions from FF to FE, very rare case for writing 255 or 256 sectors 348 348 ; c) on transitions from 80 to 7F, a large read/write 349 ; d) on transitions from 00 to FF, very, very rare case of writing 256 sec otrs350 ; We don't need to renormalize in this case, but it isn't worth the memory/effort to not do 349 ; d) on transitions from 00 to FF, very, very rare case of writing 256 sectors 350 ; We don't need to renormalize in this case, but it isn't worth the memory/effort to not do 351 351 ; the extra work, and it does no harm. 352 352 ; … … 354 354 ; for more than 127 sectors. Back in the day, it appears that some BIOS could not support more than 127 355 355 ; sectors, so that may be the practical limit for OS and application developers. The Extended BIOS 356 ; function also appear to be capped at 127 sectors. So although this can support the full 256 sectors 356 ; function also appear to be capped at 127 sectors. So although this can support the full 256 sectors 357 357 ; if needed, we are optimized for that 1-127 range. 358 358 ; … … 373 373 ; (0-7e kicked out before we get here) 374 374 ; 7f moves to 81 and OF=1, so OF=SF 375 ; fe moves to 0 and OF=0, SF=0, so OF=SF 375 ; fe moves to 0 and OF=0, SF=0, so OF=SF 376 376 ; ff moves to 1 and OF=0, SF=0, so OF=SF 377 377 ; 80-fd moves to 82-ff and OF=0, so OF<>SF … … 387 387 388 388 %else 389 390 jmp short .nextSector 391 389 390 jmp short .nextSector 391 392 392 %endif 393 393 … … 425 425 jc .clearBuffer ; note CF from shr above 426 426 427 .clearBufferComplete: 427 .clearBufferComplete: 428 428 stc 429 429 mov al,1 … … 448 448 ; SerialCommand_WriteProtocol 449 449 ; 450 ; NOTE: As with its read counterpart, this loop is very time sensitive. 451 ; Although it will still function, adding additional instructions will 452 ; impact the write throug put, especially on slower machines.450 ; NOTE: As with its read counterpart, this loop is very time sensitive. 451 ; Although it will still function, adding additional instructions will 452 ; impact the write throughput, especially on slower machines. 453 453 ; 454 454 ; Parameters: … … 514 514 mov ah,dl 515 515 jmp .writeByte2Ready 516 516 517 517 .writeTimeout1: 518 %ifndef USE_186 518 519 mov ax,.writeByte1Ready 519 520 push ax ; return address for ret at end of SC_writeTimeout2 521 %else 522 push .writeByte1Ready 523 %endif 520 524 ;;; fall-through 521 525 … … 527 531 ; One entry point fills in AH with 20h for write 528 532 ; DX: Port address (OK if already incremented to UART_lineStatus) 529 ; BX: 533 ; BX: 530 534 ; Stack: 2 words on the stack below the command/count word 531 535 ; Returns: … … 553 557 xor cx,cx 554 558 .readTimeoutLoop: 555 mov dl,bh 559 mov dl,bh 556 560 in al,dx 557 561 test al,ah … … 588 592 ; Returns: 589 593 ; AH: INT 13h Error Code 590 ; NOTE: Not set (or checked) during drive detection 594 ; NOTE: Not set (or checked) during drive detection 591 595 ; CF: Cleared if success, Set if error 592 596 ; Corrupts registers: … … 596 600 SerialCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH: 597 601 ; 598 ; To improve boot time, we do our best to avoid looking for slave serial drives when we already know the results 599 ; from the looking for a master. This is particu arly true when doing a COM port scan, as we will end up running600 ; through all the COM ports and baud rates a second time. 601 ; 602 ; But drive detection isn't the only case - we also need to get the right drive when called on int13h/25h. 602 ; To improve boot time, we do our best to avoid looking for slave serial drives when we already know the results 603 ; from the looking for a master. This is particularly true when doing a COM port scan, as we will end up running 604 ; through all the COM ports and baud rates a second time. 605 ; 606 ; But drive detection isn't the only case - we also need to get the right drive when called on int13h/25h. 603 607 ; 604 608 ; The decision tree: … … 606 610 ; Master: 607 611 ; bSerialPackedPortAndBaud Non-Zero: -> Continue with bSerialPackedAndBaud (1) 608 ; bSerialPackedPortAndBaud Zero: 612 ; bSerialPackedPortAndBaud Zero: 609 613 ; bLastSerial Zero: -> Scan (2) 610 614 ; bLastSerial Non-Zero: -> Continue with bLastSerial (3) 611 ; 615 ; 612 616 ; Slave: 613 ; bSerialPackedPortAndBaud Non-Zero: 617 ; bSerialPackedPortAndBaud Non-Zero: 614 618 ; bLastSerial Zero: -> Error - Not Found (4) 615 619 ; bLastSerial Non-Zero: -> Continue with bSerialPackedAndBaud (5) 616 ; bSerialPackedPortAndBaud Zero: 620 ; bSerialPackedPortAndBaud Zero: 617 621 ; bLastSerial Zero: -> Error - Not Found (4) 618 622 ; bLastSerial Non-Zero: -> Continue with bLastSerial (6) 619 623 ; 620 ; (1) This was a port/baud that was explici lty set with the configurator. In the drive detection case, as this621 ; is the Master, we are checking out a new controller, and so don't care about the value of bLastSerial. 624 ; (1) This was a port/baud that was explicitly set with the configurator. In the drive detection case, as this 625 ; is the Master, we are checking out a new controller, and so don't care about the value of bLastSerial. 622 626 ; And as with the int13h/25h case, we just go off and get the needed information using the user's setting. 623 ; (2) We are using the special .ideVarsSerialAuto struc utre. During drive detection, we would only be here627 ; (2) We are using the special .ideVarsSerialAuto structure. During drive detection, we would only be here 624 628 ; if bLastSerial is zero (since we only scan if no explicit drives are set), so we go off to scan. 625 ; (3) We are using the special .ideVarsSerialAuto struc utre. We won't get here during drive detection, but629 ; (3) We are using the special .ideVarsSerialAuto structure. We won't get here during drive detection, but 626 630 ; we might get here on an int13h/25h call. If we have scanned COM drives, they are the ONLY serial drives 627 631 ; in use, and so bLastSerial will reflect the port/baud setting for the scanned COM drives. 628 ; (4) No master has been found yet, therefore no slave should be found. Avoiding the slave reduces boot time, 632 ; (4) No master has been found yet, therefore no slave should be found. Avoiding the slave reduces boot time, 629 633 ; especially in the full COM port scan case. Note that this is different from the hardware IDE, where we 630 634 ; will scan for a slave even if a master is not present. Note that if ANY master had been previously found, 631 ; we will do the slave scan, which isn't harmful, it just wa tes time. But the most common case (by a wide635 ; we will do the slave scan, which isn't harmful, it just wastes time. But the most common case (by a wide 632 636 ; margin) will be just one serial controller. 633 637 ; (5) A COM port scan for a master had been previously completed, and a drive was found. In a multiple serial 634 ; controller scenario being called with int13h/25h, we need to use the value in bSerialPackedPortAndBaud 638 ; controller scenario being called with int13h/25h, we need to use the value in bSerialPackedPortAndBaud 635 639 ; to make sure we get the proper drive. 636 ; (6) A COM port scan for a master had been previously completed, and a drive was found. We would only get here 637 ; if no serial drive was explicitly set by the user in the configurator or that drive had not been found. 638 ; Instead of performing the full COM port scan for the slave, use the port/baud value stored during the 640 ; (6) A COM port scan for a master had been previously completed, and a drive was found. We would only get here 641 ; if no serial drive was explicitly set by the user in the configurator or that drive had not been found. 642 ; Instead of performing the full COM port scan for the slave, use the port/baud value stored during the 639 643 ; master scan. 640 ; 641 mov dl,[cs:bp+IDEVARS.bSerialPackedPortAndBaud] 644 ; 645 mov dl,[cs:bp+IDEVARS.bSerialPackedPortAndBaud] 642 646 mov al, byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial] 643 647 644 648 test bh, FLG_DRVNHEAD_DRV 645 649 jz .master 646 650 647 test al,al ; Take care of the case that is different between master and slave. 651 test al,al ; Take care of the case that is different between master and slave. 648 652 jz .error ; Because we do this here, the jz after the "or" below will not be taken 649 653 650 654 ; fall-through 651 .master: 655 .master: 652 656 test dl,dl 653 657 jnz .identifyDeviceInDL … … 655 659 or dl,al ; Move bLast into position in dl, as well as test for zero 656 660 jz .scanSerial 657 661 658 662 ; fall-through 659 .identifyDeviceInDL: 663 .identifyDeviceInDL: 660 664 661 665 push bp ; setup fake IDEREGS_AND_INTPACK … … 680 684 681 685 pop bp 682 ; 686 ; 683 687 ; place packed port/baud in RAMVARS, read by FinalizeDPT and DetectDrives 684 688 ; 685 689 ; Note that this will be set during an int13h/25h call as well. Which is OK since it is only used (at the 686 ; top of this routine) for drives found during a COM scan, and we only COM scan if there were no other 690 ; top of this routine) for drives found during a COM scan, and we only COM scan if there were no other 687 691 ; COM drives found. So we will only reaffirm the port/baud for the one COM port/baud that has a drive. 688 ; 692 ; 689 693 jc .notFound ; only store bLastSerial if success 690 694 mov byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial], dl 691 695 692 .notFound: 696 .notFound: 693 697 ret 694 698 … … 715 719 .nextPort: 716 720 inc di ; load next port address 721 xor dh, dh 717 722 mov dl,[cs:di] 718 719 mov dh,0 ; shift from one byte to two 720 eSHL_IM dx, 2 723 eSHL_IM dx, 2 ; shift from one byte to two 721 724 jz .error 722 725 … … 762 765 ret 763 766 764 .error: 767 .error: 765 768 stc 766 769 %if 0
Note:
See TracChangeset
for help on using the changeset viewer.