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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/02/04 10:21
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#73497 - RE: Remainder
Responding to: ???'s previous message
hi,

once again: it does work here!
#include <reg51.h>

#define MAX_DIGS 10

void main(void) 
{
	unsigned char loop;
	unsigned long counter;
	unsigned char Value[MAX_DIGS];

	counter = 0x100L;	// for test

	for (loop = 0; loop<MAX_DIGS; loop++)
	{ 
		Value[loop] = counter % 10;
		counter = counter / 10;
	}

	while(1);
}

Looking at memory located at Value[0] and above, after program has been executed, I see:
0x06,0x05,0x02,0x00,0x00...
That`s 256!

So what is the problem?

Regards,
Oleg

List of 4 messages in thread
TopicAuthorDate
Remainder            01/01/70 00:00      
   RE: Remainder            01/01/70 00:00      
   RE: Remainder            01/01/70 00:00      
      RE: Remainder            01/01/70 00:00      

Back to Subject List