 Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ
 H  U  G  I     C  O  M  P  O 
                            

                    t h e  -  " M O N S T E R "  -  c o m p o
Ŀ  Ŀ   Ŀ       Ŀ        Ŀ
۳  ۳Ŀ۳    ۳
۳Ŀ۳۳    ۳
۳۳  Ŀ۳    Ŀ۳
Ŀ  Ŀ            
  ٱٱĿٱĿ
  Ŀٳ
        
        H U G I  -  S I Z E  -  C O D I N G  -  C O M P O  -  # 1 1

              Ŀ           Ŀ                  Ŀ
 Ĵ  Ŀ   ĿĿĿ      ĿĴĿĿ      Ŀڿ ڿĿĿ
        x       x            x     ٳ    
   Ĵ    Ĵ      Ĵ     
                                                          

 Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ
    T  A  D        Y  2  K    
                            



                             o
  Ŀ  ĿĿĴ  Ŀ  ĿĿ
                         
                           Introduction


        Welcome to the Hugi size coding (optimizing) competition #11.

        This  text describes the current  Hugi Size Coding Competition
        (or 'compo'), details the task at hand and gives some links to
        useful web sites and email addresses.

        The  competitions  are designed  especially for 80x86 assembly
        language  programmers  who  enjoy  the  rewarding challenge of
        'size-coding'  (or 'size optimizing' as  many people call it).
        Size-coding  is an attempt to perform the impossible, to write
        a  fully  working  program in 0  bytes,  well, as close to the
        magic 0 byte goal as possible.

                                        enjoy...

Ŀ                                
   Ŀڿ ڿĿĿ      ĿĿ 
    ٳ            ڴĿ
                                 Compo task
  

        Your  task  for  this  compo is  to  write  a  maze pathfinder
        program.  Just like the mythological Theseus your program will
        find itself inside a labyrinth (or maze) at a certain location
        and  must  navigate its  way  to the exit location. Thankfully
        there  is  no Minotaur to contend  with,  only the maze itself
        (and  of  course  the other  competitors  taking  part in this
        'monster' compo).

        The  compo  is basically a 'find  the  shortest path through a
        maze'  problem,  combined  with  the  usual  'size optimizing'
        aspect of all the Hugi size coding competitions.

  ĿĿĿĿĿĿĿĿ
ĴT  I  M  E  B  O  M  B[ HUGI SIZE CODING COMPO #11 ]
  

        There is a time  limit of 5 minutes for  the test-suite.  This
        means your entry  must complete the test-suite  in this amount
        of time.

        This time limit may at  first seem unfair,  but please realise
        that someone  (ie. Adok)  must test  each and every  entry, in
        recent  Hugi  compos  there   have  been  around  500  entries
        (counting all submitted versions) to test!!

NOTE:
~~~~~
        Please remember that more mazes will  probably be added to the
        test-suite(s)  during this  compo,  so please don't use up the
        entire 5 minutes straight away, keep some time in reserve.
        

  ĿĿĿĿĿĿĿĿ
ĴO  V  E  R  V  I  E  W[ HUGI SIZE CODING COMPO #11 ]
  

        Your entry must do the following steps:-

        * 1) Load the file called "MINO" into a memory array (the maze).

        * 2) Find the maze BEGIN (start) location.
             Search for the shortest path from BEGIN to EXIT.

        * 3) Mark the shortest path in the maze array.

        * 4) save the maze array onto disk as the file "TOUR".

  ĿĿĿĿĿĿĿĿ
