Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site hammer.UUCP Path: utzoo!linus!decvax!tektronix!orca!hammer!steveg From: steveg@hammer.UUCP (Steve Glaser) Newsgroups: net.micro.68k,net.arch,net.lang Subject: Re: consistent bit addressing in the 68020 Message-ID: <898@hammer.UUCP> Date: Tue, 28-Aug-84 11:27:51 EDT Article-I.D.: hammer.898 Posted: Tue Aug 28 11:27:51 1984 Date-Received: Thu, 30-Aug-84 11:29:45 EDT References: <491@turtlevax.UUCP>, <1638@sun.uucp> <9903@gatech.UUCP> Organization: Tektronix, Wilsonville OR Lines: 29 Actually, the 68020 does number the bits both ways. Quoting from the 68020 User's Manual page 2-4: A bit datum is specified by a base address that selects one byte in memory and a bit number that selects the one bit in this byte. The most significant bit of the byte is number seven. A bit field datum is specified by a base address that selects one byte in memory, a bit field offset that indicates the leftmost (base) bit of the bit field in relation to the most significant bit of the base byte and a bit field width that determines how many bits to the right of the base bit are in the bit field. The most significant bit of the base byte is bit offset 0, the least significant bit of the base byte is offset 7, and the least significant bit of the previous byte in memory is offset -1. Bit field offsets may have values in the range of -2^31 to 2^31-1 and bit field widths may range between 1 and 32. Given the high-endian nature of the 68k, it makes sense to do bit fields this way. It also makes sense to number the bits in a word using the natural mathematical rules (bit n is the 2^n bit in an unsigned int). The 68000 doesn't have the bit field data type so it doesn't have this inconsistency. Oh well, it could be worse. Steve Glaser tektronix!steveg