home *** CD-ROM | disk | FTP | other *** search
- #|
- Installation program for setting up a batch file
- (generally ops5.bat) which runs the ops5plus.exe
- program with appropriate parameters.
- |#
-
- (p initial (start)
- -->
- (write
- (crlf) |We will set up a batch file which calls the ops5plus|
- (crlf) |program with the appropriate parameters for your system.|
- (crlf) |The default parameters are to start in the standard mode|
- (crlf) |rather than starting with the graphics DEVELOP mode, to|
- (crlf) |have 64K bytes of memory reserved for the PAUSE feature,|
- (crlf) |and assume when you use DEVELOP mode that a mouse is connected|
- (crlf) |to COM1: if you have one serial port, and to COM2: if you|
- (crlf) |have two serial ports.| (crlf)
- (crlf) |Type a Y if you like these defaults, N if you need different|
- (crlf) |defaults: |)
- (bind <ans> (acceptline))
- (make do-file first <ans>)
- (remove 1))
-
- (p bad-ans
- (do-file first <ans>)
- -(do-file first << y yes n no >>)
- -->
- (remove 1)
- (write (crlf)
- (crlf) |Your answer to the first question must be Y or N.|
- (crlf) |Here's the question again.|)
- (make start))
-
- (p get-file-name
- (do-file <n> << y yes >>)
- -(make-file)
- -->
- (write
- (crlf) |If you like the name ops5.bat for the file you will|
- (crlf) |normally use to run OPS5+, and you want it written to|
- (crlf) |the default drive, then type Y, otherwise, type the|
- (crlf) |name (maximum eight letters), or drive:name of the|
- (crlf) |filename you want instead. Remember to give the `.bat'|
- (crlf) |extension. :|)
- (bind <ans> (acceptline | |))
- (make make-file <ans>))
-
- (p bad-ans-two
- (make-file | |)
- (do-file <n> <ans>)
- -->
- (remove 1 2)
- (write (crlf)
- (crlf) |Your answer to the question must be Y or a filename.|
- (crlf) |Here's the question again.|)
- (make do-file <n> <ans>))
-
- (p get-params
- (do-file first << n no >>)
- -->
- (write
- (crlf) |If you want to start each OPS5+ session in DEVELOP mode, type|
- (crlf) |a D followed by a carriage return, otherwise, simply type a|
- (crlf) carriage |return:|)
- (bind <develop> (acceptline | |))
- (write (crlf)
- (crlf) |To determine the amount of memory you want to reserve for|
- (crlf) |the PAUSE feature, just think of the size of the programs|
- (crlf) |you wish to run during a PAUSE. Reserving 0K bytes is good for|
- (crlf) |running large productions systems, when you don't expect to|
- (crlf) |PAUSE, 64K bytes of memory are good for running most editors.|
- (crlf) (crlf) |Type the number of K-bytes reserved for the PAUSE|
- (crlf) |feature followed by a carriage return, or simply type carriage|
- (crlf) |return to get the 64K default:|)
- (bind <pause> (acceptline | |))
- (write (crlf)
- (crlf) |If you have two serial ports, and a mouse connected to COM1:,|
- (crlf) |then type M1 followed by a carriage return, otherwise just type|
- (crlf) carriage |return : |)
- (bind <mouse> (acceptline | |))
- (write (crlf)
- (crlf) |If you have a special file you always want loaded in when you|
- (crlf) |start OPS5+, then type the name of the file, followed by a|
- (crlf) |carriage return, otherwise just type carriage return : |)
- (bind <file> (acceptline | |))
- (make want-file)
- (make file <file>)
- (make develop <develop>)
- (make mouse <mouse>)
- (make pause <pause>)
- (remove 1))
-
- (p bad-develop
- (develop <huh>)
- -(develop << d | | >>)
- -->
- (write (crlf)
- (crlf) |You typed | <huh> | instead of a d or just a carriage return|
- (crlf) |for the parameter indicating whether you wish to begin in|
- (crlf) |DEVELOP mode.| (crlf)
- (crlf) |If you want to start each OPS5+ session in DEVELOP mode, type|
- (crlf) |a D followed by a carriage return, otherwise, simply type a|
- (crlf) carriage |return :|)
- (bind <develop> (acceptline | |))
- (make develop <develop>)
- (remove 1))
-
- (p bad-pause
- (pause <junk>)
- -(pause {<kbytes> <=> 1})
- -(pause | |)
- -->
- (remove 1)
- (write (crlf)
- (crlf) |You typed | <junk> | instead of an integer for the number|
- (crlf) |of K-bytes to be reserved.| (crlf)
- (crlf) |Type the number of K-bytes reserved for the PAUSE|
- (crlf) |feature followed by a carriage return, or simply type carriage|
- (crlf) |return to get the 64K default:|)
- (bind <pause> (acceptline | |))
- (make pause <pause>))
-
- (p bad-mouse
- (mouse <port>)
- -(mouse << m1 m2 | | >>)
- -->
- (remove 1)
- (write (crlf)
- (crlf) |You typed | <port> | instead of M1 or M2. The mouse port|
- (crlf) |must be either M1 or M2.| (crlf)
- (crlf) |If you have two serial ports, and a mouse connected to COM1:,|
- (crlf) |then type M1 followed by a carriage return, otherwise just type|
- (crlf) carriage |return : |)
- (bind <mouse> (acceptline | |))
- (make mouse <mouse>))
-
- (p want-file
- (want-file)
- -->
- (remove 1)
- (make do-file second yes))
-
- (p make-defname-file
- (make-file << y yes >>)
- (do-file)
- -->
- (openfile opsbat |ops5.bat| out)
- (make write-file exe |ops5.bat|)
- (make batch-file |ops5.bat|)
- (remove 1 2))
-
- (p make-username-file
- (make-file <file-name>)
- -(make-file << y yes | | >>)
- (do-file)
- -->
- (openfile opsbat <file-name> out)
- (make write-file exe <file-name>)
- (make batch-file <file-name>)
- (remove 1 2))
-
- (p write-exe
- (write-file exe)
- (batch-file)
- -->
- (write opsbat (tabto 1) |ops5plus.exe|)
- (modify 1 ^2 file))
-
- (p write-file
- (file <filename>)
- -(file | | )
- {<writer> (write-file file)}
- -->
- (write opsbat |f=| (tabto 16) <filename>)
- (remove 1)
- (modify <writer> ^2 others))
-
- (p no-file
- (file | |)
- {<writer> (write-file file)}
- -->
- (remove 1)
- (modify <writer> ^2 others))
-
- (p write-develop
- (develop d)
- (write-file others)
- -->
- (write opsbat d)
- (remove 1))
-
- (p write-pause
- (pause {<kbytes> <=> 1})
- (write-file others)
- -->
- (write opsbat <kbytes>)
- (remove 1))
-
- (p write-mouse
- (mouse {<< m1 m2 >> <port>})
- (write-file others)
- -->
- (write opsbat <port>)
- (remove 1))
-
- (p fix-space
- (<< develop mouse pause >> ^2 | |)
- -(make-file | |)
- -->
- (remove 1))
-
- (p close-file
- (batch-file <bfile>)
- -(develop)
- -(pause)
- -(mouse)
- -->
- (closefile opsbat)
- (write (crlf)
- (crlf) |The batch file | <bfile> | has been written.| (crlf) (crlf)))
-
- (watch 0)
- (make start)
- (default nil accept) ; to accept input from the terminal
- (run)
- (exit)