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


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

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




Oops. Those are supposed to be bcall's. You'll have to jr nz over the first
bcall or just let it display a leading '0' if there is one.

Kirk

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Kirk Meyer
Sent: Wednesday, June 27, 2001 11:52 AM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: number _vputs and black-out a piece of screen



Not sure if that would display menu text or not... a rather more efficient
way to do it would be (this is designed for contrast, it might not be quite
so efficient for larger numbers) -- uses BC, if you need it to use something
else, just change the registers:

	ld	b,'0'-1
@loop	sub	10
	inc	b
	jr	nc,@loop
	add	a,'0'+10
	ld	c,a
	ld	a,b
	cp 	'0'
	call	nz,_vputmap
	ld	a,c
	call	_vputmap

Hmm, not sure if _vputmap preserves BC or not. If not you'll need to use a
different register, perhaps HL.. For the box, you could use a routine
similar to the horizontal line routine posted a month or so ago, but you'd
have to make it stop instead of going to the edge of the screen.

Kirk

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Michael Vincent
Sent: Wednesday, June 27, 2001 11:45 AM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: number _vputs and black-out a piece of screen



For a number stored in A,

bcall(_setxxop1)    ;only works for A must be 0-99
ld a,2                        ;tells dispop1a to display at most 2 digits of
OP1 (you won't need more)
bcall(_dispop1a)

--
Michael Vincent
Detached Solutions - www.detacheds.com
--
Senior Vice-President/Chief Software Architect
Radical Software - www.radicalsoft.org

----- Original Message -----
From: "The one and only SUCKER!! ..." <sucker_pvn@hotmail.com>
To: <assembly-83@lists.ticalc.org>
Sent: Wednesday, June 27, 2001 10:22 AM
Subject: [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.
>
>
>
>






References: