Code:
--------------------------------------------------------------------
DATA @1, "Jack"
DATA @5, "Tom"
DATA @10, "Jill"
DATA @25, "jump"
DATA @30, "ran"
DATA @35, "walk"
DATA @100, "hill"
Data @104, "store"
DATA @109, "well"
DATA @150, "a"
DATA @153, "the"
DATA @156, "miles"
DATA @161 "per hour"
DATA @170, "to"
DATA @172, "up"
DATA @174, "under"
DATA @179, "hyper-motovated"
DATA @190, "ed"
DATA @192, "ly"
DATA @196, "ing"
DATA @199, 13,10
DATA @210, "."
DATA @211, "?"
DATA @212, "!"
DATA @213, " "
DATA @254, 254
DATA @255, 255
'12F683 has 128 Bytes of RAM, PBP uses 20 Bytes, Leaving 108 Bytes for varibles
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
main: SerIn2 RxPin,Mode,ParityFail, TO, TOFail,[WAIT("UP"), STR Request\1]
if Request[0] = "D" then
for UPDCounter = 0 to NumberOfStrings
Lookup UPDCounter,[1,213,35,190,213,255,213,156,213,172,213,150,213,100,213,179,212,199], Start
Lookup UPDCounter,[4, 1, 4, 2, 1, 1, 1, 5, 1, 2, 1, 1, 1, 4, 1, 15, 1, 2], Length
'Jack walked 12.3 miles up a hill hyper-motovated!
for Counter = Start to Length
read Counter,StringByte
if StringByte = 255
Serout2,TxPin,Mode[dec MilesA2D]
else
SerOut2 TxPin,Mode,[StringByte]
endif
next Counter
next UPDCounter
endif
goto main
endif
--------------------------------------------------------------
Bookmarks