Use standard cable: 2 <=> 15 3 <=> 13 4 <=> 12 5 <=> 10 6 <=> 11 Parallel cable I made: USB white 2 15 USB green 3 13 USB black 4 12 USB red 5 10 brown 17 18 19 21 22 23 25 17 18 19 21 22 23 25 brown/white 15 2 green 6 11 green/white 13 3 orange 11 6 orange/white 10 5 blue 17 18 19 21 22 23 25 17 18 19 21 22 23 25 blue/white 12 4 PLIP uses Ack (pin 10) to indicate nybble However, we can get better performance by using Error (pin 15) to indicate nybble. Host to 8088: 8088 host bit line pin pin line bit 0 On-line 13 3 Data bit 1 1 1 Out-of-paper 12 4 Data bit 2 2 2 Acknowledge 10 5 Data bit 3 3 3 Busy 11 6 Data bit 4 4 N Error 15 2 Data bit 0 0 8088 to host: 0 Data bit 0 2 15 Error (3) 1 Data bit 1 3 13 On-line (4) 2 Data bit 2 4 12 Out-of-paper (5) 3 Data bit 3 5 10 Acknowledge (6) N Data bit 4 6 11 Busy (7) Arbitrary choice: N=0 initially Switch to N=1: Low nybble available/low nybble received Switch to N=0: High nybble available/high nybble received ;Transmit routine: ; Input: ; DS:SI = buffer ; CX = number of bytes ; DX = parallel port address (0278, 0378, 03BC...) transmitParallel: lodsb ; 1 1 8 12 mov ah,al ; 2 0 8 2 or al,010 ; 2 0 8 4 out dx,al ; 1 1 8 8 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 inc dx ; 1 0 4 2 waitForLowNybbleReceived: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jz waitForLowNybbleReceived ; 2 0 8 4 mov al,ah ; 2 0 8 2 dec dx ; 1 0 4 2 out dx,al ; 1 1 8 8 inc dx ; 1 0 4 2 waitForHighNybbleReceived: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jnz waitForHighNybbleReceived ; 2 0 8 4 dec dx ; 1 0 4 2 loop transmitParallel ; 2 0 8 17 ret ; 152 cycles per byte minimum = 29655 bytes/sec ;Receive routine: ; Input: ; ES:DI = buffer ; CX = number of bytes ; DX = parallel port address (0278, 0378, 03BC...) receiveParallel: inc dx ; 1 0 4 2 waitForLowNybbleAvailable: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jz waitForLowNybbleAvailable ; 2 0 8 4 in al,dx ; 1 1 8 8 mov ah,al ; 2 0 8 2 mov al,010 ; 2 0 8 4 dec dx ; 1 0 4 2 out dx,al ; 1 1 8 8 inc dx ; 1 0 4 2 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 shr ah,1 ; 2 0 8 2 waitForHighNybbleAvailable: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jnz waitForHighNybbleAvailable ; 2 0 8 4 in al,dx ; 1 1 8 8 and al,0f0 ; 2 0 8 4 or al,ah ; 2 0 8 3 stosb ; 1 1 8 11 dec dx ; 1 0 4 2 mov al,0 ; 2 0 8 4 out dx,al ; 1 1 8 8 loop receiveParallel ; 2 0 8 17 ret ; 184 cycles per byte minimum = 24498 bytes/sec ;Transmit and receive simultaneously routine: ; Input: ; DS:SI = transmit buffer ; ES:DI = receive buffer ; CX = number of bytes ; DX = parallel port address (0278, 0378, 03BC...) transmitReceiveParallel: lodsb ; byte to send ; 1 1 8 12 mov bl,al ; 2 0 8 2 or al,010 ; 2 0 8 4 out dx,al ; send low nybble and set N=1 (low nybble available/low nybble received) ; 1 1 8 8 shr bx,1 ; 2 0 8 2 shr bx,1 ; 2 0 8 2 shr bx,1 ; 2 0 8 2 shr bx,1 ; shift right incoming high nybble and outgoing low nybble ; 2 0 8 2 inc dx ; dx = status port ; 1 0 4 2 waitForHighNybble: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jnz waitForHighNybble ; 2 0 8 4 in al,dx ; receive high nybble ; 1 1 8 8 and al,0f0 ; 2 0 8 4 or al,bh ; 2 0 8 3 stosb ; 1 1 8 11 mov al,bl ; 2 0 8 2 and al,0f ; 2 0 8 4 dec dx ; dx = data port ; 1 0 4 2 out dx,al ; send high nybble and set N=0 (high nybble available/high nybble received) ; 1 1 8 8 inc dx ; dx = status port ; 1 0 4 2 waitForLowNybble: in al,dx ; 1 1 8 8 test al,8 ; 2 0 8 4 jz waitForLowNybble ; 2 0 8 4 in al,dx ; receive low nybble ; 1 1 8 8 dec dx ; dx = data port ; 1 0 4 2 mov bh,al ; 2 0 8 2 loop transmitReceiveParallel ; 2 0 8 17 ; 208 cycles per byte minimum = 21671 bytes/sec