[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
endianness : Re: timer.c and ckinit.c Re: Timer resolution et al : Read_timer()
- Date: Sat, 13 Mar 2004 01:39:19 -0800 (PST)
- From: svasn_rtems at yahoo.com (sashti srinivasan)
- Subject: endianness : Re: timer.c and ckinit.c Re: Timer resolution et al : Read_timer()
Lots of thanks for making things much clearer.
Now I hope that I am somewhat clear, still I have
one problem in Read_timer() related to the endianness
of x86. Here is a fragment from this routine:
These lines latch the value of timer0, then reads lsb
first and msb next.
This lines store two bytes on variable clicks.
clicks = (msb << 8) | lsb;
My doubt is, since i386 is little endian, why this
line is written like this instead of:
clicks = (lsb << 8) | msb;
I guess whatever is written already is correct,
something is wrong with my understanding. Very
sorry if my doubt is a trivial one.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam