Arduino Uno R3 as a true ISP programmer for any AVR

I made the change "static SerialRelay RelaySerial( 12, 14 );" -> "static SerialRelay RelaySerial( 12, 11 );"

TinyISP works now as a full TX, RX relay between my target Atmega328p and Serial Monitor Window. No supplemental connections are needed any more. Programming and debugging is done on the same (SPI) wires.

This is the test code:

'Test Bascom code that transform target Atmega328p in a character
'receiver/transmitter

'Any character sent from Arduino 1.0.1 Serial Monitor comes
'back and is displayed by the same Monitor.
'Arduino Uno R3 board, running TinyISP programmer/debugger, works as a relay
'between target Atmega328p (the controller that runs this Bascom code) and
'Serial Monitor Window on the PC.
'Target Atmega328p Port B, Pin 4 (MISO) works as software TX while
'Port B, Pin 3 (MOSI) is software RX
'By using software TX, RX, the same wiring configuration (SPI) used for
'programming target Atmega328p is also utilized for debugging and/or
'bidirectional data comunication between the PC and target Atmega328p.

$regfile = "m328pdef.dat"
$crystal = 16000000
$baud = 9600

Dim B As Byte
Waitms 100

'Open a TRANSMIT channel for output

Open "comb.4:9600,8,n,1" For Output As #1
Print #1 , "serial output"

'Now open a RECEIVE channel for input

Open "comb.3:9600,8,n,1" For Input As #2

'Since there is no relation between the input and output pin
'there is NO ECHO while keys are typed

Print #1 , "Press any alpha numerical key"

'With INKEY() we can check if there is data available
'To use it with the software UART you must provide the channel

Do

   'Store in byte

   B = Inkey(#2)

   'When the value > 0 we got something

   If B > 0 Then
      Print #1 , Chr(b)                                     'Print the character
   End If

Loop

Close #2                                                    'Close the channels
Close #1

End

And this is the output I get in the Serial Monitor when I send characters f g h to the target Atmega328p.

--- Monitor starting ---
f
g
h

--- Monitor stopped ---

It looks like Arduino Uno R3 can be used as a true programmer/debugger now!