Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!adm!V125KJG8%UBVMS.BITNET@wiscvm.wisc.EDU From: V125KJG8%UBVMS.BITNET@wiscvm.wisc.EDU Newsgroups: comp.lang.c Subject: Re: Byte .vs. Word Alignment Message-ID: <7007@brl-adm.ARPA> Date: Tue, 21-Apr-87 10:11:07 EST Article-I.D.: brl-adm.7007 Posted: Tue Apr 21 10:11:07 1987 Date-Received: Wed, 22-Apr-87 03:14:07 EST Sender: news@brl-adm.ARPA Lines: 32 In article <5025@ut-ngp.UUCP>, dlnash@ut.ngp.uucp (Donald L. Nash) writes: >In article <244@petro.UUCP>, jrb@petro.UUCP (Jon Boede) writes: >> Also, whilst I'm on the subject, how much extra effort is required of the >> 68000 to get to specific bits than to, say, an int? I often use structures >> of bit flags to save space in files. I can easily compute the space savings, >> but an accurate guess as to the time savings is a little more elusive. > > The 68020 has bit field instructions for dealing with this sort of thing. >How efficient your code is when using bit fields in C depends on whether your >compiler is smart enough to use these instructions. I don't have a 68000 >manual, only a 68020 manual, so I can't tell you for certain if the 68000 has >these instructions, although I assume it does. Stand by, Don, I'll have to fetch my 68000 User's Manual... The 68000 instructions BTST, BSET, BCLR, and BCHG instructions (M68000 Programmer's Reference Manual (1984), p. 30, 73-82) do exist, HOWEVER the BF series instructions (MC68020 User's Manual (1985), p. B31-B45) do not. Unfortunately, this would mean multiple calls to the B-series 68000 instructions to do the same. SLOWSLOWSLOWSLOW... Let's hope that the good 68020 compilers can use these instructions. Folks? Can you fill us in? Have fun and see yuh (Happy Easter!)... --Curtis R. Anderson (Just a student at...) State University of New York at Buffalo (so I have the standard disclaimer here!) (V125KJG8@UBVMS.BITNET, C125KJG8@UBVM.BITNET, V125KJG8%UBVMS.BITNET@WISCVM.WISC.EDU, etc...)