ĴC  H  E  C  K  I  N  G[ HUGI SIZE CODING COMPO #11 ]
  

        The  test-suite(s)  will produce a valid  maze  and save it to
        disk  as the file "MINO". Your entry will then be run and  its
        output  (the "TOUR" file) will be  tested to make sure a valid
        solution was correctly found.

        Due  to the nature of generated  mazes it may be possible that
        more than a single solution exists for a maze. As long as your
        entry's solution is both a valid route AND has the same number
        of  steps  as the shortest path  solution  it will be accepted
        (see: SOLUTION)

  ĿĿĿĿĿĿĿĿ
ĴT  H  E     M  A  Z  E[ HUGI SIZE CODING COMPO #11 ]
  

        The maze file itself (the "MINO" file) consists of an array of
        100 x 100 bytes (a total of 10000 bytes). Each byte represents
        a single 'step' or 'cell' in the maze.  Taking the 1st byte as
        the  top-left  corner  and 100 cell  bytes per line,  the maze
        array can be displayed like this:

                            ( 1 cell = 1 byte )
                                                                  
             100 cells  Ĵ
                                                                 
             0   1   2   3   4   5        94  95  96  97  98  99
             Ŀ 
       00  0  0  0  0  0  0  ...  0  0  0  0  0  0  99
               Ĵ
      100  0  x  x  x  x  x  ...  x  x  x  x  x  0  199
               Ĵ
      200  0  x  x  x  x  x  ...  x  x  x  x  x  0  299
                Ĵ
 100                  .....                         ......
cells                 .....                         ......
                      .....                         ......
               Ĵ
     9800  0  x  x  x  x  x  ...  x  x  x  x  x  0  9899
               Ĵ
     9900  0  0  0  0  0  0  ...  0  0  0  0  0  0  9999
             

                        0 = the border wall
                        x = changes from maze to maze


  You can assume the following:

      :)  1) There will always be a 1 cell wall border   (00 byte)
      :)  2) The paths in the maze are marked using the  (01 byte)
      :)  3) There will only be 1 BEGIN cell in the maze (02 byte)
      :)  4) There will only be 1 EXIT cell in the maze  (03 byte)
      :)  5) The maze is always valid (the EXIT can be reached).
      :)  6) The maze file "MINO" is always 10000 bytes long (100 x 100)

  You can NOT assume the following:
          xxx

      :(  1) the locations of the BEGIN and EXIT within the maze
             (your entry must discover these by itself).

      :(  2) the number of steps needed to solve the maze

      :(  3) that the BEGIN or EXIT locations are in dead-ends
             (they can be ANYWHERE in the maze, even in cells with
              2, 3 or 4 paths connecting them).

        To explore the maze array you  can use the following increment
        values (unless you wish to use a different method to store the
        maze array in memory, of course).

                                   North
                                 Ŀ
                                  -100  
                                        
                                    UP  
                                 
                        ĿĿĿ
                          LEFT         RIGHT 
                   West                       East
                          -1            +1   
                        
                                 Ŀ
                                   DOWN 
                                        
                                  +100  
                                 
                                   South

        The "MINO" maze file consists of 10000 bytes (100 x 100) where
        each byte has the value 00, 01, 02 or 03. ALL other values are
        illegal and will NOT be present in the "MINO" file.

              "MINO"
            cell value                       description
                                 
                00                      wall (no-go area of maze)
                01                      paths
                02                      'BEGIN' location
                03                      'EXIT' location

        These are ILLEGAL values:

                04 .. FF hex            --- invalid ---


        Here is an example maze to demonstrate the cell values:

                                             Ŀ
        "MINO" file hex dump   00 00 00 00 000100 00 00 00 00
                                       Ĵ
                               00 00 0001010100 00 00 00 00
        00 = wall/border           Ŀ
        01 = path             0201010100 00 00 00010301
        02 = BEGIN location   Ŀ  
        03 = EXIT location     00 00 0001010101000100 00
                                       Ĵ
                               00 00 00 00 00 0001010100 00
                                                

        The "TOUR"  file is  slightly different,  please see: SOLUTION
        for more information.

  ĿĿĿĿĿĿĿĿ
