INCLUDE "modedefs.bas"

SEROUT PORTB.1,T9600,[1]

SERIN PORTA.1,T9600,["A"] ---- this would only wait for the "A" character, it wouldn't save it anywhere or do anything with it...

IF PORTA.1 = "A" THEN ---- again, you haven't saved your "A" character anywhere
PORTB.1 = $FE ---- it's a bit output that you're trying to send a byte out of, that don't work, but I think you already know that...


What you probably want is:

INCLUDE "modedefs.bas"
inputdata var byte
main:
SEROUT PORTB.1,T9600,[1] 'trigger something somewhere else
waitloop:
SERIN PORTA.1,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
serout portb.1,T9600,$FE, $96: pause 10000:serout portb.1,T9600,$FE,$80:goto main
goto main