Category : Miscellaneous Language Source Code
Archive   : OPS5PC36.ZIP
Filename : PC.OPS

 
Output of file : PC.OPS contained in archive : OPS5PC36.ZIP
;
; Sample OPS5/pc program to select a PC configuration for your needs.
;


(literal ;startup element
start)

(literal ;questions
question
text ;question prompt
category ;question category
answer) ;user's response

(literal ;hardware items
hardware
name ;name of hardware
category ;category
printed) ;has it been displayed yet?

(literal flag ;print-header flag
header)



;;;
;;; Execution begins here
;;;

(p hello
-(start)
-->
(write (crlf) |Simple OPS5/pc Program to select a PC configuration| (crlf)
|for your particular needs.| (crlf)
|PLEASE ANSWER QUESTIONS WITH Y OR N.| (crlf) (crlf))
(make start) ;make 'start' so that this rule won't fire again

;;; Create Questions ;;;

(make question
^text | Word Processing? |
^category DISK
)
(make question
^text | Database activities ? |
^category DISK
)
(make question
^text | Telecommunications? |
^category TC
)
(make question
^text | Computer-Aided Design? |
^category GRAPHIC
)
(make question
^text | Programming? |
^category DISK
)
(make question
^text | Desktop Publishing? |
^category GRAPHIC
)

(write |Will you use your computer for:| (crlf))
)


;;;; Ask all of the questions that haven't been answered ;;;;
;
(p ask-questions
{ (question ^text ^answer nil) }
-->
(write )
(modify ^answer (accept))
)

;;
;; Rules dealing with selecting the best configuration
;;


;;;; If using for CAD or Desktop Publishing, always select EGA or VGA
;
(p graphics
(question ^category GRAPHIC ^answer << y Y >>)
-(question ^answer nil)
-(hardware ^category VIDEO)
-->
(make hardware ^name |EGA or VGA Card and Monitor| ^category VIDEO)
(make hardware ^name |80386 CPU w/optional Math Co-processor|
^category CPU)
(make hardware ^name |Mouse| ^category OTHER)
(make hardware ^name |High-quality Dot Matrix or Laser Printer|
^category PRINTER)
)

;;;; If using for Programming,WP, or Database, select a large hard disk
;
(p harddisk
(question ^category DISK ^answer << y Y >>)
-(question ^answer nil)
-(hardware ^category DISK)
-->
(make hardware ^name |70 Meg. or higher Hard Disk| ^category DISK)
)

;;;; If using for Prog, WP, or DB, also add a printer, if we don't
;;;; already have one
;
(p printer
(question ^category DISK ^answer << y Y >>)
-(question ^category GRAPHIC ^answer << y Y >>)
-(hardware ^category PRINTER)
-->
(make hardware ^name |Dot-matrix/Near letter-quality printer|
^category PRINTER)
)

;;;; If using for Telecommunications, add modem and serial card
;
(p telecomm
(question ^category TC ^answer << y Y >>)
-(question ^answer nil)
-(hardware ^category TC)
-->
(make hardware ^name |Modem (external needs serial card)| ^category TC)
)

;;
;; Rules that add in other hardware not already added
;;

;;;; If no hard disk, add a small one
;
(p cheap-hd
(start)
-(question ^answer nil)
-(hardware ^category DISK)
-->
(make hardware ^name |40 Meg. hard disk| ^category DISK)
)

;;;; If no monitor, add one
;
(p cheap-monitor
(start)
-(question ^answer nil)
-(hardware ^category VIDEO)
-->
(make hardware ^name |Any monitor will do (Mono or color)| ^category VIDEO)
)

;;;; If no CPU, add one
;
(p cheap-cpu
(start)
-(question ^answer nil)
-(hardware ^category CPU)
-->
(make hardware ^name |80286 CPU| ^category CPU)
)

;;
;; Finally, print out all hardware and clean up memory
;;

;;;; print header
;
(p print-header
(hardware)
-(question ^answer nil)
-(hardware ^printed yes)
-(flag ^header yes)
-->
(write (crlf) (crlf) |Based on my limited capabilities at this time,| (crlf)
|I recommend the following:| (crlf) (crlf))
(make flag ^header yes)
)

;;;; Print all unprinted items
;
(p print-hardware
(hardware)
-(question ^answer nil)
{ (hardware ^name ^printed nil) }
-->
(write (crlf))
(modify ^printed yes)
)

;;;; After all questions are answered and all hardware is printed,
;;;; clean up memory
;
(p cleanup-memory
(start)
-(question ^answer nil)
-(hardware ^printed nil)
-->
(remove *)
(halt)
)


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : OPS5PC36.ZIP
Filename : PC.OPS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/