[A83] number _vputs and black-out a piece of screen


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

[A83] number _vputs and black-out a piece of screen






How can I output a number stored in a with _vputs?
It has to be a small font.

        ld a,(8008h)  ;the place in RAM for the contrast
	ld (number),a
	ld hl,3211h
	ld (pencol),hl
	ld hl,output
	call _vputs
	ld hl,3236h
	ld (pencol),hl
	ld hl,number
	call _vputs
	ret

output:
	.db "Contrast=             <31.",0
number:
	.db "22",0

I want to use this program with my Suckerwelcome password program,
because I have rechargeble batteries I want to know what the contrast is.
With my exams last time my batteries were totally out of energy, and that
exam of math wasn't good at all...



And can somebody find out a better way to black-out a piece of screen...


	call _clrscrnfull
	ld d,1		     ;don't forget d!!
	ld b,12
	ld c,12
	call draw
next:
	ld b,10
	inc c
	ld a,c
	cp 24
	jr z,stop
	call draw
	jr next
draw:
	call _ipoint
	inc b
	ld a,b
	cp 24
	ret z
	jr draw

stop:
	call _getkey
	ret

!! to use _ipoint you have to store something in d
0  -  pixel off
1  -  pixel on
2  -  xor pixel
3  -  test pixel (z=0 if pixel is off, z=1 if on)
4  -  pixel from graphbuffer -> homescreen

The other time this wasn't mentioned, but it's important!


       SUCKER


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Follow-Ups: