his ZIP archive holds three files
      readme.txt
      encode.c
      decode.c


ecode.c is source program that reads a VCRPLUS code
umber value you find in the newspaper and calculates
    date_of_the_tv_program
    starting_time_of_the_tv_program
    run_length_of_the_tv_program


ncode.c is source program that reads a date, start time,
nd run length then turns them into a VCRPLUS code number
ike the ones in the newspaper.



here are a few weak spots in these programs.

    1.  They only work for the usual kinds of tv shows,
           a.  Must start on an even half-hour or hour
           b.  Must end on an even half-hour or hour

    2.  They only handle VCRPLUS code values that are 1-6 digits
           long (these are the ones that start and end on
           half-hour or hour boundaries)

    3.  Both programs ask for today's date.  They should
           instead get this from the computer itself but that is
           too much involved with O/S details.

    4.  Integers are used everywhere, even for time_of_day.
           a.  You need to use a 32-bit computer
           b.  So, nine o clock at night, comes out 2100

    5.  The VCRPLUS hardware uses "channel mapping" for
           channel numbers above 19, and for cable tv stations.
           Just decode some VCRPLUS code numbers from each unusual
           channel and get the "mapped channel" numbers.  For
           example in this area the VCRPLUS people have
           mapped cable station ESPN to "channel 22".





xample 1:  encode    nebraska  deleware  newyork
                 This is a (deliberate) error.  You should
                 get back a message telling how to do it right:
            Usage: encode  month  day  year  channel  starting_time  length_in_minutes



xample 2:  decode    newyork  nebraska  deleware
            Usage: decode  todays_month  todays_day  todays_year   Code_value_in_newspaper



xample 3:  encode 1 4 93 5 900 30
                 You have asked for the VCRPLUS code of a tv show
                 on January 4th of 1993, channel number 5, at 9 o clock
                 (in the morning), that lasts for 30 minutes.
                 The program answers back:
                  1   4  93   5  900    30    VCRPLUS_CODE=    19297


xample 4:  decode 1 2 93 19297
                 On January 2nd of 1993 you have asked a question.  You
                 want to know "what show does the VCRPLUS code 19297
                 represent?"  The program answers back
                 Code=  19297     1   4  93   Mapped_channel=  5  Start_time= 0900  Length=  30





ave some fun with this stuff.

tis.
