[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BRUN HGR pics?



Dave Althoff (dalloff@freenet.columbus.oh.us) wrote:

: 1FF1- 48       PHA
: 1FF2- AD 50 C0 LDA $C050
: 1FF5- AD 52 C0 LDA $C052
: 1FF8- AD 54 C0 LDA $C054
: 1FFB- AD 57 C0 LDA $C057
: 1FFE- 68       PLA
: 1FFF- 60       RTS

: The PHA and PLA instructions are optional; I use them to make sure that
: the program doesn't scramble the A register.

You could've eliminated the PHA and PLA by using the BIT opcode (or
even STA) instead of LDA (the hex code is $2C I believe).

ie...

BIT $C050
BIT $C052

etc.

-- 
Sam
-------------------------------------------------------------------------------
Computer Historian, Programmer, Musician, Philosopher, Athlete, Writer, Jackass