home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Chapter VI - A Step by Step Tutorial
-
- This chapter is meant to assist in familiarizing you with T-Ref.
- However, before running T-Ref, it is a good idea to make several back-up
- copies of the program first. The program is not copy protected, so copying
- the program simply requires a "COPY *.* s: t:" command where 's:' is the
- source drive the enclosed diskette is on and 't:' is the target drive the
- blank formatted diskette is on. The diskette contains an AUTOEXEC file to
- boot T-Ref from power up. (You must of course supply the Operating System
- command file "COMMAND.COM").
- Once you have backed T-Ref to another diskette, load the new diskette
- into the default drive and type 'T-REF'. (It is a good idea to always use the
- newly created diskette and save the original diskette as an archived copy.)
- The program will load and the main screen (see page 2) will appear. Note the
- block cursor is at the 'Active Directory' field, which is presently blank.
-
-
- Cursor Movement:
-
- The first step in learning how T-Ref works is to learn how to move the
- block cursor about the screen. This is easy to do since T-Ref uses the arrow
- keys located on the numeric keypad area (the up, down, left, and right
- arrows). Strike the down arrow several times to see how the block cursor
- moves down the screen from field to field. Notice that when the block cursor
- is at the 'Active Output File' field and the down arrow is struck, the block
- cursor moves to the 'Source Listing' field, and from there to the 'Reserve
- Words' field. The block cursor will continue down the left side of the screen
- to the 'Begin Scanning' field and when the down arrow is struck again, will
- "wrap" back around to the 'Active Directory' field. The up arrow performs
- just the reverse: the block cursor moves up one field at a time along the left
- fields of the screen.
- The left and right arrows move the cursor left and right. Therefore, on
- lines where only one field exists, the block cursor does not move. Only the
- lines that two or three fields exist are affected by the left and right
- arrows. Try these keys on several lines of the screen.
- The Home key will send the block cursor immediately to the 'Active
- Directory' field, no matter where it is on the screen. Move the block cursor
- to somewhere else on the screen and strike the Home key. The End key will
- send the block cursor to the 'Begin Parsing' field, which is the last field at
- the bottom of the screen.
-
- Pop-Up Help Windows:
-
- Next, strike the F1 function key. Notice the window that appears in the
- middle of the screen. The information within the window is a description of
- what each of the function keys (F1 - F10) do. Strike any key to exit.
- The F2 function key is the other help key. The information that appears
- within the window depends upon the block cursor's location. Strike the Home
- key to move the block cursor to the 'Active Directory' field and then strike
- the F2 function key. Notice that the information provided about the field
- includes what the field is for and what are valid inputs for the field. Move
- the block cursor about the screen and try the F2 function key at each loca-
- tion.
-
-
-
-
- 21
-
-
-
-
-
-
-
-
- Exiting the program:
-
- The ESC key is used to exit the program. Strike the ESC key now. The
- question that is appearing now on the screen insures you don't exit the
- program when the ESC key is struck by mistake. Type 'N' for now to return to
- the program. When you are ready to exit the program, you need only strike the
- ESC key and respond 'Y' to this question.
-
-
-
- A demonstration program:
-
- The package enclosed includes a sample Pascal program called
- 'PRINTDOC.PAS'. The program is provided to demonstrate some of the capabil-
- ities of T-Ref. Move the block cursor to the 'Active Input' field. Type the
- name 'PRINTDOC' and hit return. (Remember, the file extension ".PAS" is
- assumed.) Notice that while you are typing the name of the file, the blinking
- cursor is within the block cursor located at the 'Input File' field. If you
- make a mistake typing the name 'PRINTDOC', strike the left arrow to back the
- blinking cursor up within the block cursor. Notice that when you hit return,
- the blinking cursor moves back to the end of the bottom line on the screen.
- After you have entered the name of the input file, move the block cursor
- to the 'Active Output File' field and again type 'PRINTDOC'. This is the name
- of the file the output source will be sent to. (Since a file name extension
- was not specified, "PRT" is assumed.) Like the input file name, the default
- disk drive and default directory will be used since the 'Active Directory'
- field is blank; therefore, the output file 'PRINTDOC.PRT' will be found on the
- same diskette as the input file.
-
- Activating the Source Listing and Cross Reference:
-
- For the purpose of this demonstration, run both the Source Listing and
- Cross Reference Listing. Set the 'Source Listing' field and the 'Cross
- Reference' field to "On". You may later wish to try different combinations of
- these and the fields that appear below these two.
-
- Setting the Source Listing fields:
-
- The program that is to be read ("PRINTDOC") has been set so that all
- letters are in lower case format. Set the 'Reserve Words' field to "Upper"
- and the 'Identifiers' field to "Forml" so that you can observe the difference.
- If not already so, turn the line numbering, the lexical and block levels, and
- the active procedures fields to "On". The 'Header', the 'Page Numbering', and
- the 'Include File' fields are covered below.
-
- Setting the Cross Reference fields:
-
- Assuming you are interested in getting a cross reference of the identi-
- fiers being USED, set all of the usage fields (the last or third cursor column
- for the first six fields under 'Cross Reference') to "Used" and set the scope
- fields (the six fields just left of the usage fields) to "PrgDf". (Quick:
- What kind of cross reference would a "SysDf" setting give you?) The 'Header',
- the 'Page Numbering', and the 'Include File' fields are covered below.
-
-
-
-
- 22
-
-
-
-
-
-
-
-
- Output Headers:
-
- Now that the input and output files have been specified and the listing
- parameters are set, let's create a header for the source output and the cross
- reference output listings. For the source output header, strike the F3
- function key. The number of lines to be used for the header must be between 1
- and 5 (of course, zero (0) is valid, but that won't give you a header), so
- give it 2 lines by typing '2' and hitting enter. Remember that when the
- header is printed at the top of each page, the program will automatically
- buffer blank lines before and after the header, so it is not necessary to do
- so within the header.
- The program has now given you a work area in which to create the header:
- 2 lines by 75 columns in size. Any of the printable ASCII keys can be typed
- within this area. The arrow keys (up, down, left, and right) can be used to
- position the cursor where you wish to type text. These keys are non-
- destructive, so data will not be lost by moving the cursor over the top of
- existing text. Also the Home key moves the cursor to the first column of the
- present line and the End key moves the cursor to the end of the present line.
- Notice there is a list of valid keys given at the bottom of the window. Try
- each of these keys (except <Del>) so you will become familiar with them.
- Type the following in the work area:
-
- Sample Heading For Source Listing
- Print Program
-
- When you have completed this, hit the ESC key. This action completes the
- header creation process.
- Now, for the cross reference header, the sequence is exactly the same.
- Strike the F4 function key and respond with '2' again. Type the following
- into the work area:
-
- Sample Heading for Cross Reference Listing
- Print Program
-
- Again, hit the ESC key to complete the header creation process.
- Before the source listing and cross reference headers are printed with
- the other information, you must make sure the 'Header' fields are set to "ON".
- If they are not, move the block cursor to the 'Header' fields and strike the
- space bar until the word "ON" appears within the block cursor. Do this for
- BOTH 'Header' fields.
-
- Paging:
-
- Turn paging on for both the source listing and the cross reference (if
- not presently turned on) by moving the block cursor to the 'Page Numbering'
- fields and striking the space bar until "ON" appears within the block cursor.
-
- Include File processing:
-
- To demonstrate the "OPT" (optional) setting on the two 'Include Files'
- fields work, move the block cursor to the 'Include Files' field under Source
- Listing. Hit the space bar until "Opt" appears within the block cursor. Hit
- the left or right arrow key to move the block cursor to the 'Include Files'
- field under Cross Reference. Again hit the space bar until "Opt" appears
- within the block cursor.
-
-
- 23
-
-
-
-
-
-
-
-
- Running the program:
-
- Now we are ready to run the program! But before you do, strike the F10
- key to save the present field settings. Now, strike the END key to move the
- block cursor to the "Begin Parsing" field, hit the space bar until the word
- "YES" appears within the block cursor, and hit the Return key.
- The "Begin Parsing" field will be replaced by
-
- "Now Parsing Line"
-
- and a counter will count each line that is parsed. When the include file
- compiler directive within PRINTDOC is reached,
-
- "Include File = PRINTDOC.LIB"
-
- will appear above the counter, the 'Include File' field under the Source
- Lister will flash (for color monitors), and
-
- "Do you wish to include this file? <Y,N>:"
-
- will appear below the counter. Respond by typing "Y". You are telling the
- computer to include this file in the source listing. Again the question will
- appear and the 'Include File' field under the Cross Referencer will flash
- (again, for color monitors). Respond here by typing "N" for no cross refer-
- ence of identifiers found within the include file.
- If you ever start the parser before you are ready, or if you decide to
- make some changes to the output, strike any regular key during the parsing
- process. When the question
-
- "Do you wish to stop parsing? <Y,N>: "
-
- appears, respond "Y". The files will be closed and the parser will stop. If
- you accidentally strike a key during the parsing process, respond "N" to this
- question.
- When the parsing is complete, the counter will be replaced by
-
- "Cross Referencing A's"
-
- and the alpha counter will count up through "Z". Once completed, the 'Begin
- Parsing' field returns and the line below it will signify the number of
- identifiers cross referenced. You have now completed your first source and
- cross reference listing.
- Exit the program by striking the ESC key and responding "Y". Enter Turbo
- or any other ASCII editor to browse the file "PRINTDOC.PRT" that resides on
- your default drive. You may wish to try several different combinations of
- settings for the fields to become more familiar with the program and find the
- settings that you best like.
-
-
-
-
-
-
-
-
-
-
- 24
-
-
-
-
-