Hi Andy,
High level PBP commands are "blocking" in nature, meaning that while they are doing their thing nothing else gets done. You're asking PBP to receive a string of four bytes so it will sit there and "receive" until 4 bytes are receieved - then it will continue with the next instruction.

So, yes, if you want to echo back characters oneby one you need to grab them one by one and send them back as they come in. If it's a human typing on keyboard this might work - or it might not. The reason is, as above, while the PIC is busy eching back the character just received it can't also receive the next character (usign SERIN/SEROUT that is).

Obviously the "best" way to handle these sort of scenarios is to use the hardware USART, if your PIC has one. Using HSEROUT on a byte by byte basis is MUCH faster then SEROUT because the all PBP needs to do is put the byte to be sent into the USARTs transmit register (if there's room). And at the same time abother byte can be coming into the receive buffer of the USART without any involvment of PBP.

So, if your PIC has a USART I suggest you switch to HSERIN/HSEROUT. Then of course you can take it one step further and use interrupts.

With that said, doing HSERIN [STR pass \4] won't allow you to echo the characters one by one as it's still blocking untill 4 bytes are received.

/Henrik.