Thanks Bruce, But what i need to understand is why this statement below doesn't produce a result.
________________________________________
if bytesin[0]= $80 then
HSEROUT ["up",str BytesIn\ByteCnt ,13,10]
endif
________________________________________

I can use (if bytesin[0]> $7f then) and (if bytesin[0]< $81 then)
in any combination of nested (IF THEN) statements and it works as long as i dont ask it to "=". See code Below, This it what i need to work but doesn't.
If I send the same code from my serial display to my PC I can see that bytesin[0] is infact = to $80.
I also got this code to work using a select case statement.
Basically what im saying is my IF THEN doesn't like "=" if using an array for comparison. But will Compare if using Greater than or less than.
I KNOW, its not logical, thats why i really need your help.

thanks ash

DEFINE OSC 4
DEFINE HSER_BAUD 19200
DEFINE HSER_CLROERR 1 ' Automatically clear over-run errors
DEFINE HSER_RCSTA 90h ' Enable USART receive
DEFINE HSER_TXSTA 24h ' TXSTA=%00100100. TX enable, BRGH=1 for high-speed

GP VAR BYTE BytesIn var byte[5]
ByteCnt var byte
OERR VAR RCSTA.1
CREN VAR RCSTA.4 RCIF VAR PIR1.5 INTCON = 0
ByteCnt = 0
ADCON1 = 7 '
OSCCON=%01100000

Main:
IF oerr then
cren=0
cren=1
endif
IF RCIF THEN
BytesIn[ByteCnt]=RCREG
IF ByteCnt = 4 THEN MsgOut
ByteCnt=ByteCnt+1
ENDIF
GOTO Main

MsgOut:

if bytesin[0]= $80 then
HSEROUT ["up",str BytesIn\ByteCnt ,13,10]
endif

FOR GP=0 TO ByteCnt
BytesIn[GP]=0
NEXT gp
ByteCnt=0
WHILE RCIF
GP=RCREG
WEND
GOTO Main