I am using two 16F628A's and trying to get them to communicate serially that have ports turn on when a button is pressed. My code is listed below, but when I run the program it responds VERY SLOWLY. I am wondering if there is a way to make it respond faster by using interrupts, or some other way. Thank you for your time and patience...

PS: the pauses below the hserout commands are to prevent buffer overflow problems (thanks mister_e)

-Mike

Transmitter Code:
-----------------

define HSER_TXSTA 20h
define HSER_BAUD 2400

cmcon = 7

sone var byte
sone = 0
stwo var byte
stwo = 0
sthree var byte
sthree = 0
sfour var byte
sfour = 0
Synch var byte
Synch = "~"
Pre var byte
Pre = $A5

Main:

if (PORTA.0 = 0) AND (sone = 0) then
hserout [Pre,Synch,"1"]
sone = 1
pause 200
endif
if (PORTA.0 = 1) AND (sone = 1) then
hserout [Pre,Synch,"2"]
sone = 0
pause 200
endif


if (PORTA.1 = 0) AND (stwo = 0) then
hserout [Pre,Synch,"3"]
stwo = 1
pause 200
endif
if (PORTA.1 = 1) AND (stwo = 1) then
hserout [Pre,Synch,"4"]
stwo = 0
pause 200
endif


if (PORTA.2 = 0) AND (sthree = 0) then
hserout [Pre,Synch,"5"]
sthree = 1
pause 200
endif
if (PORTA.2 = 1) AND (sthree = 1) then
hserout [Pre,Synch,"6"]
sthree = 0
pause 200
endif


if (PORTA.3 = 0) AND (sfour = 0) then
hserout [Pre,Synch,"7"]
sfour = 1
pause 200
endif
if (PORTA.3 = 1) AND (sfour = 1) then
hserout [Pre,Synch,"8"]
sfour = 0
pause 200
endif

goto Main

Receiver code
-------------
define HSER_CLROERR 1
define HSER_RCSTA 90h
define HSER_BAUD 2400

Msg Var BYte
cmcon = 7

Main:
hserin [WAIT("~"),Msg]


if (Msg = "1") then
high PORTA.0
goto main
endif
if (Msg = "2") then
low PORTA.0
goto main
endif

if (Msg = "3") then
high PORTA.1
goto main
endif
if (Msg = "4") then
low PORTA.1
goto main
endif

if (Msg = "5") Then
high PORTA.2
goto main
endif
if (Msg = "6") then
low PORTA.2
goto main
endif

if (Msg = "7") Then
high PORTA.3
goto main
endif
if (Msg = "8") then
low PORTA.3
endif
goto main