This is a quick-and-dirty AM29F040 device programmer that I built
one afternoon at a customers site when their commercial programmer
died and we needed to program a device that day (couldn't wait the
time to have it repaired).


Use:    FLASH   [option(s)...] [command(s)...]

opts:   -Axxx           - Set starting address  (0)
        -D              - Enable hardware debug (off)
        -H              - Program/Verify HIGH byte of word
        -L              - Program/Verify LOW  byte of word
        -P1-3/addr      - Set LPT port/address  (1)
        -Sxxx           - Set upper boundary    (7FFFF)

cmds:   ERASE           - Erase device
        CLEAR   sector  - Erase single sector
        DUMP    length  - Dump device data to console
        READ    file    - Read device data to file
        PROGRAM file    - Program device from file
        VERIFY  file    - Verify  device from file
        BLANKCHECK      - Test device for blank


Device interfacing is done via the PC parallel port:

  Pins 2-9 = Data (bi directional)
  Pin  1   = Read
  Pin  14  = Write
  Pin  17  = -ChipEnable
  Pin  16  = -AddressLatch

The device supports 24 bits of addressing, which are latched from
the data pins via the -AddressLatch signal, using READ and WRITE
to select the latch:

   READ=0 WRITE=1  = Low byte of Address
   READ=1 WRITE=1  = Middle byte of address
   READ=1 WRITE=0  = High byte of address

You can use active-low (74LS323) or positive edge triggered (74LS324)
devices for the latches.
