Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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

List of 54 messages in thread
TopicAuthorDate
Project using 89s52            01/01/70 00:00      
   RET (Where?)            01/01/70 00:00      
      Loops?            01/01/70 00:00      
         Loops?            01/01/70 00:00      
            with a quick glance            01/01/70 00:00      
               with a quick glance            01/01/70 00:00      
                  search for ...            01/01/70 00:00      
            Loops Something like this            01/01/70 00:00      
               School work?            01/01/70 00:00      
                  Nope            01/01/70 00:00      
               Loops Something like this            01/01/70 00:00      
                  ?...Doesnot Work...?            01/01/70 00:00      
                     ?...Doesnot Work...?            01/01/70 00:00      
                        Correct            01/01/70 00:00      
                        You sure you get a line feed before RFID?            01/01/70 00:00      
                            You sure you get a line feed before RFID?            01/01/70 00:00      
                              Try This            01/01/70 00:00      
                                 Try This            01/01/70 00:00      
                                 error            01/01/70 00:00      
                                    it's bible time            01/01/70 00:00      
                                       it's bible time            01/01/70 00:00      
                                    Is it ERROR or DOUBT???            01/01/70 00:00      
                                       Is it ERROR or DOUBT???            01/01/70 00:00      
                                 Compare            01/01/70 00:00      
                                    Simulate your function.            01/01/70 00:00      
                                       Simulate your function.            01/01/70 00:00      
                                          Use the free Keil C compiler Evaluation            01/01/70 00:00      
                                    COMPARE            01/01/70 00:00      
                                       compare            01/01/70 00:00      
                                          Still not out of time for C            01/01/70 00:00      
                                             Still not out of time for C            01/01/70 00:00      
                                                Read up on pointer            01/01/70 00:00      
                                                   Read up on pointer            01/01/70 00:00      
                                                      Me or you?            01/01/70 00:00      
                                                   Or do not use a pointer            01/01/70 00:00      
                                                      working code            01/01/70 00:00      
                                                         Describe your work process            01/01/70 00:00      
                                                            v            01/01/70 00:00      
                                                               Did you read? Did you debug?            01/01/70 00:00      
                                                         Why dont you define correct id in "code" space            01/01/70 00:00      
                                                            Hoping to get someone relegated?            01/01/70 00:00      
   Reading or Transmitting Data            01/01/70 00:00      
      Reading or Transmitting Data            01/01/70 00:00      
   a trip to the wild blue younder            01/01/70 00:00      
      This is where it gets lost            01/01/70 00:00      
   The fundamental problem is...            01/01/70 00:00      
      Same as its always been,            01/01/70 00:00      
         Yep I cannot think            01/01/70 00:00      
            Yep I cannot think            01/01/70 00:00      
               Why too late?            01/01/70 00:00      
            for a simple task ...            01/01/70 00:00      
               More than one way to skin a cat            01/01/70 00:00      
                  my $0.02            01/01/70 00:00      
                     If you can not code it in ASM ...            01/01/70 00:00      

Back to Subject List