home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / FFA.ZIP / MAKEOV.SEQ < prev    next >
Encoding:
Text File  |  1988-01-08  |  2.3 KB  |  59 lines

  1. \ MAKEOV.SEQ    Make the OVERLAY.BIN file for DOS 2.x
  2.  
  3. .comment:
  4.  
  5.   The file MAKEOV.SEQ allows the creation of an OVERLAY.BIN file. This
  6. file will be used to allow FF running on DOS 2.x to locate and load the
  7. editor overlay.  DOS 2.x does not support the DOS functions required to
  8. determine what the name of the currently running program is, so it is
  9. necessary to create a known file that will contain the editor.
  10.  
  11.   When an INSTALL is done, and the DOSA version is 2.x, then the
  12. OVERLAY.BIN file will automatically be created. However if FF is
  13. installed on a DOS 3.x system, and subsequently moved to a DOS 2.x
  14. system without re-installing it, you will need to type the following
  15. command before trying to edit:
  16.  
  17.         MAKE-OVERLAY <filespec_of_FF.EXE_currently_running> <enter>
  18.  
  19.   FF will open FF.EXE and read the editor overlay from it. It will
  20. then create a file OVERLAY.BIN, and write the editor back out to it.
  21.  
  22.   Editing will then be possible.
  23.  
  24. comment;
  25.  
  26. hidden also
  27.  
  28. : make-overlay  ( | name --- )
  29.                 ovoffset 2@ or 0=
  30.                 if      cr ." Sorry, you have already tried to run the editor."
  31.                         cr ." Leave, and re-start FF, and try again."
  32.                         abort
  33.                 then    >in @ span @ 1- >
  34.                 if      cr
  35. ." Enter the filespec of the version of FF.EXE that you are currently running."
  36.                         cr
  37. ." FF will use it to make the file OVERLAY.BIN.  Filespec? "
  38.                         query
  39.                 then    exehcb !hcb
  40.                 " EXE" ">$ exehcb $>ext
  41.                 exehcb hopen cr
  42.                 abort" Could not open EXE file to make OVERLAY.BIN"
  43.                 ovoffset 2@ exehcb movepointer
  44.                 here 500 + >r r@ 25000 exehcb hread r> swap >r >r
  45.                 exehcb hclose drop
  46.                 r@     @      12345 <>
  47.                 r@ 2+  @ ctime    @ <> or
  48.                 r@ 4 + @ ctime 2+ @ <> or
  49.                 if      cr exehcb count type ."  Contains no Overlay"
  50.                         abort
  51.                 then    " OVERLAY.BIN" ">$ shndl+ $>handle
  52.                 shndl+ hcreate abort" Error creating OVERLAY.BIN"
  53.                 r> r@ shndl+ hwrite  r> <>
  54.                 abort" Write Error in Overlay Code section"
  55.                 shndl+ hclose drop ;
  56.  
  57. only forth also definitions
  58.  
  59.