scene.org File Archive

File download

<root>­/­mags­/­hugi­/­compos/hcompo17.zip

File size:
41 358 bytes (40.39K)
File date:
2002-03-23 23:04:19
Download count:
all-time: 1 337

Preview

  • _test/ dir
  • _test/1.bin 1B
  • _test/24.bin 24B
  • _test/32768.bin 32.00K
  • _test/dump.com 215B
  • _test/test.bat 557B
  • dump.asm 3.93K
  • dump.com 215B
  • dumpc.c 919B
  • dumpc.com 7.57K
  • dumppas.exe 3.27K
  • dumppas.pas 1.06K
  • general.txt 10.77K
  • hcompo17.txt 6.50K

file_id.diz

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
                        Rules as of 14 Mar 2002 (v1.02HC)

          If you find any questionable items, please let me know.

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´The TaskÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

  Your task is to create a small DUMP utility that dumps a file's contents
   to StdOut in the following format:

  xxxx  xx xx xx xx xx xx xx xx-xx xx xx xx xx xx xx xx    xxxxxxxxxxxxxxxx

   As you can see this is very similar to DOS's DEBUG -d command.

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´GeneralÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

The rules:
  You must
   (1) - get the filename from the command line.
       - You may assume that there is a filename and it is valid,
         and exists in the current directory.
       - You may use FCB's or Handles.
       - The input will not be redirected.
       - You may assume that the file will be less than 32769 bytes
          and is at least 1 byte in size.
       - You may NOT assume that there is only one space after ENTRY
          and before FILENAME.TXT.
   (2) - print your output to the StdOut device for redirection.
   (3) - print each line with the following format:

aaaa  bb bb bb bb bb bb bb bb-bb bb bb bb bb bb bb bb    xxxxxxxxxxxxxxxx

  aaaa  = the offset of the file that this line starts.
          i.e.: The first line would be 0000h, the second 0010h, etc.
          aaaa must start in the first position.  No spaces before...
        - All HEX digits must be in UPPERCASE.
        - There are two (2) spaces between aaaa and the first bb.
  bb    = 16 bytes of data printed as hex bytes with a space
          between each one.
        - 8th and 9th bb's (1 based) must have a hyphen (-) between them.
        - If there are 8 or fewer bytes on the last line, you MUST NOT
          print the hyphen (-).
        - All HEX digits must be in UPPERCASE.
        - There are four (4) spaces between the last bb and the xxxx's
  xxx's = the 16 bytes of data in character representation.
        - Each character must be the ASCII character of the respective
          hex value listed on the line.  All characters are to be
          displayed except 0-31 and 255.  These characters are to be
          displayed as ASCII character 250 (a small period above the
          bottom of the line)
        - If there are not 16 chars, you MUST NOT right pad the xxxx's
          i.e.: if there are only 10 chars, you must only print 10 chars.
   (4) - Each line must be followed by a CRLF pair, in that order.
   (5) - If you are at the end of the file and there are not 16 bytes
         left, you must use spaces to left pad the remaining bytes so that
         the xxx's line up correctly.
         Do not end pad the xxx's when EOF is reached.
   (7) - When end of file, exit to DOS closing all files handles/FCB's used.
         You may assume INT 20h and service 4Ch/INT 21h closes handles on
         exit, but does not close FCB's. 
   (8) - If not end of file, go to (3)
       - There is no order in which you must do things, as long
         as the output matches the example or the rules if the example
         contains an error.
       - You may print each character at a time, each line at a time,
         or the whole file only once.  It is your choice, as long as
         you follow the rules pertaining to the format of each line.


 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Assumptions ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

   The following assumptions pertain to this compo:

   - See GENERAL.TXT for all other general assumptions.

   - You may assume that the keyboard will be the only form of input.
       No input redirection will be used for this compo.
       All files will be already created.  No CONin will be used.

   - You may not assume the destination of the redirected output
       other than it will be to the StdOut device.
       Handle = 1 and will already be opened by DOS.

   - You may assume that the file will have a length of at least 1
       byte and at most 32768 bytes.

   - You may NOT assume that the filename on the command line has only
       one space between the program name and the filename.  You must
       allow multiple spaces before the command line filename starts.

   - You may assume that there will be a CR (0Dh) char trailing
       the 8.3 filename.  i.e.:  No spaces will follow the filename.

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Example ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

  An example program has been included (dump.com) with the source (dump.asm).
  There are two other examples written by Bonz (thanks Bonz):
    DUMPC.C     ->  DUMPC.COM
    DUMPPAS.PAS ->  DUMPPAS.EXE
  DUMP.COM will be used for the test purposes, but please use the others
   too, as a test for the test. :)

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Submissions ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

Send your entries to:
                               cdvolko@gmx.net

You may submit updates to your entries at any time until the deadline.

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Testing ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

  A file compare test will be made on your entry with a valid entry.
    To test your entry, simply redirect the output of the example's
    output and redirect the output of your entry, then compare them:

    FC DUMP.DMP ENTRY.DMP /b

  There is a TEST.BAT file included for ease of use.  (Thanks Boreal)
    Simply copy your entry (ENTRY.COM) file to the _TEST directory and
    run TEST.BAT.
    TEST.BAT compares your entry for a 1 byte file, a 32768 byte file,
    and makes sure you don't print the '-' if no 9th byte is present.
    Please make sure (visually) that all tests pass.

 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Schedule ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

   Mar 22, 2002               Compo starts
   Apr 30, 2002 11:59 pm CET  Deadline for entry submission
   May 01, 2002               Entries and beta results released
                              Start of Public Judgment
   May 07, 2002 11:59 pm CET  End of Public Judgment
   May 08, 2002               Final results released

   So... Good luck!
   (even though luck has nothing to do with it) :)

   Sniper
   (fys@cybertrails.com)

Thanks to those that helped with the previous rules to this compo.
Thanks to Boreal, Bonz, Bioled Brain, INT-E, "I hope I don't forget
 someone (sorry if I did)", for their help.
Thanks to those that sent submissions to this earlier, however, I am
 pleased to send this to the HUGI COMPO group.  Enjoy.