Thank you very much! I am going to post things on github shortly and I'll post the link here. I want to work out the most minimal instructions possible: as it is, I don't have an efficient method to convert the BASIC code to a tape image. I've attached the basic code and tape image.
Btw,this modified terminal is actually somekind of linux cli for amstrad?
That's right: the goal is to use the CPC as a terminal to my linux machine. That means that the amstrad is sending text and receiving text, but not doing any real processing itself other than the text stream.This was common in the 70s where there was one mainframe computer which many users connected to with something like
https://en.wikipedia.org/wiki/VT100 - here the raspberry pi is the mainframe while the CPC is the VT100
So what does that mean for what I want to create? At present, text from linux is printed directly onto the amstrad screen, while text from amstrad keyboard is printed to screen and sent to linux over serial. The issue with this is that it's not all text: there are "escape codes" which should do things like clear screen, return to and edit past commands, move cursor etc. Right now they just print to screen as things like "]H" or "]P".
So what I need to do effectively is to clone functionality of DEC's old equipment so these escape codes work. That's what linux "terminal emulators" do as well.
I'm not a real programmer so my progress will not be impressive. I tried editing the code more substantially but it would either not work or have bugs I couldn't understand.I restarted my efforts using the smallest edits I could manage. This term464v3 instance has only the following edits:500 CALL &BB03 ---> instead of CLEAR because CPC464 hasn't got that command520 WINDOW #1,1,80,1,25 ---> Window #1 is now fullscreen ..... Then I changed all PRINT #2 mentions to PRINT #1 .....

660 REM a$="CPC>"+A$ ---> commented out so that amstrad sends just the input you typed
Your USIfAC version 2 looks seriously impressive! The extra speed/buffering might come in handy. At the moment I'm using 115200 baud only.