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

Back to Subject List

Thread Closed: Issue successfully resolved

???
03/15/04 03:44
Read: times


 
#66722 - RE: I need help
Responding to: ???'s previous message
Hello everybody

Now I understand where is error and found my problems. I point DPTR to somewhere that doesn't contain Table's content.

Here is my repaired code

;table size = 864 == 0360h

main:
mov r7, #0
mov r6, #0
loop:
call lookup ;take a element from table
mov b, r7 ; increase pointer
inc b
mov r7,b
cjne r7, #060h, checkloop ; end of table
cjne r6, #003h, checkloop
jmp end ; YES --> end
checkloop:
cjne r7, #0FFh, loop ; no --> continue
mov r7, #0 ; new loop
mov b, r6
inc b
mov r6, b
jmp loop
end:
...

I think this must be worked (it runs well with simulate porgram win8051_IDE).

But it doesn't work in my real board!!!
May be my board is error??

IF anyone can find any error in that code. Please tell me.

Thanks,
Toan.

List of 36 messages in thread
TopicAuthorDate
C Programe for 8051            01/01/70 00:00      
   Reading List            01/01/70 00:00      
      RE: Reading List            01/01/70 00:00      
   RE: C Programe for 8051            01/01/70 00:00      
   Sorry for the new thread            01/01/70 00:00      
   I need help            01/01/70 00:00      
      Learning 'C'            01/01/70 00:00      
      RE: I need help            01/01/70 00:00      
         RE: I need help            01/01/70 00:00      
            RE: I need help            01/01/70 00:00      
               RE: C table lookup            01/01/70 00:00      
            RE: I need help            01/01/70 00:00      
               RE: I need help            01/01/70 00:00      
                  RE: I need help            01/01/70 00:00      
      RE: I need help            01/01/70 00:00      
         RE: I need help            01/01/70 00:00      
         RE: I need help            01/01/70 00:00      
            RE: I need help            01/01/70 00:00      
               RE: I need help            01/01/70 00:00      
                  RE: I need help            01/01/70 00:00      
                     RE: I need help            01/01/70 00:00      
                        RE: I need help            01/01/70 00:00      
                           RE: I need help            01/01/70 00:00      
                              RE: I need help            01/01/70 00:00      
                                 RE: I need help            01/01/70 00:00      
                                    RE: I need help            01/01/70 00:00      
                                 RE: I need help            01/01/70 00:00      
         RE: I need help            01/01/70 00:00      
            RE: I need help            01/01/70 00:00      
               RE: I need help            01/01/70 00:00      
                  RE: I need help            01/01/70 00:00      
            RE: I need help            01/01/70 00:00      
               RE: I need help            01/01/70 00:00      
                  RE: I need help            01/01/70 00:00      
                     RE: I need help            01/01/70 00:00      
                  RE: I need help            01/01/70 00:00      

Back to Subject List