A86: Re: Contrast


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

A86: Re: Contrast




Wow, we do asm programming here?  (after 20 hours, I have ~65 messages NOT
related to asm programming)

To physically change the contrast, you must send the value to port 2:

 ld a,2     ; set contrast really low
 out (2),a  ; physically set it

Now, you can't read from the port.  So, the OS keeps track of it at location
$c008.  So to get the current location, read it from $c008.

 ld a,($c008)    ; get contrast level

Then, modify it:

 add a,2       ; increase 2 notches

Then write it back to $c008, and to physically set it, write it to the port:

 ld ($c008),a    ; save it, so the OS knows what it should be
 out (2),a       ; actually set it


>
> To check the contrast level you check the value at $C008, right?  But if I
> remember correctly you can not write to that location... if that's true...
is
> there a way to change the contrast in a program.  ie where do I write a
value
> to?  I seem to remember someone saying something about this... I just
don't
> remember now.  Thanks.




References: