Taken from the disk distributions archived at http://ftp.whtech.com/Geneve/9640 News disks v1-3/pc99 disks/

November 1992

SDBMAN






                       SDB - a Simple Database System

                              by David Betz
                            114 Davenport Ave.
                           Manchester, NH 03103
                              (603) 625-4691

                        Converted to the IBM/PC by
                              David N. Smith
                            44 Ole Musket Lane
                            Danbury, CT  06810
                              (203) 748-5934


        1.0  INTRODUCTION

        SDB is a simple database manager for small systems.  It  was
        developed  to  provide  a relatively low overhead system for
        storing data  on  machines  with  limited  disk  and  memory
        resources.   The current version runs on a PDT-11/150 with 2
        RX01 floppy disk drives and 60K bytes of  memory  under  the
        RT-11 operating system.  (it also runs on the VAX under VMS)

        SDB was originally intended  to  be  a  relational  database
        system, so many of the terms used in describing it are taken
        from the relational database literature.  Within the context
        of SDB the user can safely make the following associations:

             1.  RELATION can be taken to mean FILE

             2.  TUPLE can be taken to mean RECORD

             3.  ATTRIBUTE can be taken to mean FIELD

        It should be noted that SDB is not a  relationally  complete
        system.   It  provides  the relational operations of SELECT,
        PROJECT, and JOIN, but does not provide the  set  operations
        of  UNION,  INTERSECTION,  or  DIFFERENCE  as  well  as some
        others.


        2.0  RELATION FILE FORMATS

        SDB maintains a separate file for  each  relation  that  the
        user  creates.  This file contains a header block containing
        the definition of the relation including the names and types
        of  all  of the relation's attributes.  The remainder of the
        file contains fixed length records each containing one tuple
        from the relation.

        Tuples can be of three types:

             1.  active - tuples that contain actual active data

             2.  deleted - tuples that have been deleted

             3.  unused - tuples that haven't been used yet

        SDB - a Simple Database System                        Page 2


        Initially, all tuples are  unused.   When  a  new  tuple  is
        stored  into  a  relation,  the  first unused tuple is found
        (they are all contiguous at the end of the  relation  file).
        The new tuple is stored as an active tuple.

        When a tuple is deleted, it is marked as  such.   The  space
        previously  allocated  to  the  deleted tuple is left unused
        until the relation is compressed.

        It is possible that when attempting to store a new tuple, no
        unused  tuple can be found even though the relation contains
        fewer than the maximum active  tuples.   This  happens  when
        tuples  have  been  deleted since the time the relation file
        was last compressed.

        The compress function  allows  all  of  the  space  lost  by
        deleting tuples to be regained.  It does this by copying all
        of the active tuples as far backward in the file as possible
        leaving  all  of  the  available space toward the end of the
        file.



        3.0  SELECTION EXPRESSIONS

        A selection expression specifies a set of tuples over  which
        some  SDB  operation  is  to  be executed.  The syntax for a
        selection expression is:

        <rse>           ::= <rnames> [ where <boolean> ]
        <rnames>        ::= <rname> [ , <rname> ] ...
        <rname>         ::= <relation-name> [ <alias> ]

        When a single relation name  is  specified  in  a  selection
        expression,  each  tuple  within  that  relation  becomes  a
        candidate for selection.

        When more than one relation name is  specified,  the  tuples
        are  formed  by  taking  the  cross product of all specified
        relations.  If a relation is to be crossed with  itself,  an
        alias must be given to one or both of the occurances of that
        relation name in the selection expression.  This allows  SDB
        to determine which relation occurance is being refered to in
        the boolean part of the selection expression.

        After the set of candidate tuples is determined, the boolean
        expression  is evaluated for each candidate.  The candidates
        for which the boolean expression evaluates  to  TRUE  become
        the selected tuples.

        SDB - a Simple Database System                        Page 3


        4.0  INITIALIZATION FILE AND COMMAND FILES

        When SDB is first run,  it  attempts  to  read  and  process
        commands  from  a  file  named "SDB.INI".  This file usually
        contains macro definitions, but can contain  any  valid  SDB
        command.   In  addition,  it  is possible to process command
        files from within SDB.   This  is  done  by  typing  an  '@'
        followed by the command file name after the SDB prompt.



        5.0  FILE NAMES

        Whenever a file name is allowed in the syntax for a command,
        it  is  possible  to  use  either  an identifier or a quoted
        string.  An identifier is interpreted as the file name and a
        string  is  interpreted  as  a full file specification.  The
        string form allows for the  specification  of  an  alternate
        device or extension.



        6.0  FORM DEFINITION FILES

        A form  definition  file  contains  a  template  into  which
        attribute  values  are substituted during a print operation.
        There are two types of information that can be included in a
        form definition:

             1.  Literal text

             2.  Attribute references

        Attribute references are indicated by placing  the  name  of
        the  attribute  being  referenced  between  a  pair of angle
        brackets.  Literal text is anything that is not enclosed  in
        angle brackets.

        SDB - a Simple Database System                        Page 4


        Example:
        ________

        print using test amount,category from checks;

        Where test.frm contains:

        Amount: <amount>
        Category: <category>


        7.0  ALIASES FOR RELATIONS AND ATTRIBUTES

        When a relation or attribute name is specified  in  a  print
        statement,  it  is possible to provide an alternate name for
        that relation or attribute.  This is useful  for  relations,
        when  it  is  necessary to join a relation to itself.  It is
        useful for attributes when it is  desired  that  the  column
        headers  in  a  table be different from the actual attribute
        names.  Also, alternate  attribute  names  can  be  used  in
        references  to that attribute in the where clause as well as
        in a  form  definition  file.   The  syntax  for  specifying
        aliases is:

            <name> <alias>


        Example:
        ________

        print using test amount a,category c from checks;

        Where test.frm contains:

        Amount: <a>
        Category: <c>
  
        SDB - a Simple Database System                        Page 5


        8.0  BOOLEAN EXPRESSIONS

        The syntax for boolean expressions:

        <expr>          ::= <land> [ '|' <land> ]
        <land>          ::= <relat> [ '&' <relat> ]
        <relat>         ::= <primary> [ <relop> <primary> ]
        <primary>       ::= <term> [ <addop> <term> ]
        <term>          ::= <unary> [ <mulop> <unary> ]
        <unary>         ::= <factor> | <unop> <unary>
        <factor>        ::= <operand> | '(' <expr> ')'
        <operand>       ::= <number> | <string> | <attribute>
        <attribute>     ::= [ <rname> . ] <aname>
        <relop>         ::= '=' | '<>' | '<' | '>' | '<=' | '>='
        <addop>         ::= '+' | '-'
        <mulop>         ::= '*' | '/'
        <unop>          ::= '+' | '-' | '~'


        Operators:

             1.  '=' - equal

             2.  '<>' - not equal

             3.  '<' - less than

             4.  '>' - greater than

             5.  '<=' - less than or equal

             6.  '>=' - greater than or equal

             7.  '+' - addition or unary plus (not implemented)

             8.  '-' - subraction or unary minus (not implemented)

             9.  '*' - multiplication (not implemented)

            10.  '/' - division (not implemented)

            11.  '&' - logical and

            12.  '|' - logical or

            13.  '~' - logical not

        Operands:

             1.  number - a string of digits containing at most  one
                 decimal point

             2.  string - a string of characters enclosed in  double
                 quotes
  
        SDB - a Simple Database System                        Page 6


             3.  attribute - an attribute name optionally  qualified
                 by a relation name

  
        SDB - a Simple Database System                        Page 7


        9.0  INTERACTIVE COMMAND DESCRIPTIONS

        Function:
        _________

        Create a relation file


        Format:
        _______

        create <rname> ( <alist> ) <size>


        Rules:
        ______

             1.  <rname> is the name of the relation file

             2.  <alist> is a list of attribute definitions  of  the
                 form:

                   <aname> { char | num } <size>

                 where:

                 1.  <aname> is the name of the attribute

                 2.  the type of the attribute is either  "char"  or
                     "num"

                 3.  <size> is the number of bytes allocated to  the
                     attribute value


             3.  <size> is the maximum number of tuples the file  is
                 to hold



        Example:
        ________

        create checks (
            number      num     4
            date        char    8
            payee       char    20
            amount      num     8
            category    char    5
        ) 200

        This command creates a relation file named "checks.sdb" with
        attributes   "number",   "date",   "payee",   "amount",  and
        "category" and space to store 200 tuples.
  
        SDB - a Simple Database System                        Page 8


        Function:
        _________

        Insert tuples into a relation


        Format:
        _______

        insert <rname>


        Rules:
        ______

             1.  <rname> is the name of a relation

             2.  the user will be prompted for  the  values  of  the
                 attributes for the tuple to be inserted

             3.  a  null  response  to  an  attribute  prompt   will
                 terminate tuple entry

             4.  if a null value is desired, a single space  can  be
                 entered

  
        SDB - a Simple Database System                        Page 9


        Function:
        _________

        Delete tuples from a set of relations


        Format:
        _______

        delete <rse> ;


        Rules:
        ______

             1.  <rse> is a tuple selection expression

             2.  selected tuples are deleted



        Example:
        ________

        delete checks where category = "junk";
  
        SDB - a Simple Database System                       Page 10



        Function:
        _________

        Update the values of selected attributes in selected tuples


        Format:
        _______

        update { <attrs> | * } from <rse> ;


        Rules:
        ______

             1.  <attrs> is a list of attribute names to be updated

             2.  * means all attributes

             3.  <rse> is a tuple selection expression

             4.  for each  set  of  selected  tuples,  the  user  is
                 prompted for new values for the selected attributes

             5.  a null response to an attribute prompt will  retain
                 the previous attribute value

             6.  if a null value is desired, a single space  can  be
                 entered



        Example:
        ________

        update amount,category from checks where number > 10;
  
        SDB - a Simple Database System                       Page 11


        Function:
        _________

        Print a table of values of selected attributes


        Format:
        _______

        print [ using <fname> ] { <attrs> | * } from  <rse>  [  into
        <fname> ] ;


        Rules:
        ______

             1.  using  <fname>  indicates  output  using   a   form
                 definition file (.FRM)

             2.  <attrs> is a list of attribute names to be printed

             3.  * means all attributes

             4.  <rse> is a tuple selection expression

             5.  <fname> is the name of an file to which  the  table
                 will be output (.TXT)

             6.  if the output file name is omitted,  output  is  to
                 the terminal

             7.  for each set of selected tuples, a table  entry  is
                 printed containing the selected attributes



        Example:
        ________

        print payee,amount from checks where category = "junk";
  
        SDB - a Simple Database System                       Page 12


        Function:
        _________

        Import tuples from a file into a relation


        Format:
        _______

        import <fname> into <rname>


        Rules:
        ______

             1.  <fname> is the name of the input file (.DAT)

             2.  the input file contains the  values  of  the  tuple
                 attributes with each on a separate line

             3.  <rname> is the name of a relation

             4.  tuples are appended to the named relation

  
        SDB - a Simple Database System                       Page 13


        Function:
        _________

        Export tuples from a relation into a file


        Format:
        _______

        export <rname> [ into <fname> ] ;


        Rules:
        ______

             1.  <rname> is the name of a relation

             2.  <fname> is the name of the output file (.DAT)

             3.  if the output file name is omitted,  output  is  to
                 the terminal

             4.  tuples are written to  the  output  file  with  one
                 attribute value per line

  
        SDB - a Simple Database System                       Page 14


        Function:
        _________

        Extract the definition of a relation into a file


        Format:
        _______

        extract <rname> [ into <fname> ] ;


        Rules:
        ______

             1.  <rname> is the name of a relation

             2.  <fname> is the name of the output file (.DEF)

             3.  if the output file name is omitted,  output  is  to
                 the terminal

             4.  the definition of the relation is  written  to  the
                 output file

  
        SDB - a Simple Database System                       Page 15


        Function:
        _________

        Compress a relation file


        Format:
        _______

        compress <rname>


        Rules:
        ______

             1.  <rname> is the name of a relation file

             2.  tuples are copied toward the front of the  relation
                 file  such  that  any  space  freed  by  previously
                 deleted tuples becomes adjacent to the  free  space
                 at the end of the file, thus becoming available for
                 use in inserting new tuples

  
        SDB - a Simple Database System                       Page 16


        Function:
        _________

        Sort a relation file


        Format:
        _______

        sort <rname> by <sname> { , <sname } ...  ;


        Rules:
        ______

             1.  <rname> is the name of a relation file

             2.  <sname> is the name of  an  attribute  to  sort  on
                 followed optionally by "ascending" or "descending"

             3.  if a sort order  is  not  specified,  ascending  is
                 assumed

             4.  tuples within the  relation  are  sorted  in  place
                 using the attributes indicated

  
        SDB - a Simple Database System                       Page 17


        Function:
        _________

        Define a macro


        Format:
        _______

        define <mname>


        Rules:
        ______

             1.  <mname> is the name of the macro being defined

             2.  if a macro with the specified name already  exists,
                 it is replaced

             3.  after entering the define command, definition  mode
                 is entered

             4.  definition  mode  is  indicated   by   the   prompt
                 "SDB-DEF>"

             5.  all lines typed in definition mode are added to the
                 macro definition

             6.  a blank line terminates definition mode

             7.  a macro can be deleted by entering a blank line  as
                 the only line in the definition

             8.  after a macro is defined, every  occurance  of  the
                 macro name is replaced by the macro definition

  
        SDB - a Simple Database System                       Page 18


        Function:
        _________

        Show a macro definition


        Format:
        _______

        show <mname>


        Rules:
        ______

             1.  <mname> is the name of a macro whose definition  is
                 to be shown

  
        SDB - a Simple Database System                       Page 19


        Function:
        _________

        Print a short help message



        Format:
        _______

        help


        Rules:
        ______

             1.  (none)

  
        SDB - a Simple Database System                       Page 20


        Function:
        _________

        Exit from SDB


        Format:
        _______

        exit


        Rules:
        ______

             1.  (none)

  
        SDB - a Simple Database System                       Page 21


        10.0  PROGRAM INTERFACE

        SDB provides a callable program interface to allow  programs
        written  in  DECUS-C  to access relation files.  In order to
        use the call interface, the users program should  be  linked
        with  the SDBUSR.OBJ object library.  Also, additional stack
        space should be allocated at link  time  using  the  /BOTTOM
        qualifier  on  the link command.  /BOTTOM:3000 seems to work
        well, but it is probably possible to get away with less.

        Example:
        ________

        #include <stdio.h>
        #include "sdb.h"

        main()
        {
            DB_SEL *sptr;
            char payee[100],amount[100];

            /* setup retrieval */
            if ((sptr = db_retrieve("checks where amount > 25.00")) == NULL) {
                printf("*** error: %s ***\n",db_ertxt(dbv_errcode));
                exit();
            }

            /* bind user variables to attributes */
            db_bind(sptr,"checks","payee",payee);
            db_bind(sptr,"checks","amount",amount);

            /* loop through selection */
            while (db_fetch(sptr))
                printf("%s\t%s\n",payee,amount);

            /* finish selection */
            db_done(sptr);
        }

        SDB - a Simple Database System                       Page 22


        Function:
        _________

        Setup a tuple retrieval context


        Format:
        _______

        dbptr = db_retrieve(sexpr [ ,arg ]...)


        Rules:
        ______

             1.  sexpr is a pointer to a string containing an rse

             2.  arg is a "printf" argument

             3.  dbptr is a database context pointer

             4.  db_retrieve returns NULL on errors

             5.  on errors, the error code is in dbv_errcode


        SDB - a Simple Database System                       Page 23


        Function:
        _________

        Fetch the next set of tuples from a retrieval context


        Format:
        _______

        db_fetch(dbptr)


        Rules:
        ______

             1.  dbptr i

