FullDuplex String Question
I have a question concerning the printing of a string with FullDuplex to my PC.
I have been playing with the WiFly program that Rayman wrote. Instead of displaying that data to the 4.3 touch screen that he wrote it for, i would like to display the information to my PC via FullDuplex.
First, i will have to admit that i didnt understand the parsing of the data, but now i understand it.
So if i know how to find the start of my string and the end of the string, how do i output it to FullDuplex?
I have a
I have been playing with the WiFly program that Rayman wrote. Instead of displaying that data to the 4.3 touch screen that he wrote it for, i would like to display the information to my PC via FullDuplex.
First, i will have to admit that i didnt understand the parsing of the data, but now i understand it.
pSearch:=string("<br>")
pos1:=pos2+1'SeekString(pos2+2,pSearch,@WebPageBuffer)
pSearch:=string("<br>")
pos2:=SeekString(pos1+2,pSearch,@WebPageBuffer)
'Print Weather
repeat i from pos1+3 to pos2-1
print(WebPageBuffer[i])
print(13)
pos2++
The top part is how he determines where the data is in the string that he wants. The second part is how he is printing it to his screen.So if i know how to find the start of my string and the end of the string, how do i output it to FullDuplex?
I have a
PUB str(stringptr)
'' Send string
repeat strsize(stringptr)
tx(byte[stringptr++])
but that would print everything and not the range i want. So, what am i missing? 
Comments
Knowing that i have pos1 and pos2, can i subtract the two and get the Length of the String and then modify the code and pass the value StringLength to fullduplex?
PUB str(stringptr) '' Send string repeat strsize(StringLength) tx(byte[stringptr++])There is no particular reason why you can't have other conventions. You can supply your own str() variation that uses two parameters, one a starting address and the other a string length like:
PUB strTwo( addr, length ) repeat length tx(byte[addr++])or this with a starting and ending address:
PUB strThree(startAddr, endAddr) repeat endAddr - startAddr + 1 tx(byte[startAddr++])thanks again