Hi All
does anybody knows how TimeOUT and Hserin behave with sub(s) routine(s)?
Manual refer to "Jump To", but can it jump to a sub and come back with return.(would be nice)
or it would be a GOTO, with a point of no return?
my code behave weirdly sometimes..
Ex program:
Code:Main: LOW RED_LED ; Error led off HSEROUT ["GIMEDATA",13] GoSub BufferChar ;Show received if RED_LED=0 DEBUG StrList[0],StrList[1],StrList[2] else DEBUG "ERROR",13 endif GOTO Main ;A buffering char sub routine BUfferChar: gotchar=0 Hserin 50, NoData, [return_code] While return_code<>13 Hserin 50, NoData, [return_code] StrLIst[gotchar]=return_code gotchar=gotchar+1 WEND RETURN NoData: ; Called by many routines that uses Hserin RCSTA.4 = 0 ; disable receiving of any other char return_code = 13 ; will end the While loop HIGH RED_LED ; Show Error led RCSTA.4 = 1 ; Enable receiving RETURN END


is that clean?

Bookmarks