A85: Re: Fade to white again


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

A85: Re: Fade to white again




Thanks both.  I added both fixes and now it will begin to fade, but it
stops part way through and just sits there.  The program never comes to a
finish.  What are the ranges of the contrast?  I thought it was 0 - 32. 
Also is there any documentation on what the different ports are?
Here's what I have now:

#include "usgard.h"

   .org  0
   .db   "Fading effects "
   .db   "by Erik Gillespie", 0

start:
   call  CLEARLCD
   sub   a
   ld    (CURSOR_ROW), a
   ld    (CURSOR_COL), a
   ld    hl, &T_FadeOut
   call  D_ZT_STR
   call  &GetCh
   call  &FadeToWhite
   sub   a
   ld    (CURSOR_ROW), a
   ld    (CURSOR_COL), a
   ld    hl, &T_DoneFading
   call  D_ZT_STR

GetCh:
   call  GET_KEY
   or    a
   jr    z, GetCh
   ret

FadeToWhite:
   ld    a, (CONTRAST)
   push  af
   ld    bc, 32            ; Wait 4/25 of a second before fading any more
FTWLoop:
   dec   a
   ld    (CONTRAST), a
   out   (2), a
   push  af
   #fncall  DELAY
   pop   af
   cp    $01
   jr    nz, FTWLoop
   pop   af
   call  CLEARLCD
   ld    (CONTRAST), a
   out   (2), a
   ret

T_FadeOut:
   .db   "Fading to white", 0
T_DoneFading:
   .db   "Done fading", 0

.end



egillespie@juno.com

"In a prototypical world, nothing ever goes wrong." -Scott Meyers

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


References: