??? 05/25/09 11:16 Read: times |
#165576 - RET (Where?) Responding to: ???'s previous message |
Dear Popa,
Your code starts as AJMP START START: MOV TMOD,#20h MOV SCON,#50h MOV TH1,#0F4h MOV TL1,#0F4h SETB TR1 MOV COUNTER,#01h ;init counter CLR RECEIVED CLR VALID_TAG SETB P2.0 ;the LED must be in off state FIRST_BYTE: JB TI,TRANS ;if transmission is over jump to trans MOV A,SBUF CJNE A,#0Ah,LAST_BYTE ;check first byte MOV COUNTER,#01h AJMP RECEV Also near end you have something like RECEV: CLR RI RET TRANS: CLR TI RET You are branching to TRANS / RECEV using "AJMP", then you should also come back using "AJMP" (or "LJMP" or "SJMP") If you want to use "RET" then you should "ACALL" or "LCALL" RECEV/ TRANS. Regards, Mahesh |