DOCS


       CREATE A DISK WITH THE VOLUME NAME MURDER THEN COPY FILES TO IT.
       THIS PROGRAM IS AN OLD TI PROGRAM THAT HAS BEEN MODIFIED TO RUN IN
       MYBASIC WITH GRAPHICS, WHICH ARE MYBASIC SCREENS CAPTURED BY A SOON
       TO BE RELEASED PROGRAM PACKAGE  PXLGRAB  WHICH IS A SISTER PROGRAM
       PACKAGE TO GRABBER(WATCH FOR NEWSBYTE IN MICROPENDIUM FOR GRABBER)
       I BELIEVE WITH THE RELEASE OF GRABBER AND SOON TO BE RELEASED
       PXLGRAB THE DESIGN OF MYBASIC AND MDOS PROGRAMS WILL TAKE ON THE
       LOOK OF PC PROGRAMS.
       ENJOY,

       JIM UZZELL
       DDI SOFTWARE
       615 ASHE ST.
       KEY WEST, FL. 33040

WINDOWDOC

WINDOWS 9640

(c) 1989,1990 by Beery W. Miller and 9640 News
    All Rights Reserved


INSTALLATION

Package Components

     o    Reference Manual

     o    WINDOWS Diskette


     The enclosed diskette contains your personalized copy of WINDOWS 9640 with
