Changeset 601 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/Serial
- Timestamp:
- Feb 14, 2019, 7:38:08 PM (6 years ago)
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device/Serial
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
r567 r601 43 43 ALIGN JUMP_ALIGN 44 44 SerialCommand_OutputWithParameters: 45 mov ah, SerialServer_Command_Read 46 mov al, [bp+IDEPACK.bCommand] 45 47 46 mov ah,SerialServer_Command_Read 47 48 mov al,[bp+IDEPACK.bCommand] 49 50 cmp al,20h ; Read Sectors IDE command 51 jz .readOrWrite 52 inc ah ; now SerialServer_Protocol_Write 53 cmp al,30h ; Write Sectors IDE command 54 jz .readOrWrite 48 cmp al, 20h ; Read Sectors IDE command 49 je SHORT .readOrWrite 50 inc ah ; now SerialServer_Protocol_Write 51 cmp al, 30h ; Write Sectors IDE command 52 je SHORT .readOrWrite 55 53 56 54 ; all other commands return success 57 55 ; including function 0ech which should return drive information, this is handled with the identify functions 58 56 ; 59 xor ah,ah; also clears carry60 57 xor ah, ah ; also clears carry 58 ret 61 59 62 60 .readOrWrite: 63 mov [bp+IDEPACK.bFeatures],ah ; store protocol command61 mov [bp+IDEPACK.bFeatures], ah ; store protocol command 64 62 %ifdef USE_AT 65 63 mov dh, [bp+IDEPACK.bSectorCount] 66 64 %endif 67 65 call IdeTransfer_NormalizePointerInESSI 68 66 %ifdef USE_AT 69 70 xor cx, cx; Nothing transferred71 72 67 jnc SHORT .PointerNormalizationWasSuccessful 68 xor cx, cx ; Nothing transferred 69 stc 70 ret 73 71 .PointerNormalizationWasSuccessful: 74 72 %endif 75 73 76 mov dx, [di+DPT_SERIAL.wSerialPortAndBaud] 77 74 mov dx, [di+DPT_SERIAL.wSerialPortAndBaud] 78 75 ; fall through to SerialCommand_FallThroughToSerialServer_SendReceive 79 76 80 77 ALIGN JUMP_ALIGN 81 78 SerialCommand_FallThroughToSerialServer_SendReceive: 82 83 79 ; fall through to SerialServer_SendReceive 84 85 80 %include "SerialServer.asm" 86 81 … … 93 88 ALIGN JUMP_ALIGN 94 89 SerialCommand_ReturnError: 95 96 90 stc 91 ret 97 92 98 93 ;-------------------------------------------------------------------- … … 155 150 ; master scan. 156 151 ; 157 mov dx,[cs:bp+IDEVARS.wSerialPortAndBaud]158 xor ax,ax152 mov dx, [cs:bp+IDEVARS.wSerialPortAndBaud] 153 xor ax, ax 159 154 160 161 162 155 push si 156 call FindDPT_ToDSDIforSerialDevice 157 pop si 163 158 %ifdef MODULE_SERIAL_FLOPPY 164 jnc.founddpt159 jnc SHORT .founddpt 165 160 ; 166 161 ; If not found above with FindDPT_ToDSDIforSerialDevice, DI will point to the DPT after the last hard disk DPT 167 162 ; So, if there was a previously found floppy disk, DI will point to that DPT and we use that value for the slave. 168 163 ; 169 cmp byte[RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0170 jz.notfounddpt164 cmp BYTE [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], 0 165 je SHORT .notfounddpt 171 166 .founddpt: 172 167 %else 173 jc.notfounddpt168 jc SHORT .notfounddpt 174 169 %endif 175 170 mov ax, [di+DPT_SERIAL.wSerialPortAndBaud] 176 171 .notfounddpt: 172 test bh, FLG_DRVNHEAD_DRV 173 jz SHORT .master 177 174 178 test bh, FLG_DRVNHEAD_DRV 179 jz .master 180 181 test ax,ax ; Take care of the case that is different between master and slave. 182 jz SerialCommand_ReturnError 175 test ax, ax ; Take care of the case that is different between master and slave. 176 jz SHORT SerialCommand_ReturnError 183 177 184 178 ; fall-through 185 179 .master: 186 test dx,dx187 jnz.identifyDeviceInDX180 test dx, dx 181 jnz SHORT .identifyDeviceInDX 188 182 189 xchg dx, ax; move ax to dx (move previously found serial drive to dx, could be zero)183 xchg dx, ax ; move ax to dx (move previously found serial drive to dx, could be zero) 190 184 191 185 .identifyDeviceInDX: 192 193 186 ; fall through to SerialCommand_FallThroughToSerialServerScan_ScanForServer 194 187 195 188 ALIGN JUMP_ALIGN 196 189 SerialCommand_FallThroughToSerialServerScan_ScanForServer: 197 198 190 ; fall through to SerialServerScan_ScanForServer 199 200 191 %include "SerialServerScan.asm" 201 192 … … 206 197 %endif 207 198 208 -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
r567 r601 33 33 ;-------------------------------------------------------------------- 34 34 SerialDPT_Finalize: 35 36 35 mov ax, [es:si+SerialServer_ATA_wPortAndBaud] 36 mov [di+DPT_SERIAL.wSerialPortAndBaud], ax 37 37 38 38 ; … … 41 41 ; if the floppy support is disabled. 42 42 ; 43 mov al, [es:si+SerialServer_ATA_wDriveFlags] 44 eSHL_IM al, 1 45 mov byte [di+DPT.bFlagsHigh], al 46 47 ret 43 mov al, [es:si+SerialServer_ATA_wDriveFlags] 44 eSHL_IM al, 1 45 mov BYTE [di+DPT.bFlagsHigh], al 46 ret 48 47 49 48 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
Note:
See TracChangeset
for help on using the changeset viewer.