You are on page 1of 2

sry for late reply....this is my code...

org 00h ajmp main org 30h mov p1,#00h mov p3,#00h mov p2,#00h setb p2.1

main:mov scon,#50h mov tmod,#20h mov th1,#0fdh mov dptr,#string1 call send_string CALL DELAY mov dptr,#string2 call send_string call delay mov dptr,#string5 call send_string call delay mov dptr,#string3 call send_string call delay mov dptr,#string4 call send_string call delay mov dptr,#string5 call send_string call delay call here1 send_string: l1:clr a movc a,@a+dptr setb tr1 acall send inc dptr jz l2 sjmp l1 send:mov sbuf,a here:jnb ti,here clr ti ret l2:nop DELAY: MOV R1,#0FFH REP2: MOV R2, #0FFH REP1:

NOP DJNZ R2, REP1 DJNZ R1, REP2 RET string1 string2 string3 string4 string5 :db :db :db :db :db "AT+CMGS",0 "mobile num",0 "message",0 0x1a,0 0x0d,0

here1 :ajmp here1 end

You might also like