your name and serial number embedded. Attempting to modify this information
under certain conditions will either lock your system up on initial loading, or
could cause SEVERE results after having used WINDOWS for any length of time.



o    To Install WINDOWS on a Hard Drive System

     A batch file has been written (Filename = INSTALL) to support the creation
of a sub-directory (WIN) and copies all the necessary files to the hard drive.
A batch command file (DIS/VAR 80 format) called WINDOWS will load and run the
necessary software, when called from the root directory of the hard drive.


o    Getting Started

     Loading WINDOWS 9640

     WINDOWS 9640 currently supports both the keyboard (discussed later) and
the mouse port on the 9640 using an independent mouse driver.  Future support
is being looked at for the use of joystick, trackball, and Asgard's RS232 based
mouse as standalone drivers that will replicate the Myarc Mouse, but no
promises or guarantees are being made.

     - Using a mouse driver

     The mouse driver enclosed is a standalone product developed by Bruce
Hellstrom and used in conjunction with WINDOWS and any other WINDOWS developed
software.

     The mouse driver (Filename = MOUSE), controls all mouse displays when in
an active state.  For additional information regarding the mouse driver, a
programming package will be issued in the future with all relative
information.

     - To Execute without a Driver

     To execute WINDOWS without a driver installed, WINDOWS will prompt a
