
        h u g i   s i z e   c o d i n g   c o m p e t i t i o n   # 5

                          infofile by adok^hugi - v1.0


Hi all!

Hugi Size Coding Competition #4 is over. Now let's move to the next compo!

--------------------------------- [THE TASK] ---------------------------------

Thanks go to IOPL who was (again) the first to suggest this task, and to Jibz,
INT-E,   furlong,   steff,  and  the   others  on  the  hugi-compo@egroups.com
mailinglist who tried to find and compile precise rules.

This  time your task is to write a  replacement for the SORT.EXE of MS-DOS. It
will  not  be  a  100% replacement, but it  will  do  most of the things which
SORT.EXE is able to do.

For  a detailed overview about the functionality  of SORT, type "HELP SORT" or
"SORT /?" on your DOS prompt.

Your  SORT clone has to sort the lines of a string which it gets from stdin (=
the  standard  input  stream)  in ascending  order  according  to ascii value.
Example: If stdin contains...

bcdefgh
abc
1234567890
blblblbl
blabla

...the sorted string will be:

1234567890
abc
bcdefgh
blabla
blblblbl

Your  program  then has to output the  sorted string to stdout (= the standard
output stream).

As always, the smallest program wins.

---

Detailed rules:

Concerning the program:

- The  program  must read from stdin. That  is, for example, possible with INT
  21h, function 07h or 0Ah.
- The lines must be sorted in ascending order according to ascii value.
- The  program  may NOT alter the content  of  the individual lines - only the
  ordering of the lines.
- The program must output to stdout (redirectable to a file).

When  executed with "type input.txt | entry  > output.txt", the program has to
work  according  to  the  mentioned rules  as  long  as  input.txt fulfils the
following rules:

- The entire file must be <= 30000 bytes.
- Each line including the last one must end with 0Dh 0Ah.
- No line must be longer than 255 bytes (including 0Dh 0Ah).
- Blank lines are allowed (consisting only of 0Dh 0Ah).
- Empty input is NOT allowed (there must be at least one line).
- The  only input characters allowed are the ascii values 0Dh, 0Ah, and 20h to
  FFh  but NOT 24h ('$'). 0Dh and 0Ah must appear at the end of each line ONLY
  and in this exact order.

Time  limit: Sorting test.txt with your program  must not exceed 1 minute on a
Pentium 200.

Furthermore, your entry must...
                            ...have the filename entry.com.
                            ...work in Windows95 dos box.
                            ...work at least on my PC.
                            ...exit without crashing when regular input.
                            ...not depend on its filename.
                            ...not use any extern files.

All instructions till .586 (Pentium) can be used.

  !! Please check if your program fits to all rules before submitting it !!

The  included file test.bat tests your program with a sample text file. I will
check your entries with the same program.

--------------------------------- [EXAMPLE] ----------------------------------

An example program by Jibz is attached (mysort.*).

-------------------------------- [SUBMISSION] --------------------------------

You have to send me

() the sourcecode of your entry
() the executable of your entry

so that I can analyse and evaluate your entry.

The sourcecode should be able to be assembled with tasm, nasm or a386.

Send your entries to:
                         hugi@netway.at

It  would be best if you could send me  your entry as early as possible. Then I
can  inform  you  about bugs, if I find  them,  and you have enough time to fix
them.  Attention: if I find no bugs,  this doesn't automatically mean that your
entry is bug-free.

You can submit updates to your entries all the time till the deadline.

Entries  that do not agree with these rules will be disqualified. Their coders
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 the  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 released on the compo-homepage
and always updated after receiving a new entry. In this way I hope to make the
compo exciting.

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

If that URL does not work, try:
                     http://www.geocities.com/siliconvalley/bay/6062/compo.htm

--------------------------------- [SCHEDULE] ---------------------------------

Nov. 08, 1998                   compo starts
Dec. 05, 1998, 11:59 pm cet     deadline for entry submission, compo is over
Dec. 06, 1998                   entries and beta results will be released,
                                start of public judgement
Dec. 12, 1998, 11:59 pm cet     end of public judgement
Dec. 13, 1998                   final results will be released

----------------------------- [PUBLIC JUDGEMENT] -----------------------------

After  the  entries and the beta results  will  have been released, the public
judgement  starts. During this week you can  discuss and object to the entries
that   seem   to  break  some  rule.   Please  send  your  objections  to  the
compo-mailinglist (see below). The jury (see the next paragraph) will check if
your  objections  are according to the rules.  If  they are, the invalid entry
will be disqualified.

--------------------------------- [THE JURY] ---------------------------------

All entries will be checked by me. Nobody else will get to see them before the
deadline.   After   the  deadline  all  entries   will   be  released  at  the
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 - and for no other purpose -, a jury
will  be formed, consisting of me and two other people that I'll select during
the compo.

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

The juries of the previous compos consisted of:

() compo 1: altair, cydo, adok
() compo 2: nop, cydo, adok
() compo 3: maxx, guillermo sais, adok

---------------------------------- [PRIZES] ----------------------------------

I'm sorry if i disappoint you, but there are no material prizes. Everything is
just  a  matter of honor and fame.  Moreover, the 30 best competitors will get
points  and be listed in the 'world  league table of assembly' situated at the
compo-homepage.  Reaching  a good place at a  compo and even more in the world
league  table of assembly is a good visiting-card and recommendation for every
competitor!

------------------------------- [MAILINGLIST] --------------------------------

A  mailinglist was created at the beginning  of June. Its purpose is to inform
about  new  compo and provide a discussion  forum  for the competitors. At the
moment there are about 110 subscribers.

To  subscribe send a mail  to hugi-compo-subscribe@makelist.com. You'll get an
automatically  generated  mail which confirms  your  subscription within a few
hours.  Then  you  start  getting the mails  the  others  have  posted to this
mailinglist.

Mails for the list have to be sent to hugi-compo@makelist.com.

If you want to unsubscribe, send a mail to hugi-compo-unsubscribe@makelist.com

--------------------------------- [CONTACT] ----------------------------------

Send your entries to:
                                         hugi@netway.at        [adok/hugi]
Compo-homepage
(pre-results, world league table, etc.)
                                         http://home.pages.de/~hugi-compo/
Subscribe to the mailinglist:
                                         hugi-compo-subscribe@egroups.com

------------------------------------------------------------------------------

Thanks for reading this info file! I'm looking forward to your participation!

                                               - adok^hugi, November 8th, 1998
