     ======================================================================
     Hacker Arts                                 Artists of the Imagination 
     ======================================================================
     Volume 1, No. 1                                        October 1, 1995
                                                            Early Release
     **********************************************************************
     Flaming Arts

     (* Flaming Arts is the editorial section of Hacker Arts.  It's where
     we, the writers, get to express our opinions on...well, anything we 
     please. *)
     
          "Mathematics", "science", "art", "hackers", and "the scope of
     this publication."  What do these terms have in common?  Answer:  this
     editorial is going to define each one so that the future use or
     practice of these terms within this publication will be completely
     understood.
     
          Let's start with "mathematics:"

          Mathematics: the study of computation.

          If that is not explicit enough, we'll go a little further and
     define the term "computation" to mean "the process of taking in
     information (sensory observations or informational opinions), making
     a judgment based on this information (processing), and initiating a
     consequential action (result)."  We will not in any way equate
     mathematics with the notation normally associated with the science
     (we prefer to label this notation "calculus").  Therefore, according
     to the Hacker Arts Unabridged Dictionary, the "language of science"
     is NOT mathematics.
     
          Next, let's define the term "science."  Here is our definition:
     
          Science:  the study of reality.
     
          That's it, end of story.  We will never use this term to describe
     any professional field of employment, any technological advancement,
     or any scientific publication.  According to our book, all it takes to
     be a scientist is to be thinking analytically (thus fulfilling the
     "study" part of the definition).  Let it be known that the writers of
     Hacker Arts cringe every time the writers of The X-Files include some
     dialogue berating "science" for ignoring the truth.  To us, this is a
     contradiction in terms.
     
          Art:  the creation of reality.
     
          We slipped that definition in without an introduction to let the
     reader make the transition from the last paragraph without our help. 
     Yup, that's our broad definition of the term "art."  To us (the
     writers), everything is art:  living, breathing, writing, painting,
     and even computer hacking.  All of these things are art because they
     create a part of reality.  We will add, however, that we make quality
     judgments of an art-form based on its effect on reality (according to
     our scientific observations).
     
          The next definition in our dictionary is a dirty word.  The term
     "hacker" obviously originated from the verb "to hack," which according
     to Webster means "to chop or cut roughly."  Chopping down a problem
     into manageable sizes is pretty much mandatory for a large percentage
     of scientific studies, so the term "hacker" seems to fit as a near-
     synonym for the term "scientist."  In addition to this literal
     synthesis of the definition, however, we're going to add some common
     associations to it and produce the following:
     
          Hacker:  a scientist, mathematician, and artist.
     
          In other words, a hacker is anyone who thinks analytically,
     studies the process of computation (an art-form), and who engages in
     the art-form on a regular basis.  We'll leave our definition there; 
     if the reader wishes to apply additional stipulations to his/her use
     of the word, that is his/her freedom.  The negative connotation given
     to the term is hopefully restricted to the minds of computer business
     advocates, an audience to which we will never cater in this
     publication.
     
          Finally, our last definition is for a phrase we may use
     repeatedly in all sections of this publication.  "The scope of this
     publication" will be defined from this point forward as "observations
     and information helpful to a hacker producing a computer art-form." 
     Hopefully, this definition entails an area that isn't too large for
     this publication to handle.  Let us know how we're doing.
     
                                                 Artists of the Imagination
                                                 aofi@slip.net
     
     **********************************************************************
     Project Small
     
     (* "Project Small" is a section of this publication that describes the
     accompanying program source code and it's application. *)
     
          Mine Sweeper is a clone of the game that comes with Microsoft
     Windows version 3.1.  This version, however, is a DOS-based program
     for old Tandy machines with a Tandy Graphics Adapter.  It will also
     work, however, with any IBM PC compatible machine that supports either
     the Tandy 16-color graphics mode or the 256-color MCGA graphics mode. 
     The program checks to see if there is an MCGA or VGA BIOS in the
     computer, and if there isn't, assumes that the Tandy-compatible
     graphics mode is available.  A Microsoft compatible mouse driver must
     also be loaded in order to play the game.
     
          There turned out to be two major hurdles to an otherwise simple
     project.  The first was evident from the beginning:  how do you make
     the mines appear in random locations on the minefield at the beginning
     of each game?  The second major problem was somewhat unexpected, and
     may have only been a glitch of the mouse software driver used on the
     test machine:  the mouse cursor would not appear in Tandy 16-color
     graphics mode.  In any case, this problem was avoided entirely and
     instead the hurdle became one of maintaining a mouse cursor on the
     screen without the driver being involved in the process.
     
          The first problem would not have been so large a hurdle for 
     someone willing to design the program using a language or library that
     provided psuedo-random number synthesis.  This project, however, was
     written entirely in Intel 8088/8086 compatible assembly language, and
     in order to run well on an old Tandy 1000HX, the code needed to be
     small, fast, and simple.  It proved to be a time-consuming and
     frustrating chore.  The algorithm used in the end is probably not the
     most efficient nor the smallest in code, but it was the best we could
     come up with.  The program produces semi-random sequences by first
     sampling the current time kept by the BIOS and then using that time to
     index values held in a 256-byte pseudo-random table stored at the
     beginning of the code and also into the first section of memory
     allocated to the program at startup.  Each random number generated in
     this fashion also provides the random number generator with the next
     index into these two memory areas.  Because only the lower word of the
     BIOS time count is used as an index, the number of possible minefield
     permutations is at least limited to 65,536 and probably less; it is
     extremely doubtful that all 65,536 numbers would ever be represented
     in the memory areas described above.  Some amount of chance is added,
     however, when programs are loaded and run beforehand in the same
     memory area that Mine Sweeper uses.  The contents of these programs
     are left behind when they are terminated and might be indexed by Mine
     Sweeper if Mine Sweeper is loaded into the same memory space.
     
          The creation of the mouse cursor used in Mine Sweeper went well
     on the first attempt.  Rather than have the mouse event handler
     restore the screen and then redraw the mouse cursor at its new
     location every time the mouse is moved, the mouse handler uses a very
     quick restoration routine and then forces the main portion of the
     program to update the mouse cursor whenever it has the free time. 
     This way, the mouse can be moved very quickly and the machine does not
     get bogged down in the processes of erasing and redrawing, even on an
     old Tandy.  The mouse cursor redraw also seems to be fast enough to
     produce visually smooth motion across the screen.
     
          The files included with this publication that are part of the
     Mine Sweeper project are described below:
          
          MINESWP.ASM      The source code, written in the Ideal mode
                           syntax of Turbo Assembler 1.0
          MINESWP.INC      Bitmaps used for both Tandy and MCGA graphics
                           modes
          MINESWP.EQU      Equates that affect default values for
                           variables and provide descriptions for what a
                           particular number means
          MINESWP.REF      A reference to DOS, BIOS, mouse and hardware
                           function calls used in the program
          MINESWP.COM      The compiled program, should run on any PC with
                           a TGA, MCGA, or VGA, (and mouse).
          MINESWP.DOC      Documentation on how to play Mine Sweeper
     
          For the first publication of Hacker Arts, we wanted to do
     something that was sure to be just for fun, but also something that
     could be compared to a program already distributed widely.  Our
     version of Mine Sweeper, we note without bragging, is 66% smaller than
     the Windows version, and our program has to provide its own graphics
     handling routines.  (We admit, however, that their version probably
     looks sharper in a SuperVGA screen mode).  In future sections of
     "Project Small" we hope to do many projects that are not comparable to
     existing software, and also some that have more of a practical
     application.  If you have any suggestions for a program and/or
     platform to use as a project for "Project Small," please send us an 
     e-note.
     
     **********************************************************************
     Project CHAOS
     
     (* Project CHAOS will appear from time to time in the editions of
     Hacker Arts *)
     
          CHAOS is an operating system design concept, and that's all it 
     is, at least for now.  Frequently in the editions of Hacker Arts we 
     hope to bring you updates on the progress of this concept as it takes 
     form into the work of art we envision.  CHAOS is intended to be a 
     system-specific operating system (i.e. cannot be transferred to a 
     different machine) that will be released into the public domain with 
     full documentation and source code for all functions.  The intent of 
     this course of action is not to provide the "equipment" needed to 
     perform the tasks an operating system normally performs, but to 
     provide an example for someone in the process of creating their own 
     operating system (what we like to call our "studio").
     
          Here is a list of some of the features we envision:
     
          * Integrated assembler and C compiler
          * Integrated source code tracer (debugger)
          * 32-bit instruction execution and data manipulation
          * Full virtual memory architecture (no file system)
          * Integrated symbol table search facility for symbol
            names and descriptors
          * Unified output for active procedures
          * Interrupt driven input and procedure-switching
          * Integrated memory optimization (perhaps data
            compression) and protection
     
          CHAOS is intended to be a sort of cross-section of software
     evolution.  We are going to start from the ground up and leave bread
     crumbs along the way, allowing manipulation of the operating system at
     any level from any level.  We're hoping to get a better view of the
     big picture of software development this way, hopefully making it
     easier to see which directions a software artist should go to make
     more intelligent and efficient creations.  Please send any ideas or
     suggestions you may have.
     
     Additional Notes:
     
          The system we intend to use for both the design and
     implementation of CHAOS is a Zeos 486SLC computer with a Diamond
     Speedstar HiColor video card (Tseng Labs ET4000 chipset), enhanced
     keyboard interface, U.S.R. Sportster 14.4 faxmodem, serial mouse,
     parallel port, 3.5 and 5.25 floppy drives, IDE hard drive interface
     ATAPI CD-ROM interface, and Logitech Soundman 16 sound card.
          
          The acronym CHAOS is intended to be somewhat ironic.  The letters
     stand for Clever Hacker Arts Operating System.
     
     **********************************************************************
     Hackers' Arch
     
     (* Hackers' Arch is the section where email statements or questions
     from the previous edition are added. *)
     
          If you have any questions about some computer art-form you are
     currently involved in, or would like to make suggestions or statements
     concerning this edition of Hacker Arts, please e-mail your question or
     statement to our Internet address:  aofi@slip.net. We will include
     the contribution and any reply we might have in the next edition of
     Hacker Arts (if your contribution is received before October 7, 1995).
     Subscribers will have this opportunity for the duration of their
     subscription; see Subscription Information, below.
     
     **********************************************************************
     About Hacker Arts
     
          Hacker Arts is an electronic publication only, and will only be
     distributed by the writers through digital electronic media.  It is
     formatted for viewing on an 80 text column monitor that is capable of
     scrolling up.
     
          Hacker Arts will not include any reviews nor advertisements for
     any product or service not directly relating to the publication.
     
          Hacker Arts is published by Artists of the Imagination, a loose
     alliance of software artists.
     
     Most importantly:
     
          Hacker Arts can be freely distributed by anyone, in whole or 
     part, to anyone else without prior consent, and such distribution is 
     strongly encouraged.
     
     **********************************************************************
     Subscription Information

          Though this publication and everything that comes with it is not
     under copywrite and may be distributed freely, subsequent editions
     to this edition will only be distributed initially to subscribers.
     This means that without a subscription, there is no guarantee that
     any particular edition will ever be available.  In edition to having
     each edition e-mailed to any particular electronic address, subscri-
     bers will also gain the following benefits:

     * Subscribers will have access to e-mail technical support for many
       programming questions through Hacker's Arch. Artists of the
       Imagination will respond to any questions we can answer and will
       post those we can't in Hacker's Arch anyway for other subscribers
       to read and possibly answer.

     * Subscribers will be given priority when following suggestions on
       what to do for the next Project Small.  If a subscriber writes in
       suggesting a program that we have already covered in a previous
       edition, we'll e-mail that old edition with the next new one.

     * Subscribers will be given access to particular on-line computer
       activities sponsored by Hacker Arts in the future.  Such activities
       might include real-time forums, games, or programming challenges.

          If you wish to subscribe, simply send an e-note to Artists of the
     Imagination at the email address at the bottom of this publication.
     We'll send you the next edition without charge along with other
     information needed for subscription payment.  Artists of the
     Imagination will publish and distribute about 50 editions per year
     (about 1 per week).

     The current subscription rate is $1 per issue.  Subscriptions are
     currently limited to 50 issues.

     **********************************************************************
     Hacker Arts                                 Artists of the Imagination
     Volume 1, No. 1                             aofi@slip.net 
     
