!pr1
!lm12
!rm75
Quickie No. 1..............................Bob Sander-Cederlof

To merge selected bits from one byte with the rest of the bits of another byte:

!lm+5
  Code           Example
LDA MASK         00011111
EOR #$FF         11100000
ORA BYTE1        111xxxxx
STA TEMP
LDA BYTE2        yyyzzzzz
ORA MASK         yyy11111
AND TEMP         yyyxxxxx
!lm-5


Quickie No. 2..............................Bob Sander-Cederlof

To test a byte in memory without disturbing any registers:

!lm+5
INC BYTE
DEC BYTE       Restore value, and test against zero
BEQ ....
!lm-5


Quickie No. 3..............................Bob Sander-Cederlof

To shift a two-byte value right one bit with sign extension:

!lm+5
LDA HI.BYTE
ASL            SIGN BIT INTO CARRY
ROR HI.BYTE    HI BYTE RIGHT ONE, CARRY (SIGN) INTO BIT 7
ROR LO.BYTE
!lm-5


Quickie No. 4..............................Bob Sander-Cederlof

To print a two byte value in hexadecimal:

!lm+5
LDA HI.BYTE
LDX LO.BYTE
JSR $F941
!lm-5