question if you are using a driver, the built in driver, or the keyboard.
Selecting the keyboard makes the following keys active, the 4 arrow keys, F8,
F9, and F10.  The latter three keys will correspond to the Left, Middle, and
Right buttons of the mouse in all subsequent discussion and will not be
repeated again.

     Selecting D for Default driver at the initial loading screen, will provide
the necessary mouse code for WINDOWS for use in Graphics modes.  Under certain
conditions, a newly loaded program may elect to change graphics/text modes and
make the mouse pointer invisible.  During this time that the mouse is
invisible, it is still active, but difficult to control.  The mouse driver
solves these problems and is recommended for all usage as it provides support
under these circumstances by providing a reference symbol to indicate the
position of the mouse.  These same conditions also hold true when using the
keyboard.


A General Discussion of WINDOWS


     WINDOWS 9640 is a program with multiple functions and features.  As
written, WINDOWS itself requires 64K of user memory, and the driver, if
present, requires an additional 16K.  With more memory that is available,
obtained under the following circumstances, the greater the capabilities of
WINDOWS;

          1) User has disabled TIMODE
          2) User has no internal RAMDISK or SPOOLer
          3) User has added the additional 32K, 0 wait state memory.
          4) User has modified the Myarc 512K memory expansion card.
          5) User has the MEMEX card by Ron Walters / Bud Mills.


Once WINDOWS has loaded, your serial number and the owner of the original copy
will be displayed if a driver is not installed.

     CAUTION:  DO NOT MAKE ANY ATTEMPT TO MODIFY THIS INFORMATION.  ATTEMPTING
TO DO SO, WILL CAUSE SEVERE PROBLEMS NOT ALWAYS IMMEDIATELY NOTICED!!!!


     You will then be prompted for the use of the mouse driver, keyboard, or
the built in mouse default code.

     Select at the prompt:
               
               Y = Mouse Driver           RECOMMENDED, if installed
               N = No driver, use keyboard
               D = Use default driver


     In order to resolve the many various MDOS versions that users have in
their possession, numerous tables are polled to obtain your system
identification.  If a mismatch occurs, the initial prompt after loading WINDOWS
will comment that "DOS WINDOS IS NOT INSTALLED".  This means the ability to
toggle to MDOS from WINDOWS and back is not active.  More on this later.

     In addition, WINDOWS will read your system screen parameters.  Those
people that boot in 40 column text mode will have their system screen tables
modified to the lower resolution.  If you boot in 80 column text mode (or
anything other 40 column text), you will be permitted to use the maximum
capabilities of WINDOWS.  Composite and TV monitors will experience problems
using this higher resolution.  Use your judgement as conditions vary from
monitor to monitor.


     If you have made it this far, then the power you possess is ready to be
released.  With the initial option screen, you will see the following:

          1) Repartition Screen
          2) System Information
          3) File Options
          4) Disk Options
          5) Load Task
          6) MDOS Window
          7) Exit - DeInstall

How to Select an Option

     In order to resolve the many different keyboards, mouses, and other future
drivers, all options on the menus are selected either thru the keyboard with
the arrow keys and F8, F9, F10, or the drivers that exist.  The right mouse
button (or F10 key) corresponds to the equivalent of an <ENTER> keypress and
automatically processes the option that it was on.  The left mouse button (or
F8 key) backs the option out one menu with it being active most of the time the
mouse is being displayed.  In addition, any option that prompts for a keypress
to initiate a command, the ESC is also active to void that command, along with
the equivalent of the left mouse button (or F8 key).  The middle mouse button
is only used in a few special cases and will be commented later when it is
needed.


       1) Repartition Screen

               1) Set Window Mode
                         - Resets WINDOWS display to your default parameters
                         - Used when another program modifies the screen tables
               2) Set 80 Columns
                         - Sets screen to 80 column text mode
               3) Set 40 Columns
                         - Sets screen to 40 column text mode
               4) Toggle Tasks
                         - This option allows one to toggle any program that
                           has been previously loaded with the LOAD TASK option
                           (initial menu, opt # 5) into the run state
                           (multitasking with any other program)
                         - multiple programs can be selected from this screen,
                           if they are already loaded.

                  NOTE:  This option (Toggle Tasks) can be tricky for various
                  reasons as described below.
                  
                  a) To exit from this WINDOW, select either WINDOWS or the
                  left mouse button.  If you select WINDOWS, this disables all
                  other tasks.  If you select the left mouse button, you will
                  then disable the majority of WINDOWS routines and activate
                  those programs selected, until you re-activate it again.
                  This is done by holding the LEFT ALT key and then pressing
                  the LEFT SHIFT key with the LEFT ALT in the down position.
                  Pressing this key sequence disables all programs except for
                  WINDOWS and turns control of the computer back to WINDOWS.
                  
                  
               5) Park Hard drives
                         - this feature pulls up an additional window of
                           various hard drives (both the Wincheseter
                           personality card and the HFDC by Myarc) that
                           effectively forces the system to read the very last
                           accessible sector on the hard drive and then
                           positions the hard drive head over that last block
                           of information.  It the drive were to then crash,
                           the only information damaged would be that block
                           that is empty, unless you have a 99% packed hard
                           disk.

                           
               6) Resize Window
                         - this option will only work for those programs that
                           have been written to use WINDOWS.  This option will
                           not control the video displays and keyboard inputs
                           associated with programs that do not access WINDOWS
                           special code.
                         - to use this option, the middle button on the mouse
                           selects your upper left corner of the window, and
                           right button selects the lower right corner, then
                           pressing the left button exits this resize option.


               7) Toggle Screen
                         - toggles to video page 2 with right mouse button.
                         - Use middle mouse button to toggle back to the
                           normal page for Windows (this option used to
                           look at graphics that have been used by other
                           programs and left button to return to a display
                           menu.

               8) Exit - DEINSTALL WINDOWS
                         - exits back to MDOS, or to any current running task.

       2) System Information

          Selection of this option displays the current version, the legal
          owner's name, serial number, and the author of WINDOWS.   
                          - press any key or mouse button to exit.


       3) File Options
               1) Directory
                         - Used to catalog any floppy device
               2) Unprotect File
                         - type in any valid MDOS Filename and path and the
                           file will be unprotected
               3) Delete File
                         - type in any valid MDOS Filename and path and the
                           file will be deleted.
               4) Protect File
                         - type in any valid MDOS Filename and path and the
                           file will be protected.
               5) View File
                         - type in any valid MDOS Filename and path and the
                           screen will be cleared and toggled to 80 column
                           text mode and the file displayed, 20 lines at a
                           time.
               6) Rename File
                         - type in any valid MDOS Filename and path for the
                           file to be renamed, and then ONLY the new Filename
                           WITHOUT the path for the new name.


       4) Disk Operations
               1) Format Floppy
                         - selects from menu's the drive you wish to format and
                           then the floppy specifications (SS/SD, DS/SD, DS/DD,
                           and DS/QD).  At the final prompt, the LEFT mouse
                           button, or the ESC key will exit the options without
                           implementing the routine.
               2) Clone Floppy
                         - selects from menu's the source and target drives you
                           wish to clone.  This option requires that the target
                           drive have enough sectors available for the copy (Do
                           not copy a DS/SD disk to a SS/SD disk, or to the
                           same drive).
               3) Sweep Floppy
                         - erases all files on any standard floppy disk format
                           if it is SS/SD, DS/SD, DS/DD, or DS/QD.  Other
                           formats are not supported as they may contain
                           'special' information.
               4) Create Dir
                         - creates a directory with the specified name entered
                           on any device.


                          ex, to create a Directory called FORTRAN on DSK1, the
                          following formats are legal

                          A:FORTRAN
                          DSK1.FORTRAN

               5) Remove Dir
                         - removes an empty directory from any device


                         ex, to remove a Directory called FORTRAN on DSK1, the
                         following formats are legal

                         A:FORTRAN
                         DSK1.FORTRAN

               6) Rename Disk
                         - displays the volume name of any disk pointed to and
                           prompts for a new disk name.  If nothing is entered,
                           the name is not modified

               7) Rename Dir
                         - renames a directory on any device or pathanme

                         ex, to rename a directory called TELCO on your hard
                         drive system with the following pathame, F:COMM.TELCO,
                         you would enter at the first prompt any of the
                         following formats:
               
                         F:COMM.TELCO
                         HDS1.COMM.TELCO

                         and then specify the new directory name excluding the
                         pathname of the file, such as XMODEM (10 chars max)



       5) Load Task

          This option is one of the most powerful features and will sometimes
          be very confusing unless events are planned.  Described below is what
          the LOAD Task can and can not do.
          
          
          CAN DO
          
          Any program that DOES NOT depend on command line arguments may be
          loaded thru this option.  Any program currently written that resets
          the screen mode will have some difficulty.  Many programs reset the
          mode, or modify it, but WINDOWS has tried to resolve these problems
          in it's coding whenever it can.
          
          WINDOWS is designed to run as what may be referenced as the MDos
          Shell of multiple programs.  Programs are under development and will
          be released in 9640 News, a disk magazine by the author of this
          program that will utilize the functions and capabilities of WINDOWS.
          
          In addition, other notable programmers have already requested
          information on using Window's routines.
          
          CAN'T DO
          
          WINDOWS can not 'multi-task' with programs that have set the Geneve's
          interrupts to an OFF state.  An example of such a program is the GPL
          Interpreter for the 9640.  GPL can be loaded and executed thru
          WINDOWS, and upon exit of GPL, Windows will be active, but not when
          GPL is still running.  One option of WINDOWS, called RESIZE Window,
          will not function with any previously written MDOS program, or any
          program that does not call and request WINDOW's special code.  Those
          programs that do request the necessary code will have no problems,
          with the exception of WINDOWS itself which takes care of itself.
          
          Programs that write directly to the Video Display Processor that do
          not use the recommended MDOS display routines may have problems, when
          screen modes are changed.
          
          With the memory constraints of WINDOWS and attempting to still permit
          users to have enough CPU available to run two additional programs
          simultaneously, support for saving the screen images of each program
          was not provided.  Future support is being looked into as the amount
          of available CPU increases for Memory Expanded systems, and for users
          that have opted to expand with one of several (?) video expansion
          cards that may be developed.
          
          
       6) MDOS Window

          Permits toggling to the MDOS Command Line Interpreter (CLI) and
          performing any needed activity.  Loading any program while in this
          MDOS Window, will permit the CLI to multi-task with the newly loaded
          program until which time you press the LEFT ALT key and remain
          holding and pressing the LEFT SHIFT key.  Windows and the newly
          loaded program (if you loaded one), would then multi-task with one
          another.  Using this option to load a program removes control from
          WINDOWS of controlling that newly program.
          

      7) Exit - Deinstall

          Exits to MDOS.  Use the & (AMPERSAND) key or an AUTOEXEC file to
          recover additional memory that WINDOWS or a driver will no longer
          be using.
          
          
          
