Re: A83: Fades


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

Re: A83: Fades




When you do "or 0c0h", you modify the a register. Either save it on the stack,
or you can "and 3fh" after writing to the port, or you can do as I usually do
- work with the numbers as if they were in the range c0-ff.

Linus

On 22-Jun-98, Mark Allen wrote:

>I was trying to sort of fade from dark to light by using a loop to
>lighten the contrast, but my calc crashed and I had to remove the
>batteries.  Anyone know what I'm doing wrong?

> ld a,60d

>Fade_in:

> ld (curcontrast),a    ;start to change contrast
> ld a,(curcontrast)
> or 0C0h
> call _LCD_BUSY
> out (LCDINSTPORT),a ;end contrast change
> dec a
> cp 44d
> jr nz,Fade_in       ;if the contrast isn't at 44 (about mid-range),
>then go back to Fade_in


>I've only been doing this for a few days now, so disregard any sloppy
>code...

>Thanks,

>Mark Allen




References: