Why wouldn't Jersons procedure work with that code? You just need to think about how it works and APPLY it to your program...
OR, if you want to be SURE to send 'body' atleast one time.Code:case 12 Gosub Starting ; this is "header" While (PortA & %00011100) = 12 Gosub Sursa ; ths is "body" Wend
Also, since you're always sending the header you could move that to outside of the Select Case structure. Send 'header' then select which 'body' to send. That'll save a couple of GOSUBS.Code:case 12 Gosub Starting ; this is "header" Gosub Sursa While (PortA & %00011100) = 12 Gosub Sursa ; ths is "body" Wend
/Henrik.




Bookmarks