home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e051 / 1.ddi / INSTOPS.OPS < prev    next >
Encoding:
Text File  |  1985-07-12  |  6.6 KB  |  227 lines

  1. #|
  2. Installation program for setting up a batch file
  3. (generally ops5.bat) which runs the ops5plus.exe
  4. program with appropriate parameters.
  5. |#
  6.  
  7. (p initial (start)
  8.   -->
  9.    (write
  10.      (crlf) |We will set up a batch file which calls the ops5plus|
  11.      (crlf) |program with the appropriate parameters for your system.|
  12.      (crlf) |The default parameters are to start in the standard mode|
  13.      (crlf) |rather than starting with the graphics DEVELOP mode, to|
  14.      (crlf) |have 64K bytes of memory reserved for the PAUSE feature,|
  15.      (crlf) |and assume when you use DEVELOP mode that a mouse is connected|
  16.      (crlf) |to COM1: if you have one serial port, and to COM2: if you|
  17.      (crlf) |have two serial ports.| (crlf)
  18.      (crlf) |Type a Y if you like these defaults, N if you need different|
  19.      (crlf) |defaults: |)
  20.    (bind <ans> (acceptline))
  21.    (make do-file first <ans>)
  22.    (remove 1))
  23.  
  24. (p bad-ans
  25.    (do-file first <ans>)
  26.    -(do-file first << y yes n no >>)
  27.   -->
  28.    (remove 1)
  29.    (write (crlf)
  30.       (crlf) |Your answer to the first question must be Y or N.|
  31.       (crlf) |Here's the question again.|)
  32.    (make start))
  33.  
  34. (p get-file-name
  35.    (do-file <n> << y yes >>)
  36.    -(make-file)
  37.   -->
  38.    (write
  39.      (crlf) |If you like the name ops5.bat for the file you will|
  40.      (crlf) |normally use to run OPS5+, and you want it written to|
  41.      (crlf) |the default drive, then type Y, otherwise, type the|
  42.      (crlf) |name (maximum eight letters), or drive:name of the|
  43.      (crlf) |filename you want instead.  Remember to give the `.bat'|
  44.      (crlf) |extension. :|)
  45.    (bind <ans> (acceptline | |))
  46.    (make make-file <ans>))
  47.  
  48. (p bad-ans-two
  49.    (make-file | |)
  50.    (do-file <n> <ans>)
  51.   -->
  52.    (remove 1 2)
  53.    (write (crlf)
  54.       (crlf) |Your answer to the question must be Y or a filename.|
  55.       (crlf) |Here's the question again.|)
  56.    (make do-file <n> <ans>))
  57.  
  58. (p get-params
  59.    (do-file first << n no >>)
  60.   -->
  61.    (write 
  62.      (crlf) |If you want to start each OPS5+ session in DEVELOP mode, type|
  63.      (crlf) |a D followed by a carriage return, otherwise, simply type a|
  64.      (crlf) carriage |return:|)
  65.    (bind <develop> (acceptline | |))
  66.    (write (crlf)
  67.      (crlf) |To determine the amount of memory you want to reserve for|
  68.      (crlf) |the PAUSE feature, just think of the size of the programs|
  69.      (crlf) |you wish to run during a PAUSE.  Reserving 0K bytes is good for|
  70.      (crlf) |running large productions systems, when you don't expect to|
  71.      (crlf) |PAUSE, 64K bytes of memory are good for running most editors.|
  72.      (crlf) (crlf) |Type the number of K-bytes reserved for the PAUSE|
  73.      (crlf) |feature followed by a carriage return, or simply type carriage|
  74.      (crlf) |return to get the 64K default:|)
  75.    (bind <pause> (acceptline | |))
  76.    (write (crlf)
  77.      (crlf) |If you have two serial ports, and a mouse connected to COM1:,|
  78.      (crlf) |then type M1 followed by a carriage return, otherwise just type|
  79.      (crlf) carriage |return : |)
  80.    (bind <mouse> (acceptline | |))
  81.    (write (crlf)
  82.      (crlf) |If you have a special file you always want loaded in when you|
  83.      (crlf) |start OPS5+, then type the name of the file, followed by a|
  84.      (crlf) |carriage return, otherwise just type carriage return : |)
  85.    (bind <file> (acceptline | |))
  86.    (make want-file)
  87.    (make file <file>)
  88.    (make develop <develop>)
  89.    (make mouse <mouse>)
  90.    (make pause <pause>)
  91.    (remove 1))
  92.  
  93. (p bad-develop
  94.    (develop <huh>)
  95.    -(develop << d | | >>)
  96.   -->
  97.    (write (crlf)
  98.      (crlf) |You typed | <huh> | instead of a d or just a carriage return|
  99.      (crlf) |for the parameter indicating whether you wish to begin in|
  100.      (crlf) |DEVELOP mode.| (crlf)
  101.      (crlf) |If you want to start each OPS5+ session in DEVELOP mode, type|
  102.      (crlf) |a D followed by a carriage return, otherwise, simply type a|
  103.      (crlf) carriage |return :|)
  104.    (bind <develop> (acceptline | |))
  105.    (make develop <develop>)
  106.    (remove 1))
  107.  
  108. (p bad-pause
  109.    (pause <junk>)
  110.    -(pause {<kbytes> <=> 1})
  111.    -(pause | |)
  112.   -->
  113.    (remove 1)
  114.    (write (crlf)
  115.      (crlf) |You typed | <junk> | instead of an integer for the number|
  116.      (crlf) |of K-bytes to be reserved.| (crlf)
  117.      (crlf) |Type the number of K-bytes reserved for the PAUSE|
  118.      (crlf) |feature followed by a carriage return, or simply type carriage|
  119.      (crlf) |return to get the 64K default:|)
  120.    (bind <pause> (acceptline | |))
  121.    (make pause <pause>))   
  122.  
  123. (p bad-mouse
  124.    (mouse <port>)
  125.    -(mouse << m1 m2 | | >>)
  126.   -->
  127.    (remove 1)
  128.    (write (crlf)
  129.      (crlf) |You typed | <port> | instead of M1 or M2.  The mouse port|
  130.      (crlf) |must be either M1 or M2.| (crlf)
  131.      (crlf) |If you have two serial ports, and a mouse connected to COM1:,|
  132.      (crlf) |then type M1 followed by a carriage return, otherwise just type|
  133.      (crlf) carriage |return : |)
  134.    (bind <mouse> (acceptline | |))
  135.    (make mouse <mouse>))   
  136.  
  137. (p want-file
  138.    (want-file)
  139.   -->
  140.    (remove 1)
  141.    (make do-file second yes))
  142.  
  143. (p make-defname-file
  144.    (make-file << y yes >>)
  145.    (do-file)
  146.   -->
  147.    (openfile opsbat |ops5.bat| out)
  148.    (make write-file exe |ops5.bat|)
  149.    (make batch-file |ops5.bat|)
  150.    (remove 1 2))
  151.  
  152. (p make-username-file
  153.    (make-file <file-name>)
  154.    -(make-file << y yes | | >>)
  155.    (do-file)
  156.   -->
  157.    (openfile opsbat <file-name> out)
  158.    (make write-file exe <file-name>)
  159.    (make batch-file <file-name>)
  160.    (remove 1 2))
  161.  
  162. (p write-exe
  163.    (write-file exe)
  164.    (batch-file)
  165.   -->
  166.    (write opsbat (tabto 1) |ops5plus.exe|)
  167.    (modify 1 ^2 file))
  168.  
  169. (p write-file
  170.    (file <filename>)
  171.    -(file | | )
  172.    {<writer> (write-file file)}
  173.   -->
  174.    (write opsbat |f=| (tabto 16) <filename>)
  175.    (remove 1)
  176.    (modify <writer> ^2 others))
  177.  
  178. (p no-file
  179.    (file | |)
  180.    {<writer> (write-file file)}
  181.   -->
  182.    (remove 1)
  183.    (modify <writer> ^2 others))
  184.  
  185. (p write-develop
  186.    (develop d)
  187.    (write-file others)
  188.   -->
  189.    (write opsbat d)
  190.    (remove 1))
  191.  
  192. (p write-pause
  193.    (pause {<kbytes> <=> 1})
  194.    (write-file others)
  195.   -->
  196.    (write opsbat <kbytes>)
  197.    (remove 1))
  198.  
  199. (p write-mouse
  200.    (mouse {<< m1 m2 >> <port>})
  201.    (write-file others)
  202.   -->
  203.    (write opsbat <port>)
  204.    (remove 1))
  205.  
  206. (p fix-space
  207.    (<< develop mouse pause >> ^2 | |)
  208.    -(make-file | |)
  209.   -->
  210.    (remove 1))
  211.  
  212. (p close-file
  213.    (batch-file <bfile>)
  214.    -(develop)
  215.    -(pause)
  216.    -(mouse)
  217.   -->
  218.    (closefile opsbat)
  219.    (write (crlf)
  220.      (crlf) |The batch file | <bfile> | has been written.| (crlf) (crlf)))
  221.  
  222. (watch 0)
  223. (make start)
  224. (default nil accept)  ; to accept input from the terminal
  225. (run)
  226. (exit)
  227.