ARSETBIT -- Set bit designated by A at hl
ARRESBIT -- Reset bit designated by A at hl
ARTSTBIT -- Test bit designated by A at hl
ARRB1MSK -- Make mask in reg A with one bit set
ARRBCMSK -- Make mask in reg A with n low order bits set
ARRMANDA -- Logical AND (hl),a
ARMEMORA -- Logical OR  (hl),a
:Set bit designated by A at hl

     Routine:  ARSETBIT

     Function: Set a bit in the byte pointed to by HL. The bit
designated by A is changed to '1'.
This routine works by synthesizing a z80 'cb' instruction.

     Inputs:
	 A = bit number (0-7)
	HL = address of the byte

     Outputs: NONE. Bit A at HL is set to 1.

     Registers Affected: AF, BC are destroyed
	all other registers are preserved

     Error Conditions: NONE.
:Reset bit designated by A at hl

     Routine:  ARRESBIT

     Function: Reset a bit in the byte pointed to by HL. The bit
designated by A is changed to '0'.
This routine works by synthesizing a z80 'cb' instruction.

     Inputs:
	 A = bit number (0-7)
	HL = address of the byte

     Outputs: NONE. Bit A at HL is reset to 0

     Registers Affected: AF, BC are destroyed
	all other registers are preserved

     Error Conditions: NONE.
:Test bit designated by A at hl

     Routine:  ARTSTBIT

     Function: Test a bit in the byte at HL. The position of the
bit to test is the number passed in A (0=>least significant bit). The
value of the bit is returned in A and C, and the zero flag is
adjusted accordingly. 
This routine works by synthesizing a z80 'cb' instruction.

     Inputs:
	 A = bit number (0-7)
	HL = address of the byte

     Outputs:
	if Z,	then C = A = 0    and the bit is a 0
	if NZ,	then C = A = 0ffh and the bit is a 1

     Registers Affected: register B is destroyed
	HL, DE are preserved

     Error Conditions: NONE.
:Make mask with one bit set

     Routine:  ARRB1MSK

     Function: Make a byte in reg A which has a single bit set to 1.
The position of the bit is defined by the value of A on entry.

     Inputs:  A = bit position to set (0-7)

     Outputs:  A = requested bit set, others 0
flags are undefined

     Registers Affected: AF
all other registers preserved.

     Error Conditions: NONE.
:Make mask with n low order bits set

     Routine:  ARRBCMSK

     Function: Set n least significant bits in a byte, where
n is specified as a number (0-7) which marks the highest bit set.

     Inputs: A = highest bit to set (0-7)

     Outputs: A = filled with 1's (positions 0 through n).

     Registers Affected: AF
all other registers preserved.

     Error Conditions: NONE.
:Logical AND (HL),a

     Routine:  ARRMANDA

     Function: Perform the logical AND of the byte at HL with
the accumulator, storing the result in memory at HL.

     Inputs: A = mask to AND with (HL)

     Outputs: NONE. The byte at HL is changed.

     Registers Affected: NONE

     Error Conditions: NONE.
:Logical OR  (HL),a

     Routine:  ARMEMORA

     Function: Perform the logical OR of the byte at HL with
the accumulator, storing the result in memory at HL.

     Inputs: A = mask to OR with (HL)

     Outputs: NONE. The byte at HL is changed.

     Registers Affected: NONE

     Error Conditions: NONE.
