B baftab New Member Dec 19, 2007 #1 org 000h mov A,pcon setb acc.7 mov pcon,A mov tmod,#20h mov th1,#-3 mov scon,#50h setb tr1 mov DPTR,#rfid h_1: clr a movc A,@a+dptr jz b_z acall send inc dptr sjmp h_1 b_z:lcall b_1 send:mov sbuf,A h_2:jnb ti, h_2 clr ti ret org 0300h rfid: DB "re364 acknwlge",0 b_1: end i am checking its output on hyperterminal, and its sending me the data continously what am i doing wrong here?? i just want it to send me "re364 acknwlge" once
org 000h mov A,pcon setb acc.7 mov pcon,A mov tmod,#20h mov th1,#-3 mov scon,#50h setb tr1 mov DPTR,#rfid h_1: clr a movc A,@a+dptr jz b_z acall send inc dptr sjmp h_1 b_z:lcall b_1 send:mov sbuf,A h_2:jnb ti, h_2 clr ti ret org 0300h rfid: DB "re364 acknwlge",0 b_1: end i am checking its output on hyperterminal, and its sending me the data continously what am i doing wrong here?? i just want it to send me "re364 acknwlge" once
futz Active Member Dec 19, 2007 #2 Please use Code tags when posting code. Simply click on the # in the menu above the text entry box before pasting your code. Makes it look like this: Code: org 000h mov A,pcon setb acc.7 mov pcon,A mov tmod,#20h mov th1,#-3 mov scon,#50h setb tr1 mov DPTR,#rfid h_1: clr a movc A,@a+dptr jz b_z acall send inc dptr sjmp h_1 b_z: lcall b_1 send: mov sbuf,A h_2: jnb ti, h_2 clr ti ret org 0300h rfid: DB "re364 acknwlge",0 b_1: end
Please use Code tags when posting code. Simply click on the # in the menu above the text entry box before pasting your code. Makes it look like this: Code: org 000h mov A,pcon setb acc.7 mov pcon,A mov tmod,#20h mov th1,#-3 mov scon,#50h setb tr1 mov DPTR,#rfid h_1: clr a movc A,@a+dptr jz b_z acall send inc dptr sjmp h_1 b_z: lcall b_1 send: mov sbuf,A h_2: jnb ti, h_2 clr ti ret org 0300h rfid: DB "re364 acknwlge",0 b_1: end
felis New Member Dec 19, 2007 #3 Which micro this is written for? It looks like 8051 but I'm not sure.
Brevor Member Dec 19, 2007 #5 You LCALL to b_1 but you have no code there. The processor doesn't just stop at the end statement, you need a loop there because the program counter will continue to run.
You LCALL to b_1 but you have no code there. The processor doesn't just stop at the end statement, you need a loop there because the program counter will continue to run.