APPENDIX A

Listed below is the available information being made with the purchase of
WINDOWS 9640 on using the Assembly language support code.  WINDOWS support code
can be accessed using the MDOS XOP call in the following format:   

ELEVEN DATA 11
START  .       (Your paramaters and code)
       .
       .
       .
       XOP  @ELEVEN,0 

Programs that utilize any WINDOWS supported code should not use any of the
following memory space of any program they write.

     >0000 to >03FF
     >E000 to >E9FF
     >F040 to >F214

The rest of available memory is available.  These memory chunks being reserved
represent buffers, internal workspaces, and other tables that are necessary to
control a program in the multi-tasking state.  Writing any information into
these areas could be harmful to any screen display.


Due to MDOS's internal structure and requirement and the additional constraints
needed for WINDOWS, every task must have an available page of memory mapped
into the address range of >E000 to >FFFF with a workspace located in one of the
available locations of that page of memory.

Detailed below is information regarding the MDOS assembly language support
code.


***********************************************************
* Opcode >00   Acquire Multi-tasking page for Windows 9640*
*      R1 = MUST BE CLEARED FOR FUTURE EXPANSION          *
*      R2 = MUST BE CLEARED FOR FUTURE EXPANSION          *
*                                                         *
***********************************************************

     -  Sets up the necessary screen tables and buffers necessary for WINDOWS
        to multi-task.  This should be the first opcode called of any access
        to this library from each running program.

