oo..ya.the cpms is just for testing purpose ..nothing more..
now just to test the code can skip certain amount of character and store the wanted value into buffer ,i modify the code ,..i want to store "M" into buffer(1),"G" into buffer(2) and R into buffer(3)


include "modedefs.bas"
DEfine OSC 4
buffer var byte[90]
z var byte
x var byte
TRISB= %10001000


portb.4=0
portb.2=0
portb.1=0



serout portb.6,t1200,["atz",13]
pause 2000

serout portb.6,t1200,["at+cpms=",34,"me",34,13]
pause 2000

serout portb.6,t1200,["at+cmgr=1",13]
x = 2
while x>0
x = x-1
SERIN portb.7,t1200,1000,oops2,z
oops2:
wend

for x=1 to 3
SERIN portb.7,t1200,1000,oops,buffer(x)
oops:
next x
pause 2000

if buffer(1) ="M" then
portb.1=1
if buffer(2) ="G" then
portb.2=1
if buffer(3)="R" then
portb.4=1

endif
endif
endif

end


in hyperterminal .....the phone response with this :
at+cmgr=1
+CMGR: 1,,26
07910621000110F5040B910621297377F40000600111221064 230853BA3C9C3EA3E9

from the code above ...none of the LED light up is there problem with the code? thx ......