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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/03/05 02:02
Read: times


 
#90888 - Yes. Code has bug - Peter
Responding to: ???'s previous message
Thanks for pointing out the error.

The code had not one but three bugs - possibly I must have corrected them on the machine version and not updated the copy on my notebook, which still reads as March-04-2001 as the date of completion. Memory of what exactly happened is vague.

       MIRRHEX:   	MOV DPTR, #INV_HEX-1 ; -1 was missing
			MOV MIRHEX1,#0FFH    ; # was missing
			MOV MIRHEX2,A
	CHKLUP:    	INC DPTR
			INC MIRHEX1
			MOV A, MIRHEX1
                        CLR C                ; this instr. was missing
			SUBB A, MIRHEX2
			JNZ CHKLUP
			MOV A, #0
			MOVC A, @A+DPTR
			RET

And I have checked this above code segment in Keil IDE with boundary conditions of 0x00, 0xff and a few values in between. Worked OK.

Sorry to have posted the erroneous code.

Raghu

List of 36 messages in thread
TopicAuthorDate
Reversing Algorithm            01/01/70 00:00      
   remembered this one            01/01/70 00:00      
      the fastest code in the west            01/01/70 00:00      
         Am I wrong            01/01/70 00:00      
            not as simple, but less table            01/01/70 00:00      
               lookup table            01/01/70 00:00      
                  nope            01/01/70 00:00      
                     swap, the nibble mirror            01/01/70 00:00      
                        nibble-wise?            01/01/70 00:00      
                     nope nope            01/01/70 00:00      
                        noipe, nope, nope            01/01/70 00:00      
                            noipe, nope, nope, nope            01/01/70 00:00      
                              Ok, Ok. Ok, OK            01/01/70 00:00      
                                 max.255 entries - or the tricks :-)            01/01/70 00:00      
                                    the value of verification            01/01/70 00:00      
                  Mirrored tracks            01/01/70 00:00      
                     Why ?            01/01/70 00:00      
                        Working fine            01/01/70 00:00      
                           why you post wrong code ?            01/01/70 00:00      
                              Yes. Code has bug - Peter            01/01/70 00:00      
                                 efficiency            01/01/70 00:00      
                                    Obvious Vs Smart code            01/01/70 00:00      
                                       sorry            01/01/70 00:00      
                                          No offence - only learning            01/01/70 00:00      
   One byte-reversing solution            01/01/70 00:00      
   Byte Bit Reversal            01/01/70 00:00      
      Re: Byte Bit Reversal            01/01/70 00:00      
   Bit Addressing solution!            01/01/70 00:00      
      Hardware?            01/01/70 00:00      
      2 byte of ram or 2 port?            01/01/70 00:00      
   Three ways:            01/01/70 00:00      
      Three (smart) ways            01/01/70 00:00      
      Thanks, Peter, but...            01/01/70 00:00      
         its faster            01/01/70 00:00      
   Topic has been discussed before            01/01/70 00:00      
   You could try a CPLD            01/01/70 00:00      

Back to Subject List