***********************************************************
* OPCODE >01       TEXT DISPLAY                           *
* TEXT AT >E400 is automatically displayed, null terminated
*                                                         *
* CLR R1 FOR EXPANSION                                    *
* CLR R2 FOR EXPANSION                                    *
*                                                         *
***********************************************************

     - text should be located at >E400, null terminated (it's o.k. to write in
       this space (254 bytes max) for any displays to the appropriate window.

***********************************************************
* KEYIN ROUTINE FOR ACCEPTING/PRINTING TEXT               *
* R0 =>02                                                 *
* R1 = STRING LENGTH                                      *
* CLR R2 FOR EXPANSION                                    *
* CLR R3 FOR EXPANSION                                    *
*                                                         *
* RETURNED                                                *
* Beginning at >E100 is the string entered, null terminated
***********************************************************

     - this opcode invokes a routine that will accept and display keyboard
       input (and store it at >E100) with delete, backspace, and other multiple
       functions commonly associated with normal keyboard entry.

     - string is null terminated (254 bytes max)

***********************************************************
* Opcode >03   Forces window to your defined positions    *
* R0 = >03                                                *
* R1 = top row                                            *
* R2 = left column                                        *
* R3 = bottom row                                         *
* R4 = right column                                       *
***********************************************************

     - this opcode redefines your WINDOW to the new parameters that you define
       without regard to any other program running.


***********************************************************
* Opcode >04      no parameters                           *
* Shut multi-tasking off                                  *
***********************************************************

     - turn multi-tasking capability off in your program.


***********************************************************
* Opcode >05      no parameters                           *
* Turn multi-tasking on                                   *
***********************************************************

     - turn multi-tasking capability on in your program if it was previously
       turned off.  The default loading parameters are always on.

***********************************************************
* Opcode >06    40/80 screen Toggle    WINDOWS call only  *
*                                                         *
***********************************************************

     - this call, usable only within WINDOWS, toggles the buffers within the
       XOP to be mapped for the appropriate screen positions.  Not usable in
       any other program.

***********************************************************
* Opcode >07    Drop Task Windows and parameters          *
*  Removes WINDOWS's task from XOP code                   *
*  No   parameters required                               *
***********************************************************

     - removes all buffers from Windows internal code when it was called with
       opcode >00

***********************************************************
* OP >08    BOXIT WITH PARAMETERS PASSED FOR LOCATIONS    *
* Used to frame in Graphics mode a box for later text     *
* R0 = >08                                       printing *
* R1 = TLCX    top left corner X                          *
* R2 = TLCY    top left corner y                          *
* R3 = BRCX    bottom right corner x                      *
* R4 = BRCY    bottom right corner y                      *
* R5 = COLORS  foreground/background colors  >ffbb        *
* CLR R6 FOR EXPANSION                                    *
***********************************************************

     - this option displays a framed WINDOW that is seen in WINDOWS frequently.
     - use OP >02 to print text into a newly defined box

***********************************************************
* Opcode >09             Drop Last called Window          *
* Erase WINDOW display with last background color         *
*      R0 = >09                                           *
***********************************************************

     - use this opcode to erase the Window created with opcode >08

***********************************************************
* Opcode >0A                                              *
* Activate WINDOWS 9640 from Sleeping state               *
***********************************************************

     - take WINDOWS into multi-tasking state

***********************************************************
* Opcode >0B                                              *
* Deactivate WINDOWS 9640 to sleeping state               *
***********************************************************

     - take WINDOWS out of multi-tasking state and only allow your program to
       run. 

***********************************************************
* Opcode >0D    Task 0 pages                              *
* Returns at >E610 list of all tasks 0 pages              *
***********************************************************

     - returns a list at >E610 of all task header pages called from Opcode >00,
       8 bytes in length

***********************************************************
* Opcode >0E    Task 0 pages                              *
* Returns at >E618 list of all tasks 7 pages              *
***********************************************************

     - returns a list at >E618 of all WINDOW pages with page 7 (>E000 to >FFFF)
       for WINDOWS internal support of various mapping across programs 



Notes from the Author

WINDOWS 9640 has expanded further than it was ever dreamed about for several
reasons.  The majority of those reasons have been from YOU asking for options,
utilities, features to further enhance this program.

In it's original concept, WINDOWS, was being developed to provide supporting
software for multi-tasking on the Geneve without each program playing havoc
with the screen, keyboard, cursor position, and numerous other 'problems'.
Those problems have been solved if you are using WINDOWS code.  Controlling the
entire Geneve system has been extremely difficult, with the limited information
that has been made public.

I would like to thank the following people for their contributions that have
been invaluable to producing WINDOWS.  They are:

Paul Charlton, whom I first consulted to see if what I was thinking about
developing was even 'do-a-ble' on the Geneve, and some necessary information
that made it possible for the MDOS Windows toggle to be MDOS version
independent.

Bruce Hellstrom, the author of the first interrupt driven, mouse driver for the
Geneve that is providing the driver for inclusion in WINDOWS, and some
supporting information learned about the keyboard and direct access of the
keyboard.

Mike Dodd, a talented young individual that provided some additional insights
into the keyboard and direct access of the keyboard.

Al Beard, the author of 9640 Fortran, that provided beta testing, new ideas,
and concepts to be used in WINDOWS and the author of a MDOS debugger that
helped progress WINDOWS thru the initial stages. 

Tom Freeman, the author of DISkASSEMBLER, whom I am indebted with much
gratitude for developing a fine program that permitted the exploration of the
Geneve in great detail when a lot of information was still missing.

Michelle Miller, my wife that has allowed me spend many hours programming which
I am deeply indebted too.  Thanks Sheli.....


     And to anyone else that I may have left out, thank you too.

As I sit here putting the final touches to WINDOWS, many things can still be
done, and most likely will be.  When software updates occur, to either correct
bugs that may be found (I hope there aren't any), to include new suggestions,
or to add additional supporting multi-tasking code, you will be notified with a
postcard and a minimal update fee if required.  And to close this version, I
thank you for your purchase of WINDOWS 9640.



********************* Updates and Warranty ***********************************

Warranty - Any defective diskette or booklet will be repaired or replaced if
returned to 9640 News within 90 days.  9640 News will make the judgement as to
whether the diskette or software is defective and will either repair or replace
it at our option.  PLEASE MAKE AND USE A BACK UP COPY of your diskette for your
own personal use.  9640 News is not responsible for any damage incurred by the
use of WINDOWS 9640. 9640 News makes no warrants of the usefulness of this
program with any person's particular needs.