Program WS_2_Ascii;

{$C-,K-,V-}

{                    Copyright (c)  John Friel III


       Converts files created by WordStar in (D)ocument mode to
       Non document files by stripping the high bit of every byte
       in the file.  This program may be modified in any way to
       suit your personal tastes.  You are also encouraged to pass
       this program on to anyone provided the source code is unmodified.
       Please keep an unmodified copy around just for this purpose.
       For more information on this program or mode detailed info
       on interfacing TURBO Pascal with the I.B.M. PC (r) or
       Compatibles (this was developed on a Tava PC!) write to:

                   John Friel III
                   715 Walnut Street
                   Cedar Falls, Iowa  50613


}

Const
  Color            = true;
Type
  Names            = String[80];
  Screen_Array     = Array [1..4000] of byte;
  regpack          = record
                       ax,bx,cx,dx,bp,si,di,ds,es,flags: integer;
                     end;
  mem_ptr          = ^pointer_type;
  pointer_type     = array [1..2] of integer;
  fname_type       = record
                       name   : string[8];
                       period : char;
                       ext    : string[3];
                     end;
  dir_type         = array [1..122] of fname_type;

Var
  InFile, OutFile               : Text;
  x, i, y, q, in_X, in_Y,
  out_X, out_Y, e, w            : Integer;
  total_chars, total_words  