Hi mbox,
Yep, that's essentially it, now all you have to do is receive some information from outside the PIC, store it in the variables and test IF TRUE. So . . .
Code:
serin portA.3,N9600,["A"],Led1 ' pretty much right from the book
' reads data from PC data received after "A" stored in LED1 comment out 
' PortA IF THEN loops
Add this to your code and comment out the portA if then loops, send it some data from another PIC or your personal confuser ugh . . . computer and you have what you asked for, what's more, now you understand your code and can make whatever variables and outputs you want.
Look at BRUCE's website, check these 2 links:
http://rentron.com/PIC16F84.htm
http://rentron.com/PicBasic1.htm
He has lot's of great examples, and he sells stuff too! Highly recommend.