A86: contrast
[Prev][Next][Index][Thread]
A86: contrast
hmmmm I made a little contrast program but i am haveing some problems could
some one tell me two things, first im getting trash in my out put second you
cant hold down a key you have to keep on pushing it.
BUT...i am happy to say that it does make the contrast go up or down
.org _asm_exec_ram
ProgStart:
ld bc,$0000
ld (_penCol),bc
ld hl,msg
call _vputs
ld bc,$0100
ld (_penCol),bc
ld a,($c008)
ld l,a
ld h,0
call _vputs
key_wait
xor a
call GET_KEY
cp K_PLUS
jr z,inc_contrast
cp K_MINUS
jr z,dec_contrast
cp K_EXIT
ret z
jr ProgStart
inc_contrast:
ld a,($c008)
cp $1f
jp p,ProgStart
inc a
out (2),a
ld ($c008),a
jr ProgStart
dec_contrast:
ld a,($c008)
cp 0
jp z,ProgStart
dec a
out (2),a
ld ($c008),a
jr ProgStart
msg:
.db "The contrast is:",0
.end
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Follow-Ups: