SHORTIES\FADE.DOC  ·  DOC  ·  3.9 KB  ·  1988-02-28  ·  from PCPlus_Issue-37_Oct-1989
                                      FADE
                                     ~~~~~~
                       Fade (c) Colin J Smith March 1989


                                 Files on disk
                                ~~~~~~~~~~~~~~~
              FADE.COM  ; the program to fade the screen
              FADE.ASM  ; the assembly source code
              FADE.DOC  ; this file
             FTEST.BAT  ; batch file to test operation of FADE.COM


        FADE  was written  in the 8086 assembly language.   The  assembly
        source  code  should assemble using  'Borland  Turbo  Assembler',
        'Microsoft Macro Assembler' or 'A86 Macro Assembler'.


        FADE will be useful when you wish to add that extra touch to your
        batch file programs.  It makes a difference to the ordinary 'CLS'
        command.


	FADE  uses  DMA (direct memory access)  of the  screen display to
	give a  fast and  smooth fade.  Detection  of the  type of screen
	display  used, is made  automatically  i.e. colour or  monochrome
	screen,	 to  ensure  that  the  fade  program  will  work on  any
	configuration of machine.


        It  is  designed to work with batch files  interfaced  using  the
        ERRORLEVEL.   Users can create their own customised  batch  files
        which will  allow them clear the screen in a new way.


        To look at the list of options available issue the command:-

                  FADE <RETURN>    ; this will display the usage


        To clear the screen use:-

                  FADE s c         ; where 's' is the speed and 'c'
                                   ; is the character to clear the screen to
                                   ; s=(1-9)      c=(any character)
                                     1=SLOW
                                     2= ..
                                     3= ..
                                     4= ..
                                     5= ..
                                     6= ..
                                     7= ..
                                     8= ..
                                     9=FAST


        	  		   Examples
	                          ~~~~~~~~~~

                  FADE 1 █	- clears to screen of blocks slowly
		  FADE 9 !      - clears to screen of plings quickly
		  FADE 5 \      - clears to screen of backslashes medium speed
		  FADE 9        - clears to screen of spaces quickly


                                Using FTEST.BAT
                               ~~~~~~~~~~~~~~~~~

        FTEST.BAT is a batch file program which shows the typical
        applications for which FADE can be used.

        To run FTEST use:-

                FTEST <Return>


        FTEST may be slow  depending on the area of the floppy disk it is
        positioned   because  it needs to  access FADE.COM  a few  times.
        In your  own  programs  you may  only need to access  FADE.COM  a
        few times  so this  should not be a problem.  If your batch files
        will   access FADE.COM  a  great  deal then you   should   either
        put  FADE.COM  onto a 'ramdisk' or your hard disk to  offer  best
        efficiency.


                           Using the ERRORLEVEL value
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        FADE returns an ERRORLEVEL value depending on what happened  when
        it was called, which can then be used by batch files:-

        batch file extract,

FADE 1 █                        ; batch file runs FADE to clear screen
IF ERRORLEVEL==255 GOTO NOPARMS ; wrong parameters
IF ERRORLEVEL==0 GOTO CLEAROK   ; the screen cleared OK


        The  method  is  to call FADE and then check  the  ERRORLEVEL  to
        determine  what  actually happened  i.e. everything OK, incorrect
	mode (so the program can't possibly fade it), etc.

        You don't have any excuse for writing those batch files now!,

        Enjoy!