home *** CD-ROM | disk | FTP | other *** search
/ PC Plus 37 / SHORTIES / FADE.DOC < prev    next >
Encoding:
Text File  |  1989-01-01  |  3.9 KB  |  107 lines

  1.  
  2.                                       FADE
  3.                                      ~~~~~~
  4.                        Fade (c) Colin J Smith March 1989
  5.  
  6.  
  7.                                  Files on disk
  8.                                 ~~~~~~~~~~~~~~~
  9.               FADE.COM  ; the program to fade the screen
  10.               FADE.ASM  ; the assembly source code
  11.               FADE.DOC  ; this file
  12.              FTEST.BAT  ; batch file to test operation of FADE.COM
  13.  
  14.  
  15.         FADE  was written  in the 8086 assembly language.   The  assembly
  16.         source  code  should assemble using  'Borland  Turbo  Assembler',
  17.         'Microsoft Macro Assembler' or 'A86 Macro Assembler'.
  18.  
  19.  
  20.         FADE will be useful when you wish to add that extra touch to your
  21.         batch file programs.  It makes a difference to the ordinary 'CLS'
  22.         command.
  23.  
  24.  
  25.     FADE  uses  DMA (direct memory access)  of the  screen display to
  26.     give a  fast and  smooth fade.  Detection  of the  type of screen
  27.     display  used, is made  automatically  i.e. colour or  monochrome
  28.     screen,     to  ensure  that  the  fade  program  will  work on  any
  29.     configuration of machine.
  30.  
  31.  
  32.         It  is  designed to work with batch files  interfaced  using  the
  33.         ERRORLEVEL.   Users can create their own customised  batch  files
  34.         which will  allow them clear the screen in a new way.
  35.  
  36.  
  37.         To look at the list of options available issue the command:-
  38.  
  39.                   FADE <RETURN>    ; this will display the usage
  40.  
  41.  
  42.         To clear the screen use:-
  43.  
  44.                   FADE s c         ; where 's' is the speed and 'c'
  45.                                    ; is the character to clear the screen to
  46.                                    ; s=(1-9)      c=(any character)
  47.                                      1=SLOW
  48.                                      2= ..
  49.                                      3= ..
  50.                                      4= ..
  51.                                      5= ..
  52.                                      6= ..
  53.                                      7= ..
  54.                                      8= ..
  55.                                      9=FAST
  56.  
  57.  
  58.                          Examples
  59.                               ~~~~~~~~~~
  60.  
  61.                   FADE 1 █    - clears to screen of blocks slowly
  62.           FADE 9 !      - clears to screen of plings quickly
  63.           FADE 5 \      - clears to screen of backslashes medium speed
  64.           FADE 9        - clears to screen of spaces quickly
  65.  
  66.  
  67.                                 Using FTEST.BAT
  68.                                ~~~~~~~~~~~~~~~~~
  69.  
  70.         FTEST.BAT is a batch file program which shows the typical
  71.         applications for which FADE can be used.
  72.  
  73.         To run FTEST use:-
  74.  
  75.                 FTEST <Return>
  76.  
  77.  
  78.         FTEST may be slow  depending on the area of the floppy disk it is
  79.         positioned   because  it needs to  access FADE.COM  a few  times.
  80.         In your  own  programs  you may  only need to access  FADE.COM  a
  81.         few times  so this  should not be a problem.  If your batch files
  82.         will   access FADE.COM  a  great  deal then you   should   either
  83.         put  FADE.COM  onto a 'ramdisk' or your hard disk to  offer  best
  84.         efficiency.
  85.  
  86.  
  87.                            Using the ERRORLEVEL value
  88.                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89.  
  90.         FADE returns an ERRORLEVEL value depending on what happened  when
  91.         it was called, which can then be used by batch files:-
  92.  
  93.         batch file extract,
  94.  
  95. FADE 1 █                        ; batch file runs FADE to clear screen
  96. IF ERRORLEVEL==255 GOTO NOPARMS ; wrong parameters
  97. IF ERRORLEVEL==0 GOTO CLEAROK   ; the screen cleared OK
  98.  
  99.  
  100.         The  method  is  to call FADE and then check  the  ERRORLEVEL  to
  101.         determine  what  actually happened  i.e. everything OK, incorrect
  102.     mode (so the program can't possibly fade it), etc.
  103.  
  104.         You don't have any excuse for writing those batch files now!,
  105.  
  106.         Enjoy!
  107.