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

Re: Newbie Assembly



Rubywand wrote:
> 
> Simon Biber writes ...
> >
> > I'm just starting to learn Apple II assembly
> > using the mini-assembler on my
> > platinum //e. I'm using the instruction listing,
> > Appendix A of the "Apple II
> > Reference Manual".
> >
> > I've written this program which clears the
> > HGR screen to a colour (white by
> > default). It works! Can someone help me to
> > see if this is an optimal way of
> > doing this?
> >
> > 300:    LDA #FF
> > 302:    LDX #3F
> > 304:    LDY #00
> > 306:    STX $030E
> > 309:    STY $030D
> > 30C:    STA $0100
> > 30F:    DEY
> > 310:    BNE $0306
> > 312:    DEX
> > 313:    CPX #19
> > 315:    BNE $0304
> >

 ....

     Just noticed something else. The instruction at 313 should probably be

313:    CPX #1F

You probably want to fill just the Hires-1 screen area-- i.e. $2000-$3FFF. (CPX
#19 would fill $1A00-$3FFF.)



Rubywand