[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does anyone understand this...
In article <1992Nov24.172459.41341@slate.mines.colorado.edu> gdesroch@slate.mines.colorado.edu (DESROCHERS GARY FREDERIC) writes:
>
> I need to know what a
>
>BIT $CFFF
>
>does. I don't need breif answers like 'It clears all I/O ROMS'
>or 'It switches out C8 ROMS.". I can get these out of the IIc rom listing
>and II plus listing that I have. What does it do?!? The best answer would
>be as technical as you can give me or where I can get the answers.
>
> I appreciate anything you can give.
>
>Gary
>gdesroch@slate.mines.colorado.edu
>
>--
>Gary F. Desrochers
>gdesroch@slate.mines.colorado.edu
The BIT <operand> instruction tests bits in acc. against bits in <operand>.
If any set bits in <operand> match set bits in acc., then a BNE <somewhere>
will be taken, and a BEQ will not. This instruction is also used as a fake
LDA/STA instruction where you don't want to affect a memory location or the
accumulator. For example:
GETKEY LDA $C000
BPL GETKEY
BIT $C010
...
is sometimes found because the programmer simply wanted to address $C010,
but didn't want to store anything there. As for what $CFFF does, well, you
got me!
Hope this helps!
wsquires@lonestar.utsa.edu