[comp.sys.mac.programmer] MPW Asm Bitwise Operators?

Bits_of_Magic@cup.portal.com (08/31/90)

I am using a Mac IIfx for embedded systems development, and while switching
some code from another assembler, I realized that MPW Assember appears to
have no bitwise operators for use in expressions.  Am I missing something?
I've got a bunch of macros along the lines of:

	move.w	#((input & $3FFF) | $4000),D0

where & is bitwise AND and | is bitwise OR.  Changing them all so that the
bit manipulation is actually done in code would really be a pain.  Anybody
want to tell me I'm unable to find a simple reference in the MPW manuals or
suggest some other reasonable alternative?

	thanks in advance for any replys,
****************************************************************************
* Evan Robinson                * "You have a very workable substitute for  *
* bits_of_magic@cup.portal.com *   high intelligence"                      *
* GEnie: EVANROB               *          Keith Rienzi, "Pick Up Axe"      *
****************************************************************************

stevec@Apple.COM (Steve Christensen) (08/31/90)

In article <33404@cup.portal.com> Bits_of_Magic@cup.portal.com writes:
>I am using a Mac IIfx for embedded systems development, and while switching
>some code from another assembler, I realized that MPW Assember appears to
>have no bitwise operators for use in expressions.  Am I missing something?
>I've got a bunch of macros along the lines of:
>
>	move.w	#((input & $3FFF) | $4000),D0
>
>where & is bitwise AND and | is bitwise OR.  Changing them all so that the
>bit manipulation is actually done in code would really be a pain.  Anybody
>want to tell me I'm unable to find a simple reference in the MPW manuals or
>suggest some other reasonable alternative?

Macros in MPW assembler use the "&" character along with a label to denote
local labels and input/output parameters.  Just use "AND" instead.

steve

-- 
____________________________________________________________________

  Steve Christensen             Internet:   stevec@goofy.apple.com
  Apple Computer, Inc.          AppleLink:  STEVEC
  20525 Mariani Ave, MS 81-CS   CompuServe: 76174,1712
  Cupertino, CA  95014

  "You just contradicted me."  "No I didn't."
____________________________________________________________________

Bits_of_Magic@cup.portal.com (08/31/90)

Thank You to those who answered.  My confusion came from Apple's use of
the word "logical" to mean "bitwise" whereas I have always considered
"logical" to be equivalent to "boolean".  The operators AND, OR, etc. listed
in the MPW manual are in fact bitwise, not boolean.
****************************************************************************
* Evan Robinson                * "You have a very workable substitute for  *
* bits_of_magic@cup.portal.com *   high intelligence"                      *
* GEnie: EVANROB               *          Keith Rienzi, "Pick Up Axe"      *
****************************************************************************