I have just received my new clone and it works very nicely. I have successfully written some small machine code programs, connected up to a PC working as a terminal, loaded disk basic and 'printed' to the second serial port using LPRINT.
However, I would like to use the second serial port to receive data in a BASIC program and I understand that I can use the INP command to do this. I know that this will be slow but I can arrange for bytes to be sent as slowly as necessary. My problem is that I can't get it to work at all and the manual doesn't give much detail on the subject.
Using the monitor I can see that my serial ports are configured as follows:
1 2SIO 020,021 9600
2 2SIO 022,023 9600
3 SIO 006,007 300
In BASIC, if I use an OUT command like this:
10 OUT 3,65
...I get an 'A' coming out of the second serial port at 9600 baud. However, if I put an 'A' into the second serial port at 9600 baud while running something like this:
10 A=INP(3)
20 PRINT A,
30 GOTO 10
...i just see the number 13 over and over again. I would have expected to see at least one 65.
My questions are:
1. Why is the OUT command sending characters to the 2nd serial port when I specify a port number of 3? It's not a problem but I would have expected either 1 or 2 to have been the correct values.
2. Why do I see character 13 coming in on port 3? (I have tried port values of 0,1 and I get 255 and on port 2 the number I get is 15)
3. How do I get INP to work properly?
Many thanks for any pointers!