Hi Chris,
Further to my tests with the User Port, there's some code here
http://www.alioth.net/Projects/Z80/piotest-intr.asm to use the
interrupts from the PIO chip but for a different computer. Everything
should be accessible in the Einstein. I see no reason for anything to
not be enabled.
In XBasic the command you might need to use is WAIT instead of INP. I
can't find my BBC Basic reference guide at the moment but there should
be a similar command.
The WAIT command is followed by 3 numbers, ie;
20 WAIT J1,J2,J3
J1 is the port number (&32 for User Port)
J2 and J3 are used to compare the data from the port with a user
specified scheme and return a result if there is a match.
1. Get data from port.
2. XOR with J3
3. AND with J2
4. continue if result is non-zero
But I don't think that's really what you intended. If you need to pass
a stream of data from the PC to the Einstein with handshaking in
Basic you need some form of the INPUT# command and set it to read data
from the User port, or do it in assembler.
The code in the page I linked to above can be changed for the Einstein
(including but not limited to);
First, change the port addresses
-----
; Port and function - place one of these on the address bus.
DEFINE PortA_DATA #30
DEFINE PortA_CMD #31
DEFINE PortB_DATA #32
DEFINE PortB_CMD #33
-----
You might also need to change the org, Stack Pointer and VectorTable
Second, set up the port for input instead
-----
SetupPIO
ld a, Input ; Put PIO port A into input mode
-----
Third, re-write "BlinkerLights" and the "PortA_Intr" to read a stream
of data and display it.
I'll leave that bit up to you.
Regards,
Geoff