Changeset 258 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- Feb 22, 2012, 7:01:53 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
r249 r258 37 37 %ifdef MODULE_SERIAL 38 38 Device_FinalizeDPT: 39 TEST_USIGN_DPT_AND_JUMP_IF_SERIAL_DEVICE .FinalizeDptForSerialPortDevice 39 ; needs to check IDEVARS vs. checking the DPT as the serial bit in the DPT is set in the Finalize routine 40 CMP_USING_IDEVARS_IN_CSBP_AND_JUMP_IF DEVICE_SERIAL_PORT, .FinalizeDptForSerialPortDevice 40 41 jmp IdeDPT_Finalize 41 .FinalizeDptForSerialPortDevice: 42 .FinalizeDptForSerialPortDevice: 42 43 jmp SerialDPT_Finalize 43 44 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm
r242 r258 12 12 ; CS:BP: Ptr to IDEVARS for the controller 13 13 ; Returns: 14 ; Nothing14 ; CF: Clear, IDE interface only supports hard disks 15 15 ; Corrupts registers: 16 16 ; AX … … 42 42 ; CS:BP: Ptr to IDEVARS for the controller 43 43 ; Returns: 44 ; Nothing44 ; CF: Always clear, we don't support floppies on the IDE inteface 45 45 ; Corrupts registers: 46 46 ; Nothing … … 52 52 53 53 .EndDPT: 54 clc 54 55 ret -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
r242 r258 56 56 ; Returns: 57 57 ; AH: INT 13h Error Code 58 ; CX: Number of successfully transferred sectors (for transfer commands) 58 59 ; CF: Cleared if success, Set if error 59 60 ; Corrupts registers: … … 309 310 dec al ; decrement sector count 310 311 push ax ; save 311 jz SerialCommand_OutputWithParameters_ReturnCodeInAL CF ; CF=0 from "cmp ax,bp" returning Zero above312 jz SerialCommand_OutputWithParameters_ReturnCodeInAL 312 313 313 314 cli ; interrupts back off for ACK byte to host … … 409 410 410 411 .clearBufferComplete: 411 stc 412 mov al,1 413 414 ALIGN JUMP_ALIGN 415 SerialCommand_OutputWithParameters_ReturnCodeInALCF: 412 mov al, 3 ; error return code and CF (low order bit) 413 414 ALIGN JUMP_ALIGN 415 SerialCommand_OutputWithParameters_ReturnCodeInAL: 416 416 %if 0 417 417 sti ; all paths here will already have interrupts turned back on 418 418 %endif 419 mov ah, al420 421 pop b p ; recover ax (command and count) from stack, throw away419 mov ah, al ; for success, AL will already be zero 420 421 pop bx ; recover "ax" (command and count) from stack 422 422 423 423 pop bp 424 424 pop di 425 425 pop si 426 427 mov ch, 0 428 mov cl,[bp+IDEPACK.bSectorCount] 429 sub cl, bl ; subtract off the number of sectors that remained 430 431 shr ah, 1 ; shift down return code and CF 426 432 427 433 ret … … 632 638 call FindDPT_ToDSDIforSerialDevice 633 639 pop si 640 %ifdef MODULE_SERIAL_FLOPPY 641 jc .founddpt 642 ; 643 ; If not found above with FindDPT_ToDSDIforSerialDevice, DI will point to the DPT after the last hard disk DPT 644 ; 645 cmp byte [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0 646 jz .notfounddpt 647 .founddpt: 648 %else 634 649 jnc .notfounddpt 650 %endif 635 651 mov ax, [di+DPT_SERIAL.wSerialPortAndBaud] 636 652 .notfounddpt: … … 678 694 ; which is read by FinalizeDPT and DetectDrives 679 695 ; 680 mov [es:si+ATA6.w Vendor],dx696 mov [es:si+ATA6.wSerialPortAndBaud],dx 681 697 682 698 .notFound: -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
r242 r258 11 11 ; ES:SI: Ptr to 512-byte ATA information read from the drive 12 12 ; Returns: 13 ; Nothing 13 ; CF: Set, indicates that this is a floppy disk 14 ; Clear, indicates that this is a hard disk 14 15 ; Corrupts registers: 15 16 ; AX 16 17 ;-------------------------------------------------------------------- 17 18 SerialDPT_Finalize: 18 or byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 19 mov ax, [es:si+ATA6.wVendor] 19 mov ax, [es:si+ATA6.wSerialPortAndBaud] 20 20 mov [di+DPT_SERIAL.wSerialPortAndBaud], ax 21 22 ; 23 ; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY. It is important to 24 ; detect floppy disks presented by the server and not treat them like hard disks, even 25 ; if the floppy support is disabled. 26 ; 27 mov al, [es:si+ATA6.wSerialFloppyFlagAndType] 28 or al, FLGH_DPT_SERIAL_DEVICE 29 or byte [di+DPT.bFlagsHigh], al 30 31 test al, FLGH_DPT_SERIAL_FLOPPY ; clears CF 32 jz .notfloppy 33 stc 34 .notfloppy: 35 21 36 ret 22 37
Note:
See TracChangeset
for help on using the changeset viewer.