Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!sri-spam!ames!ucbcad!ucbvax!decvax!tektronix!tekcrl!terryl From: terryl@tekcrl.UUCP Newsgroups: comp.arch,comp.sys.m68k Subject: Re: Bit operations on 68K Message-ID: <1361@tekcrl.TEK.COM> Date: Fri, 30-Jan-87 13:10:35 EST Article-I.D.: tekcrl.1361 Posted: Fri Jan 30 13:10:35 1987 Date-Received: Sat, 31-Jan-87 17:01:27 EST References: <760@orcisi.UUCP> <112@lmi-angel.UUCP> <816@drivax.UUCP> <1539@lsuc.UUCP> Reply-To: terryl@tekcrl.tek.com Organization: Tektronix, Inc., Beaverton, OR. Lines: 30 Xref: watmath comp.arch:276 comp.sys.m68k:203 In article <1539@lsuc.UUCP> jimomura@lsuc.UUCP (Jim Omura) writes: +In article <816@drivax.UUCP> alexande@drivax.UUCP (Mark Alexander) writes: + +... + +>This is not completely correct. There is no BSET.L instruction, only BSET. +>It works on a destination that is either a 32-bit register, or a byte from +>memory. Here is what the Motorola book says about BSET: +> +> If a data register is the destination, then the bit numbering is +> modulo 32, allowing bit manipulation on all bits in a data register. +> If a memory location is the destination, a byte is read +> from that location, the bit operation is performed using +> the bit number modulo 8, and the byte written back to +> the location with zero referring to the least-significant bit. + +>I didn't take the manual's word for it. I tried it on a Motorola VME/10. + + + In Kelly-Bootle and Fowler "68000, 68010, 68020 Primer", page 207 they +say that there is a 'bset.l' instruction. Could it be that this is in the +68020? (This isn't entirely academic for me since I'll have an '020 fairly +soon.) Well, one could say the Kelly-Bootle book is both right and wrong. No, the bset instruction on the 68020 is exactly the same as on the 68000 (and the 68010). The .l suffix is redundant, since one can only do long bset's (love that word!!!) on a data register. My 68020 book(straight from the horse's mouth, Motorola) has the exact same description of the bset instruction that Mr. Mark Alexander has quoted.