home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / DURASCRN.ZIP / DS.DOC < prev   
Encoding:
Text File  |  1987-07-06  |  16.8 KB  |  359 lines

  1.                            Dura Screen
  2.                 (C)Copyright J. Adkins 1986, 1987.
  3.                          P.O. Box 1160
  4.                         Rialto, CA 92376
  5.  
  6. Released to public domain 3/9/87
  7.  
  8. ******************************************************************************
  9. This program represents many hours of work. You are encouraged to give away as
  10. many copies as you want. A donation of any amount will be greatly appreciated.
  11. Please send donations to the above address.
  12. ******************************************************************************
  13.  
  14. INSTRUCTIONS FOR USING DURA SCREEN.   (C)Copyright J. Adkins 1986.
  15.  
  16. DURA SCREEN generates fancy color menus and input screens. The number of colors
  17. and complexity of the generated screens are almost unlimited. It must be
  18. mentioned, however, that a large number and variety of colors will cause your
  19. generated program to be larger. A simple one color program might require 50
  20. lines. A program that generates a rainbow of colors and dozens of screen
  21. inputs can go over 500 lines.
  22.  
  23. Files are written to disk in 8 different formats:
  24.  
  25. DISK FILE:
  26. A file is saved that contains all the necessary information to write a
  27. program. It is suggested that you use this mode to save all your projects.
  28. Later, it can be retrieved and programs can be generated.
  29.  
  30. STANDARD SCREENS:
  31. The generated code is designed to work on most all computer systems that can
  32. support Turbo Pascal.
  33.  
  34. IBM SCREENS:
  35. The generated code will only work on IBM or close compatible screens because
  36. the output is sent directly to the screen memory. These screens are about 10
  37. times faster than the standard screens that use the writeln statement. This
  38. code and the standard screen code can be used in other Turbo Pascal programs.
  39.  
  40. BASIC SCREENS:
  41. The generated code is written to a disk file in the BASICA language format.
  42. Most IBM color compatible systems should be able to execute this code. You
  43. can also merge it into other BASIC programs.
  44.  
  45. C LANGUAGE SCREENS:
  46. Non-Color graphics screens are generated in C. The screen color attributes
  47. aren't yet supported in this format.
  48.  
  49. ASSEMBLER SCREENS:
  50. Like the C Language screens, The screen color attributes aren't yet supported.
  51. The generated code can be assembled, linked and executed.
  52.  
  53. PROLOG SCREENS:
  54. Screen color attributes are supported, however, it is wise to stick with
  55. fewer colors. Screen input variables of String, Integer and Real are
  56. supported, but type checking is not done on the input.
  57.  
  58. DBASE III + SCREENS
  59. A 'PRG' file will be created. Screen variable type and length checking is
  60. performed. All screen color attributes are supported.
  61.  
  62. ANSI COMPATIBLE SCREENS
  63. These files can be 'typed' directly from dos. In order for them to work
  64. properly, the following line should be added to your CONFIG.SYS file:
  65.                    device = ansi.sys
  66. The ANSI.SYS driver will use all the color attributes and cursor locating
  67. commands to display the file. You can really dress up batch files with this
  68. feature.
  69.  
  70. ASCII FILE:
  71. A duplicate of your screen (minus color attribute) is saved to a disk file.
  72. This file can be 'typed' directly from DOS, or dumped to a printer by using
  73. a dump utility program. These screens can also be read by Dura Screen with
  74. the 'A' command. Any language capable of displaying block graphics should be
  75. able to read and display these screens. They can be used to dress up batch
  76. files by using the 'TYPE' statement. The following is an example that assumes
  77. you have created and saved a screen called MENU.DAT. Use the Turbo editor and
  78. ècreate the following batch file called TEST.BAT.
  79.  
  80. PROMPT $P $G YOUR COMMAND
  81. ECHO OFF
  82. CLS
  83. TYPE MENU.DAT
  84.  
  85. This is the start of an elementary DOS Menu system. It only illustrates some
  86. of the possibilities of Dura Screen.
  87.  
  88.  
  89. ***********************************************************
  90. Compiling Dura Screen:
  91.  
  92. The source code for Dura Screen is NOT in public domain. To acquire a copy,
  93. send $30 to:
  94. J. Adkins
  95. Box 1160
  96. Rialto, CA 92376
  97.  
  98. IMPORTANT!!! Use the following sequence of commands to compile Dura Screen.
  99. First, load Turbo Pascal. Type the following commands (without the comments).
  100.  
  101. W
  102. DS     <cr>
  103. OC     { As in OSCAR CHARLIE }
  104. A
  105. 100    { Number 100 }
  106. I      { As in Ivan }
  107. 0      { Zero }
  108. Q      { As in Quit }
  109. C      { As in Compile }
  110.  
  111. The parameters prevent the program from using all the stack space.
  112.  
  113.  
  114. GENERIC MS-DOS MACHINES
  115. If your machine isn't fully IBM compatible, you may want to avoid the fast
  116. screen procedures in ds. Two extra include files are provided for you to use
  117. if your machine has a different video address than IBM. Change the include
  118. section of DS.PAS as suggested:
  119.  
  120. {$I DSMON.INC}
  121. {$I DSFW.INC}
  122. {$I DSEXIST.INC}
  123. {$I DSEXCHG.INC}
  124. {$I DSDIR.INC}
  125. {$I DSCOLOR.INC}
  126. {$I DSEXEC.INC}
  127. {$I DSBORD.INC}
  128. {$I DSLOGO.INC} { Replace with LOGO.INC if not true IBM compatible }
  129. {$I DSVALS.INC}
  130. {$I DSANSI.INC}
  131. {$I DSIO.INC}
  132. {$I DSVIEW.INC} { Replace with VIEW.INC if not true IBM compatible }
  133.  
  134.  
  135. DURA SCREEN COMMANDS
  136.  
  137. From the DOS prompt, type DS and press the ENTER key. The screen will go
  138. blank and you will see a one line menu at the bottom of the screen. It is
  139. impossible to display all the DURA SCREEN commands on one line. The most often
  140. used ones are displayed.
  141.  
  142. CURSOR CONTROL: The arrow keys move the cursor up/down/right/left. Get the feel
  143.                 of the cursor movement by experimenting with the arrow keys.
  144.                 The keypad must be locked in the cursor control mode.
  145.  
  146.  
  147. A               Import ASCII: Files that were created by other programs can be
  148.                 read by Dura Screen. If you want to start with a clear screen,
  149.                 you should use the 'E' command before importing the file.
  150.  
  151. G               The GET command: press G on the keyboard (upper or lower case)
  152.                 and a display of all the ASCII characters will be displayed on
  153.                 the screen. Pick the number corresponding to the ASCII char-
  154.                 acter you want to use in your sketch on the screen. Just as an
  155.                 exercise, type in 176 and press the ENTER key. Move the cursor
  156.                 with the arrow keys and see what happens. You will see a fancy
  157.                 pattern move in the direction of the arrow key. DURA SCREEN
  158.                 is actually drawing while using this pattern (176).
  159.  
  160. ENTER           Pressing Enter resets the cursor mode so you can move around
  161.                 the screen without disrupting anything you have created. Move
  162.                 the cursor near the top of the screen and to the left to
  163.                 10, 5. (The positions are displayed at the top left of the
  164.                 screen).
  165.  
  166. B               Draws a box. Press the B key. Look at the bottom of the screen.
  167.                 You will see a choice: Single or Double line box. Press D on
  168.                 the keyboard. Look at the bottom of the screen again. Move the
  169.                 cursor to the opposite diagonal corner of where you want your
  170.                 box to end, then press the X key. A box will appear.
  171.  
  172. C               Color change. Press the C key on the keyboard. Press the T key.
  173.                 To select the Text color. At the bottom of the screen, you
  174.                 you will see 15 color choices. key in the number ( 1 thru 30)
  175.                 corresponding to the color of your choice. Now move the cursor
  176.                 up to the left top inside our box and to draw another box by
  177.                 pressing the B key. Colors above 16 are blinking colors. DURA
  178.                 SCREEN will use them, but they aren't displayed in the color
  179.                 selection. Press the G key again and select pattern 196. Now
  180.                 move the cursor with the arrow keys and see what happens.
  181.  
  182. D               Erase a portion of the screen. Move the cursor to the
  183.                 opposite diagonal corner to erase and press the 'X' key.
  184.  
  185. E               Erase the entire screen and start over.
  186.  
  187. T               Key in text. Move the cursor near the center of the screen.
  188.                 Press T on the keyboard. Type in some text (a few words). and
  189.                 press the ENTER key. Now you can begin to visualize using
  190.                 DURA SCREEN to design a fancy color menu program procedure or
  191.                 subroutine.
  192.  
  193. I               Input variable. Do you like those fancy programs that have
  194.                 nice input screens? You know, the ones that jump to different
  195.                 screen positions for your input? Press I on the keyboard.
  196.                 Look at the bottom of the screen. Press S (for string).
  197.                 Dura Screen will ask for a string length. This makes it
  198.                 possible to do strict length checking in your programs.
  199.                 Move the cursor to another place on the screen. Press I again.
  200.                 press S again.
  201.                 Integer and real variables are also provided for. Strict type
  202.                 checking will be done in your generated program to prevent the
  203.                 operator from keying in the wrong value (string for integer,
  204.                 etc) or crashing the program.
  205.  
  206. S               Save program to disk. Press S on the keyboard. Press D (for
  207.                 disk file). This way, you can use the code later if you
  208.                 decide to modify it. Key in the filename (no extension).
  209.                 A good name would be TEST. Key in TEST and press ENTER.
  210.                 Press S again (now we want to write a program). Key in the
  211.                 filename (no extension). Press P for PASCAL program, B for a
  212.                 BASIC program, E for an ANSI, L for PROLOG, etc.
  213.  
  214.                 It is strongly suggested that you use 'F' to save ALL of
  215.                 your work. This is the only file format that can be re-used
  216.                 for everything.
  217.  
  218.                 Your file can also be saved in ASCII format. These files can
  219.                 be 'typed' directly from DOS, used in BATCH files, or read by
  220.                 any program capable of displaying block graphics. It must be
  221.                 remembered, however, that only the <D> type of file can be
  222.                 re-used by Dura Screen, because they contain all the infor-
  223.                 mation needed to write a program.
  224.  
  225.                 The files saved with the 'E' (ANSI) format can be 'typed' from
  226.                 DOS, and will display all the color attributes, etc. For these
  227.                 files to be successfully displayed, you must have the follow-
  228.                 ing line in your CONFIG.SYS file:
  229.                           DEVICE=ANSI.SYS
  230.                 If the CONFIG.SYS FILE doesn't exist, you must create one.
  231.                 Here is a suggested method:
  232.                 COPY CON CONFIG.SYS              <PRESS ENTER>
  233.                 DEVICE=ANSI.SYS                  <PRESS ENTER>
  234.                                                  <PRESS F6, ENTER>
  235.                 Also, 'ANSI.SYS' must be in the root directory. ANSI.SYS is a
  236.                 device driver that enhances the display and keyboard capa-
  237.                 bility of your PC.
  238.  
  239.  
  240. L               Load program file. Press L on the keyboard. Key in the filename
  241.                 that you previously saved with the S command. The program file
  242.                 you previously saved will now appear on the screen. If no
  243.                 extension is given, then '.DSD' is assumed. If an '.ANS'
  244.                 extension is typed, then an ANSI compatible file will be
  245.                 expected. For loading ASCII files, use the 'A' command.
  246.  
  247. V               View commands. Press V on the keyboard. A list of commands will
  248.                 appear on the screen. Press any key to return to your sketch.
  249.  
  250. /               CUT & PASTE: Imagine you would like to move a block of the
  251.                 screen to a new location. This command allows you move a
  252.                 section from the screen to another location on the screen.
  253.                 This command should be used with caution. It should be
  254.                 used before any of the 'I' ( Input Variable ) commands.
  255.  
  256. >               EXECUTE DOS: This command allows you to execute most of the
  257.                 DOS commands, or run another program from Dura Screen. To
  258.                 Re-Enter Dura Screen from the DOS prompt, type EXIT and press
  259.                 ENTER.
  260.  
  261. Q               Quit. Press Q on the keyboard. Press Y.
  262.  
  263. RUNNING YOUR PROGRAM UNDER BASIC: Insert a diskette that has a copy of BASIC
  264. into drive B:
  265. (GWBASIC, BASICA, BASIC, ETC. We will assume it's called BASIC).
  266. Type B:BASIC and press ENTER.
  267. Remove the BASIC diskette. Place your DURA SCREEN diskette in drive B:
  268. Type RUN"B:TEST" and press enter. (This is assuming you called your generated
  269. BASIC program "TEST").
  270. Type SYSTEM to exit BASIC.
  271.  
  272. RUNNING YOUR PROGRAM UNDER TURBO PASCAL: Insert Turbo Pascal diskette in drive
  273. A: insert DURA SCREEN diskette in drive B:
  274. Type A: press ENTER.
  275. Type TURBO    press ENTER.
  276. Press Y
  277. Press L
  278. Press B
  279. Press ENTER.
  280. Press W
  281. type TEST (assuming that's what you called your Pascal program).
  282. Press ENTER.
  283. Press R to run the program.
  284.  
  285. USING CAPTURE.COM: From the DOS prompt, type CAPTURE and press ENTER.
  286. Now, run any program that has a nice menu you would like to capture. When
  287. the screen appears that you would like to work with, press <SHIFT><PRTSC>,
  288. the same as if you were going to dump the screen to printer. A file will
  289. be created 'DS.ASC' that you can work with in DURA SCREEN with the 'A'
  290. (Import ASCII) command. This allows you to use nice block graphic screens
  291. from other programs in DURA SCREEN.
  292.  
  293.  
  294.                                 NOTES:
  295.  
  296. DURA SCREEN uses block graphics only. It could run on systems that don't
  297. have a graphics card installed. At least it could be easily modified
  298. to run on a particular system. It mainly uses 2 arrays. One array is for
  299. the screen x,y coordinates, the other is for the color attribute. It
  300. doesn't depend on video ram addresses or execute any machine dependent
  301. procedures. It will, however, write IBM specific programs {at your option)
  302. for maximum speed.
  303. The source code is provided with DURA SCREEN so you can modify it to suit your
  304. own needs. The modified program may NOT be resold for profit,
  305.  
  306. With a little practice, DURA SCREEN can be utilized to create some SPECTACULAR
  307. color screens with formatted input. These programs can be merged into your
  308. own programs.
  309.  
  310.                    MERGING YOUR CODE INTO OTHER PROGRAMS:
  311.  
  312. Let's say you have just written a terrific program. However, you haven't yet
  313. taken the time to polish things up a bit. You run DURA SCREEN and create a
  314. fancy menu. Now, how do we get it into your program?
  315.  
  316. TURBO PASCAL: (This assumes you know how to use Turbo Pascal).
  317.               Load your program into the Turbo Editor. Move the cursor to the
  318.               exact position you would like to place the fancy menu. Use the
  319.               Load block from disk command. EXAMPLE:
  320.               Hold down the CTRL key and press the K key.
  321.               Press the R key.
  322.               Answer the prompt (Read block from file:) Type TEST.PAS
  323.               (or whatever you called the fancy menu).
  324.               The TEST.PAS menu code will appear in your program.
  325.               You will have to modify the TEST.PAS code a bit.
  326.               Change Program Test;
  327.               to:    Procedure Test;
  328.               Change End.
  329.               to     End;
  330.  
  331. BASIC:        From the DOS system, type BASIC and press ENTER.
  332.               Insert the diskette that holds the fancy menu TEST.BAS  ...
  333.               into drive B:
  334.               Type LOAD"B:TEST"  and press ENTER.
  335.               Now we must determine the line number range to make sure
  336.               TEST.BAS will insert itself in the correct place in your
  337.               basic program. Let's assume you want your new menu TEST.BAS
  338.               to start at line number 500.
  339.               Type RENUM 500 and press ENTER.
  340.               Now we must re-save the TEST.BAS in ASCII format.
  341.               Type SAVE"B:TEST",A
  342.               The A is very important here. It tells BASIC to save the code
  343.               in ASCII format so it can be merged with other programs.
  344.  
  345.               Insert the diskette that holds your BASIC program that you
  346.               want to merge the generated DURA SCREEN code into.
  347.               type LOAD"B:FILENAME" (substitute FILENAME with your BASIC
  348.               program name. Press ENTER.
  349.               insert the diskette that holds your new TEST.BAS program
  350.               that you just renumbered and resaved.
  351.               Type MERGE"B:TEST" and press ENTER.
  352.               Of course, all this will be easier if you put a copy of BASIC
  353.               on your drive B: diskette to start with. It will prevent all
  354.               the diskette swapping.
  355.  
  356.               Now you can run or resave your program with the new fancy
  357.               menu created by Dura Screen. It should run without any changes.
  358.  
  359.