ĴC  O  U  N  T  I  N  G[ HUGI SIZE CODING COMPO #11 ]
  

        The  shortest path through the  maze is determined by counting
        the number of steps along a certain route. 

                                             Ŀ
        BE = BEGIN location                    
        EX = EXIT location             Ĵ
                                             
                                   Ŀ
                              BE 1 2 3           12EX  
                              Ŀ  
                                        4 5 6 7  11
            Solution = 13 steps        Ĵ
                                                 8 910
                                                

        As you can see in the above example, the first step off the BE
        (BEGIN)  location is taken as the  first step (count = 1). The
        process  of  tracing  out a  route  continues  by counting the
        number  of  North,  South, East,  West  steps (up, down, left,
        right movements) until the EX (EXIT) location is found.

        Stepping onto the EX (EXIT) is also counted as a step.

        The  'shortest path' is  the route with the  smallest (lowest)
        step count, so 50 is better than 60 for example.

  ĿĿĿĿĿĿĿĿ
ĴM  O  V  E  M  E  N  T[ HUGI SIZE CODING COMPO #11 ]
  

        A valid step can only be one of the following:-

               Compass       Direction        Increment
                              
                North           up              -100
                South           down            +100
                East            right           +1
                West            left            -1

        A diagonal movement can only be performed using 2 steps:-

              Ŀ
               2 1 2   xx = current location
              Ĵ
               1xx 1    1 = one step
              Ĵ
               2 1 2    2 = two steps
              

  ĿĿĿĿĿĿĿĿ
ĴS  O  L  U  T  I  O  N[ HUGI SIZE CODING COMPO #11 ]
  

        It  is possible that two or  more routes through the same maze
        will  yield the same number of steps (see below). In this case
        BOTH solutions are valid and either one will be accepted.

        Your entry only has to find 1 (ONE) solution.  

        Either route 1 OR route 2 will be accepted.


                                   Ŀ  Ŀ
        BE = BEGIN location             5 4 3  <--- route 1
        EX = EXIT location      Ĵ
                                 9 8 7 6   2
                            Ŀ
                          EX1110            1BE
                          Ŀ  
                               9 8   4 3 2
                            
                                    7 6 5      <--- route 2
                                   Ĵ
             Solution = 12 steps           
                                         

        Your  entry must save the maze  array to a file called "TOUR",
        this  has  the shortest path solution  marked  on it using the
        special  byte value 90 hex (144  decimal). The "TOUR" file can
        only  contain  bytes  with  the values shown below,  ALL other
        values are illegal !!

              "TOUR"
            cell value                       description
                                 
                00                      wall (no-go area of maze)
                01                      paths
                02                      'BEGIN' location
                03                      'EXIT' location
                90 hex                  shortest path

        These are ILLEGAL values:

                04 .. 8F hex            --- invalid ---
                91 .. FF hex            --- invalid ---

        (the value 90 hex was especially chosen for Jibz.. heheh)

        Here is an example hex dump of part of a "TOUR" file:
        (a real "TOUR" file would be 100 x 100 = 10000 bytes).

                 
                 00000000000000000000000000 ...
                 
                 00000000000001000000010101 ...
                 
                 00000000010101000000000000 ...
                 
                 00029090900000000090030100 ...
                 
                 00000000909090900090000000 ...
                 
                 00000100000000909090000100 ...
                 
                 00010101010000000000000101 ...
                 ĴĴ

        Perhaps the following hex is easier to understand:
                                                             
                  00 00 00 00 00 00 00 00 00 00 00 00 00  ...
                                   Ŀ             
                  00 00 00 00 00 000100 00 00010101  ...
                             Ĵ             
                  00 00 00 0001010100 00 00 00 00 00  ...
                         Ŀ       
                  000290909000 00 00 0090030100  ...
                    Ŀ         
                  00 00 00 0090909090009000 00 00  ...
                       Ŀ  Ĵ  Ŀ       
                  00 000100 00 00 00909090000100  ...
                    Ŀ            
                  000101010100 00 00 00 00 000101  ...

        The  "TOUR" file  created  by your  entry is identical  to the 
        "MINO" file  except it has the shortest-path  marked using the
        90 hex bytes.

        Please NOTE:
        
                Both the  BEGIN (02 hex)  and  the EXIT (03 hex)  maze
                cell bytes are  NOT  overwritten by the  shortest-path
                route (90 hex).

Ŀ                 
   ڿĿĿĿ Ŀ
   ڴ     
                                              Example
  

        As with previous competitions there will be an example program
        included with the test-suite(s). This example serves both as a
        chance to clarify your understanding of the compo rules and to
        be a basis for your optimizing magic.

        Newbies  (beginners)  to  the  Hugi  size  coding competitions
        and/or  80x86 assembly language will hopefully appreciate this
        example. They, and anyone else, may use any part or part(s) of
        the  example program in their compo  entry. I suggest having a
        good  look  at  the  supplied 80x86  source  code  in order to
        familiarise  yourself with the compo task and to possibly pick
        up a few tricks to get you started.

        Thanks to : Fabled, Jibz for the example program(s).


Ŀ                      o          Ŀ
   ĿĿ     Ŀ      ĿĿ
   Ŀ      Ŀ      ٳĿ
        ٳ                   Test suite(s)
    

        The  test-suite(s) used during this compo  are only there as a
        guide,  to  be a reference. To  help both yourself and Adok to
        verify  that  your  entry does  indeed  comply  with the compo
        rules.

        It   is  possible  that  an   unforeseen  loop-hole  might  be
        discovered  during  the course of  the  compo. If this happens
        then  a new, or updated test-suite will be released as soon as
        possible  through both the the eGroups Hugi-compo mailing list
        and the Hugi compo website.

                      http://hugi.compo.home.pages.de/
                      http://hugi-compo.home.pages.de/
                      http://hugi.de/compo/

        Please  keep in mind that the  test-suite(s) are only meant to
        be  a guide, something to help you test and debug your program
        during the compo. The rules should be carefully read to ensure
        that your entry does not break any rule.

        After  the compo deadline a  period of public judgement occurs
        in  which you and others are free to comment and discuss these
        unforeseen loop-holes and flaws in each other's programs. This
        discussion will occur using the eGroup's mailing list (details
        given later).


Ŀ             o          o
Ŀ  ĿĿ  ĿĿ  ĿĿĿ
          ĿĿ      Ŀ
                              Submissions


        Please send your compo entry directly to Adok (hugi@netway.at)

          * the source code of your entry
          * the executable of your entry (ie. "ENTRY.COM" )

        so  that  Adok can analyse and  evaluate your entry during the
        course of the compo. The preliminary results table at the Hugi
        size   coding  web  site  will  also  be  updated  at  regular
        intervals.

        Send your entries to:
                        hugi@netway.at

        It would be best if you could send Adok your entry as early as
        possible.  Then  he can evaluate  your  entry using the latest
        test-suite(s)  and inform you if any bugs are found before the
        compo  deadline.  You  can then post a  new  bugfixed entry to
        Adok.


ATTENTION:

        Even  if  Adok finds no bugs  this does NOT automatically mean
        that  your  entry  is  totally  bug  free.  There  may  be  an
        unforeseen  loophole in the test-suite(s)  which an entry uses
        to  break the compo rules. So  please read the rules carefully
        and  feel  free  to post  questions  to the eGroups hugi-compo
        mailing list.

        You  can submit updates to your  entries all the time up until
        the compo deadline.

        Entries   that   do  not  agree   with  these  rules  will  be
        disqualified.  Their  creators  will  be  informed  about  the
        mistake,  and they can re-submit a bugfixed version unless the
        compo is over.

        If  the compo is over and a hidden flaw is found in one of the
        originally  accepted  entries by the  jury or public, the best
        older  entry  of this competitor that  fits all the rules will
        qualify instead.

Ŀ                            
ĿĿ   ĿĿĿ  ³   Ŀ
           Ŀ      Ŀ
                                      Pre-results


        The  current  pre-results of  this compo will  be shown on the
        compo-homepage and always updated after receiving a new entry.
        In  this way the compo can be made more exciting by seeing how
        far  your fellow competitors have got to by seeing the size of
        their entries.

        compo-homepage URL:
                     http://hugi.compo.home.pages.de/
                     http://hugi-compo.home.pages.de/
                     http://hugi.de/compo/


Ŀ                  
ĿĿĿĿĴ  ³ Ŀ
       ٳ     
                                          Schedule


     The schedule for this compo is:


    Mar 04, 2000                Compo starts
    Apr 30, 2000  11:59 pm cet  Deadline for entry submission,
                                the compo is over !

    May 01, 2000                Start of Public Judgement
                                (Entries and beta results are released).

    May 07, 2000  11:59 pm cet  End of Public Judgement
    May 08, 2000                Final results are released


Ŀ         o           Ŀ                            
ٿ  Ŀ   Ŀ         ĴĿĿĿĿĿ
                         ٳ  ٳ            Public
         Ĵ           Judgement
  

        As  soon as the entries and the beta results are released, the
        Public  Judgement starts. During this week you can discuss and
        object  to  the entries that seem  to break one or more rules.
        Please  send  your objections  to  the compo-mailing-list (see
        below).  The  jury  will  check  if  your  objections are well
        founded  and  agree with the rules.  If  they are, the invalid
        entries  will  either be disqualified  or given a fair penalty
        after public agreement.

Ŀ            Ŀ
    ĿĿ        Ŀ  
                  
           Ĵ                                    The Jury
  

        All  entries will be checked by  Adok. Nobody else will get to
        see  them  before the compo  deadline.  After the deadline all
        entries  will be released at  the Hugi compo-homepage together
        with  the  beta results. In  this week, the 'public judgement'
        week, people can discuss and object to the entries.

        To  check  whether  the objections are  right  a  jury will be
        formed  consisting  of Adok and  two  other independant people
        that Adok will select during the compo.

        Jury  members  have to act  objectively. They can't change any
        rules  or disqualify entries by themselves. Therefore there is
        no  difference  whether  these people  take  part in the compo
        themselves, or not.

Ŀ    o
ĿĿĿĿ
         Ŀ
       Ĵ                                                  Prizes
  

        Sorry,  but  there  aren't any  materialistic  prizes for this
        compo.  Instead  the  compo is designed  to  appeal to the fun
        factor  in all you creative coders out there. You will recieve
        the  satisifaction,  fame  and honour  of  seeing your name up
        there  in lights with some of  the best code optimizers in the
        world.

        The 30 best competitors will gets points and will be listed in
        the  'World  League Table of Assembly'  (which can be found on
        the compo-web-site). Reaching a good place in the compo and in
        the  World  League table of  80x86 size-coders is an excellent
        visting-card,   a   recommendation   of   your   skills,  your
        imagination  and  your enjoyment at  pushing the boundaries of
        80x86 coding.

ڿ ڿ     o   o               o     
ٳĿ     ĿĿ       Ŀ
   ڴ               Ŀ  
        Ĵ                          Mailing List
  

        An  eGroup  Hugi-Compo mailing list  has been running for some
        time  now. Its  purpose is to  inform you about new compos and
        to provide a public discussion forum for the Hugi competitors.

        At  the  present time there are  around 230 subscribers to the
        free mailing list.

        This  mailing  list  is  the place  were  the  week  of Public
        Judgement occurs. It provides an open platform for objections,
        replies, questions and answers to be exchanged with others.

        To subscribe to the Hugi compo mailing list send an email to:

                hugi-compo-subscribe@egroups.com

        You  will recieve an automatically generated email reply which
        confirms  your  subscription within a  few hours. You can then
        start to send and recieve emails.

        To post a message:

                hugi-compo@egroups.com

        To un-subscribe:

                hugi-compo-unsubscribe@egroups.com

        You can view the mailing list archive by visiting:

                http://www.egroups.com/groups/hugi-compo/

        You  must subscribe in order to  send emails to the Hugi Compo
        mailing list.

Ŀ                   
   ĿĿ  ĿĿ
         ڴ     
                                           Contact


        Send your compo entries to:
                                        hugi@netway.at    [Adok/Hugi]

        Compo homepage (pre-results, world league table and test suites)
                                     http://hugi-compo.home.pages.de/
                                                http://hugi.de/compo/

        Subscribe to the mailing list:
                                     hugi-compo-subscribe@egroups.com

        Unsubscribe from mailing list:
                                   hugi-compo-unsubscribe@egroups.com

        Mailing list archive:
                            http://www.egroups.com/groups/hugi-compo/

 Ŀ  Ŀ  Ŀ    Ŀ
               ĿĿĿ  ĿĿĿĿ
             Ŀ          Ŀ
ooo                WWW Resources


        Here  is  a  list of websites  which  may  provide some useful
        information to the competitors in the form of algorithms, tips
        and tricks, source code or fun stuff like other compos.

        FAQ-SYS (lots of FAQ or compression/optimization/hardware etc..)
                http://www.neutralzone.org/home/faqsys/

        Ralf Brown's Interrupt list (download site)
        http://www.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html

        WDOSX - Dos extender by Michael Tippach
                http://www.geocities.com/SiliconValley/Park/4493/

        Some old, but useful, programming/hardware info.
                http://www.programmersheaven.com/
        
        101% assembler
                http://asm32.cjb.net/

        XOR coders (tiny DPMI/pmode stuff/Linker)
                http://members.xoom.com/xorcoders/

        SEARCH ENGINES
                WWW.INFOSEEK.COM
                WWW.ALTAVISTA.COM
                WWW.YAHOO.COM
                www.DOGPILE.COM
        
        Northern light search engine
                http://www.northernlight.com/

Ŀ           o 
   ĿĿĴ   Ŀ
     ٳ     Ŀ
                                                Credits


        This 'Monster' text ...................................... TAD

        Test suite(s) ........................ Fabled, Jibz, Ruud, TAD

        Example program ................................. Fabled, Jibz

        Compo hosting ........................................... Adok


                "Increase the peace and keep it real !"
                                                (Ali G. 1999)

 Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ   Ŀ
 H  U  G  I     C  O  M  P  O 
                            


