home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / V_TEACH.ZIP / VTL.TXT < prev    next >
Encoding:
Text File  |  1987-01-14  |  122.0 KB  |  4,301 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.          IBM Personal Computer (R) Virtual Teaching Language Interpreter
  17.  
  18.                                 Reference Manual
  19.  
  20.                                    July, 1983
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                                 Table of Contents
  72.  
  73.             Introduction...........................................3
  74.             Installation of the Interpreter........................4
  75.             Features of the Interpreter............................6
  76.             Commands and Syntax....................................8
  77.                 TYPE command......................................10
  78.                 ACCEPT command....................................11
  79.                 MATCH command.....................................12
  80.                 JUMP command......................................13
  81.                 USE subroutine command............................14
  82.                 RETURN from subroutine command....................15
  83.                 END command.......................................16
  84.                 CALCULATE command.................................17
  85.                 HARDCOPY command..................................18
  86.                 OPEN file command.................................19
  87.                 eXIT (close) file command.........................20
  88.                 GET (read) from file command......................21
  89.                 PUT (write) to file command.......................22
  90.                 LINK (chain program) command......................23
  91.                 INSERT (in comparison register) command...........24
  92.                 FRAME (text display) command......................25
  93.                 YES-IF (comparison) command.......................26
  94.                 DO (execute file) command.........................27
  95.                 WAIT (for keystroke) command......................28
  96.                 ZERO (registers) command..........................29
  97.            Advanced Commands......................................30
  98.                 Display modes.....................................30
  99.                 VIDEO control commands............................31
  100.                     VIDEO COLOR command...........................32
  101.                     VIDEO LOCATE command..........................34
  102.                     VIDEO SELECT command..........................35
  103.                 SCREEN graphics commands..........................36
  104.                     SCREEN DRAW command...........................38
  105.                     SCREEN CIRCLE command.........................40
  106.                     SCREEN SET and RESET commands.................41
  107.                     SCREEN PAINT command..........................42
  108.                     SCREEN LINE command...........................43
  109.                 KEY (function key) command........................44
  110.                 BEEP (sound) command..............................45
  111.                 QUICKMOVE (graphics load/dump) command............47
  112.                 NEWDISPLAY (adapter select) command...............48
  113.            Use of Interpreter and Programming Examples............49
  114.  
  115.            Appendix A--Error Messages.............................57
  116.            Appendix B--Extended String Registers..................60
  117.            Appendix C--Intermixing Text and Graphics..............61
  118.            Index..................................................62
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.         Introduction
  138.  
  139.              This  manual  describes  how  to use  the  Virtual  Teaching 
  140.         Language interpreter.   The first section covers installation  of 
  141.         the  interpreter.   The  second section explores the features  of  
  142.         the  interpreter.    The  third  section  explains  the  commands 
  143.         available  in  this implementation of the  PILOT  language.   The 
  144.         fourth section demonstrates some examples of how the commands may 
  145.         be  used  to  create interactive  courseware  for  computer-aided 
  146.         instruction (CAI).
  147.              The  manual  assumes that the reader is  at  least  slightly 
  148.         familiar with PC-DOS(R) and has learned how to use either the DOS 
  149.         line  editor  or a word-processing program to create text  files.  
  150.         No other knowledge is directly required to use either this manual 
  151.         or the interpreter.
  152.              Virtual  Teaching Language (VTL) was written in DOS advanced 
  153.         BASIC,  and  is distributed in machine-readable form as the  file 
  154.         VTL.EXE,  except  to  those  users who have  purchased  a  source 
  155.         license.   This  manual,  the interpreter,  and source  code  are 
  156.         copyrighted  material,  under  the  protection  of  Federal  Law.  
  157.         The program and manual are being distributed as 'share-ware'  via 
  158.         computer  clubs and public domain libraries.   Anyone wishing  to 
  159.         make  use of VTL may do so for non-commercial purposes,  and  may 
  160.         copy  and distribute the program without restrictions other  than 
  161.         this.   Persons  wishing  to distribute VTL for  commercial  uses 
  162.         (i.e.  as part of a proprietary teaching package) may do so under 
  163.         license from the author for a nominal fee.   Users are encouraged 
  164.         to  register with the author.   The registration fee is $25.00 US 
  165.         for non-commercial users.   This money will be used to defray the 
  166.         costs  of continued support and improvement of the VTL  language.  
  167.         Registered   users   are   entitled  to   support   via   written 
  168.         correspondence to the address listed below, and will also receive 
  169.         notice  of  improved  releases of VTL (and  other  products  from 
  170.         Nuclear  Software.   Unauthorized (e.g.  commercial)  copying  or 
  171.         resale  of  the program or manual is a violation of Federal  Law, 
  172.         and may be punishable by imprisonment for up to one year,  and by 
  173.         a fine of up to $5000.
  174.              VTL.EXE  is  a stand-alone executable  file,  and  does  not 
  175.         require  the  IBM BASIC Compiler (R) run-time system  BASRUN.EXE. 
  176.         VTL.EXE requires at least 64K of RAM for safe operation,  and may 
  177.         require  96K to execute programs with many long  labels.  VTL.EXE 
  178.         may  be  run  safely on  single-sided  single-disk  systems,  and 
  179.         requires a lineprinter only for "HARDCOPY" commands,  which  may, 
  180.         however,  cause  an error if a lineprinter is not present or "on-
  181.         line".
  182.              This  version  of the interpreter is designed for  users  of 
  183.         either  the  IBM monochrome-printer adapter or the color  display 
  184.         adapter  in text or graphics mode.   The  interpreter  recognizes 
  185.         which  adapter  is  currently  in use,  and also  tests  for  the 
  186.         presence of the other adapter.   If both adapters are present,  a 
  187.         Virtual  Teaching Language program may use either via a  built-in 
  188.         command, and can tell which is present.
  189.              Users who are not familiar with the PILOT language may  find 
  190.         the  fourth  section  of this manual helpful as  initial  reading 
  191.  
  192.  
  193.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.         before diving into the remainder of the material presented  here.  
  203.         More experienced users may wish to begin by reading the reference 
  204.         section, and then refer to the last section for examples.
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  4
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.         I.  Installation of the Interpreter
  270.  
  271.              No  specific  procedure,  apart  from copying  the  material 
  272.         distributed, is required for installation of VTL.EXE.
  273.              The interpreter is packaged with the manuals on one  double-
  274.         sided  diskette.   The diskette contains both manuals and program 
  275.         examples,  in addition to two versions of the  interpreter.   The 
  276.         first  version,  VTL.EXE is for the IBM-PC/XT (R) and  compatible 
  277.         computers; the other, VTLJR.EXE, is for the PC-Jr. (R).
  278.              The user should immediately make at least one backup copy of 
  279.         the distributed material.  To do so, follow this procedure:
  280.  
  281.              1)  Insert a DOS diskette containing the files  DISKCOPY.COM 
  282.         and DISKCOMP.COM in disk drive A (the left-hand drive).
  283.  
  284.              2)  Type DISKCOPY A: B: and press ENTER.
  285.  
  286.              3)  Insert the distribution diskette in drive A, and a blank 
  287.         diskette in drive B (the right-hand drive).  If you have only one 
  288.         drive, insert the distribution diskette.  
  289.  
  290.              4)  Press any key.   The copy procedure will begin.   If you 
  291.         have  only  one  drive,  the DISKCOPY program  will  periodically 
  292.         instruct  you to insert the blank diskette alternately  with  the 
  293.         distribution diskette.
  294.  
  295.              5)  When copying is complete, press the N key.  Then replace 
  296.         the  distribution  disk  in  drive A with the  disk  holding  the 
  297.         DISKCOMP program.  Type DISKCOMP A: B: and press ENTER.
  298.  
  299.              6)   Replace the diskette in drive A with  the  distribution 
  300.         disk.   Press  any key.   A comparison of the original and copied 
  301.         diskettes  will  be performed.   If you have  only  one  diskette 
  302.         drive,  you will again be instructed to alternate diskettes.   If 
  303.         the  diskettes  'compare  OK' then remove  the  previously  blank 
  304.         diskette and label it.
  305.  
  306.              No   special  installation  procedure  is  needed  for   the 
  307.         interpreter  itself.   Users of DOS V2.0 with the IBM fixed  disk 
  308.         may copy the interpreter into a fixed disk  partition.   However, 
  309.         DOS  V2.X  users should be aware that the interpreter can  access 
  310.         program  and data files ONLY within the current  directory.   The 
  311.         interpreter  and its related files should therefore be listed  in 
  312.         the  same  directory on fixed disk,  and are best listed  in  the 
  313.         root directory (\) on diskette, if possible.
  314.              The user may wish to make additional copies of the   manual, 
  315.         and may do so as follows:
  316.  
  317.              1)   Make  sure that the lineprinter has an ample supply  of 
  318.         paper.  The manual is a LONG document!
  319.  
  320.              2)  Insert a diskette holding the manual in drive A.
  321.  
  322.              3)   Type  COPY A:VTL.TXT LPT1:  and press ENTER to print  a 
  323.  
  324.  
  325.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  5
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.         copy of the  manual.
  335.  
  336.              The  manual is distributed as ordinary text (in  DOS  form).  
  337.         The  manual  was  written using WORDSTAR (R),  and users  with  a 
  338.         source  license may obtain a copy in WORDSTAR compatible form for 
  339.         modification.
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.         II.  Features of the Interpreter
  403.  
  404.               Virtual  Teaching  Language is a new dialect of  the  PILOT 
  405.         instructional  language.   Standard PILOT is designed to  display 
  406.         information on a screen,  ask questions,  and get responses.  The 
  407.         responses are matched against phrases defined by the  programmer.  
  408.         Depending on whether or not a match is found, subsequent commands 
  409.         may or may not be executed.
  410.              Most  standard PILOT interpreters required that the  program 
  411.         to  be executed be loaded into main memory along with the  inter- 
  412.         preter, thus constraining program size. Virtual Teaching Language 
  413.         reads the program line by line from disc,  and thus, program size 
  414.         is limited only by disc capacity.  In addition,  Virtual Teaching 
  415.         Language  permits  one  program to chain  another  while  passing 
  416.         considerable  amounts of data to the next program,  thus removing 
  417.         even  this  constraint.  This feature may cause brief  pauses  in 
  418.         execution,  if  a jump is made to a statement just preceding  the 
  419.         current  statement in a long  program.   However,  an  additional 
  420.         feature  permits  loading  of screenfulls of data from  a  second 
  421.         file,  which cuts program length considerably.   Virtual Teaching 
  422.         Language  also permits execution of other files  as  subroutines, 
  423.         permitting  structuring of a program into a string of procedures.  
  424.         Multi-command lines are also supported.   These advanced features 
  425.         permit  development of terse,  modular,  almost fully  structured 
  426.         program  code,  which  may be entirely separate from  the  course 
  427.         material it is designed to present.
  428.              When initiated, Virtual Teaching Language tries to execute a 
  429.         program  named "autoexec.vtl".   If this program is not  present, 
  430.         the interpreter asks for the name of the program to be  executed.  
  431.         A menu or instructional program may be named "autoexec.vtl",  and 
  432.         will  thus be executed automatically whenever the interpreter  is 
  433.         run.
  434.              In  addition to the standard PILOT commands to print a line, 
  435.         ask a question,  match phrases, jump to a new line, run a subrou- 
  436.         tine,  return from a subroutine and end execution, and the frame- 
  437.         loading and chaining commands mentioned above,  Virtual  Teaching 
  438.         Language  includes commands to perform limited numerical and text 
  439.         manipulations,  read  from and write to a disk  file,  specify  a 
  440.         string  to  be  matched  against phrases,  and print  data  on  a 
  441.         lineprinter.  All  of these commands may make use of  'registers' 
  442.         built into the interpreter--temporary storage areas which may  be 
  443.         used  for  calculations,  and  whose contents  are  automatically 
  444.         inserted  into  command  lines  where  appropriate.    Twenty-six 
  445.         registers  for  each of  three  data  types--integer,  real,  and 
  446.         string--are  provided.   The  use of registers  permits  indirect 
  447.         command  addressing  and  indexed  jumps,  as  well  as  embedded 
  448.         calculation of scores,  execution checkpoints, and implementation 
  449.         of  interruptable  and  resumable  programs.   An  additional  26 
  450.         extended  string registers give the programmer access to the date 
  451.         and time,  the current program name, the current line number, and 
  452.         several other useful quantities.
  453.              VTL.EXE provides commands for performing comparisons between 
  454.         expressions,  loading and display of Function Keys,  timed pauses 
  455.  
  456.  
  457.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.         until  a key (or Function Key) is struck,  control  of  character 
  467.         display  modes for both the monochrome and color display systems, 
  468.         and  directed  location  of  the  cursor  on  the  screen.    The 
  469.         interpreter  also provides color graphics if a color  adapter  is 
  470.         present,  as well as sound, loading of full graphics screens with 
  471.         a  single  command,  and switching between monochrome  and  color 
  472.         display adapters,  if both are present.   These last features are 
  473.         extremely  machine-dependent (i.e.,  they will work with the  IBM 
  474.         Personal   Computer,   but   may  well  not  work  with   another 
  475.         'compatible' machine).
  476.              Virtual   Teaching  Language  provides  intelligible   error 
  477.         messages,  using  error trapping for illegal  file  accesses,  in 
  478.         addition   to   intercepting  syntax  and   calculation   errors.  
  479.         Unexpected system errors are also trapped and reported--a feature 
  480.         useful  for  users  with source licenses who wish to  modify  the 
  481.         interpreter themselves.
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.         III.  Commands and Syntax
  534.  
  535.               Virtual Teaching Language programs are text files, resident 
  536.         on disc,  which have been created by a text editor.  Each line in 
  537.         such a file is read by the interpreter.  If more than one command 
  538.         is present in a given line,  each command is interpreted in turn. 
  539.         Multiple commands in a single line are separated by backslash (\) 
  540.         characters.  A command may be treated as: 
  541.  
  542.              1)   a  comment,  which  begins  with  "!"  (an  exclamation
  543.                   point), and which is ignored;
  544.              2)   a  label,  which begins with "*" (an  asterisk),  which 
  545.                   must be the first command in a multi-command line,  and 
  546.                   which may be used as the target of a JUMP command;
  547.              3)   a directive to be executed.
  548.  
  549.         A command has the following structure:
  550.  
  551.              [identifier][modifier][:][expression]
  552.  
  553.         The  identifier is a single capital letter specifying the  action 
  554.         to be taken.   The modifier is either "Y" (meaning 'yes') or  "N" 
  555.         (meaning  'no'),  referring to the results of a preceding  phrase 
  556.         match.  If a phrase was matched, a command modified with "Y" will 
  557.         execute, and one modified with "N" will not.  If a phrase was not 
  558.         matched,  a  command modified with "N" will execute and one modi-
  559.         fied by "Y" will not.   Unmodified commands will always  execute.  
  560.         A modified command encountered before a phrase match is performed 
  561.         will not execute.   Note that the "phrase match" condition may be 
  562.         set or reset under  VTL by a comparison command or a  wait-until-
  563.         key-struck command, as well as by a phrase matching command.
  564.              A command is delimited from the expression following it by a 
  565.         colon (":"), which must occur as the second or third character of 
  566.         the  line.   A colon occurring elsewhere in the line is  ignored; 
  567.         one  preceded by an unrecognized command and/or modifier is  also 
  568.         ignored.   An invalid or non-existant command is interpreted as a 
  569.         TYPE command,  and the line is printed unmodified on the  screen. 
  570.         The TYPE command is therefore the default command,  which will be 
  571.         executed if no other command is encountered.
  572.              The expression is a line of text,  the contents of which may 
  573.         depend  on  the  command preceding  it.   Excepting  the  ACCEPT, 
  574.         CALCULATE,  and  GET (disk file read) commands,  references to  a 
  575.         register  embedded  within  the expression are  replaced  by  the 
  576.         current  contents  of  the register.   The other commands  use  a 
  577.         register  reference to specify the destination of data  input  by 
  578.         the  user  (ACCEPT),  calculated (CALCULATE) or  read  (GET).   A 
  579.         register  reference  consists of a two adjacent  characters,  the 
  580.         first of which specifies the register type:
  581.  
  582.              "%" -- integer;
  583.              "#" -- real;
  584.              "$" -- string.
  585.              "@" -- extended string.
  586.  
  587.  
  588.  
  589.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.         The  second  character  is  a capital letter  from  "A"  to  "Z", 
  599.         specifying  which of the twenty-six registers of a given type  is 
  600.         meant.   For example,  if string register "C" contains the string 
  601.         "help", and the line:
  602.  
  603.              T:Give me some $C!!!
  604.  
  605.         is executed, the expression:
  606.  
  607.              Give me some help!!!
  608.  
  609.         is printed on the screen.
  610.              The  contents  of  the  extended string  registers  are  set 
  611.         automatically by VTL.EXE,  and may not be modified by ACCEPT, GET 
  612.         or  CALCULATE commands.   Not all of these registers are used  by 
  613.         the current release of VTL.EXE.   Those used, and their contents, 
  614.         are  listed  in Appendix B.   A reference to an  extended  string 
  615.         register,   with  the  exceptions  above,  is  otherwise  treated 
  616.         similarly to a reference to a standard string register.
  617.              An additional register, the 'comparison register', which may 
  618.         not  be  addressed directly by a reference,  is used to  hold  an 
  619.         expression  to  be  used for  phrase  matching.   The  comparison 
  620.         register  contents  are  changed  by  ACCEPT,  WAIT,  and  INSERT 
  621.         commands  as  described  below.   The  current  contents  of  the 
  622.         comparison  register,  and  their length in  characters,  may  be 
  623.         obtained via extended register references.
  624.              An  expression may be further broken down into a  subcommand 
  625.         folllowed  by  arguments.   The subcommand is  a  single  capital 
  626.         letter,  possible  values  of which depend on the  command.   The 
  627.         subcommand  and  its arguments are separated  by  comments.   The 
  628.         advanced  (i.e.  machine-dependent)  commands having to  do  with 
  629.         video  screen  control,  sound,  and graphics use  this  form  of 
  630.         expression.
  631.              The  individual commands' syntax is described  below,  using 
  632.         the following conventions:
  633.  
  634.              [modifier] is the optional modifier Y or N
  635.              [register] is a register reference as described above
  636.              [expression] is a line of text as described above
  637.              [operator] is a special expression used for calculations,
  638.                   as described below
  639.              [sub-cmd.]  is a subcommand (a single letter used to  modify 
  640.                   the effect of a command, followed by a comma).
  641.              [arg.] is an argument of a command (i.e.  a subsection of an 
  642.                   expression).  Arguments are separated by commas.
  643.              {} brackets enclose a quantity which may be omitted
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.         TYPE command
  666.  
  667.              Form:  T[modifier]:[expression]
  668.  
  669.                        or
  670.  
  671.                     [expression]
  672.  
  673.              This  is  the  default command;  a line of  text  without  a 
  674.         command  prefix (i.e.  a colon in the first three characters)  is 
  675.         displayed on the screen, unless the line begins with "*" (i.e. is 
  676.         a label) or "!" (i.e.  is a comment).  If a colon is found in the 
  677.         first three characters, and a command is not recognized, the line 
  678.         is  typed unmodified;  otherwise,  the command prefix is stripped 
  679.         from the line to be displayed.
  680.              If  the expression ends with the character "&"  (ampersand), 
  681.         the  usual  carriage return/line feed at the end of the  line  of 
  682.         text is suppressed.  This permits conversational queries.
  683.  
  684.         Examples:  TY:That is correct!   ("That is correct!" is displayed
  685.                        if a phrase match preceded this statement.)
  686.                    This is a line of text.  (This line is displayed.)
  687.                    !Another teaching program... (a comment--ignored)
  688.                    *12345 (a label--noted, as described below, but not
  689.                        displayed)
  690.                    Enter a number...&  (The line, minus the "&", is
  691.                        displayed, and the cursor remains on the same
  692.                        line.   A  succeeding  ACCEPT command may then  be 
  693.                        used to request input.)
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  11
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.         ACCEPT command
  732.  
  733.              Form:  A[modifier]:
  734.  
  735.                        or
  736.  
  737.                     A[modifier]:[register]
  738.  
  739.              This  command is used to get a line of text input  from  the 
  740.         user.   The  text must be terminated by an 'enter' (<cr>).   If a 
  741.         register is specified,  the current contents of the register  are 
  742.         replaced  by  the  data input.   If a  string  (i.e.  non-numeric 
  743.         characters) is entered when a number is requested,  the  register 
  744.         contents are set to 0.
  745.              If the most recent TYPE command expression ended with a "&", 
  746.         the  ACCEPT command does not prompt input.   If not,  the  ACCEPT 
  747.         command prompts for input with the character "<".       The  data 
  748.         input  are,  in  any  case,  put in the comparison  register  for 
  749.         subsequent  phrase matching.   The data remain in the  comparison 
  750.         register until the next ACCEPT,  INSERT or timed WAIT command  is 
  751.         executed.
  752.              ACCEPT and INSERT commands cause the uppercase equivalent of 
  753.         whatever was entered or inserted to be placed in extended  string 
  754.         register  U  (@U),  the  unmodified  contents  of  the  insertion 
  755.         register  in  extended string register J (@J) and the  length  in 
  756.         characters  of  whatever  was put in the  insertion  register  in 
  757.         extended string register I (@I).
  758.  
  759.         Examples:  AY:  (If a phrase match occurred, data input is
  760.                        accepted.)
  761.                    A:%B  (Data input is accepted, and numeric integer
  762.                        result is inserted in integer register B.)
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  12
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.         MATCH command
  798.  
  799.              Form:  M[modifier]:[phrase],[phrase],[phrase]...
  800.  
  801.              The current contents of the comparison register are  scanned 
  802.         for  any occurrence of each of the phrases (separated by  commas) 
  803.         included  in  the command,  until either a match is found or  all 
  804.         phrases are exhausted.   If a match is found, all subsequent com- 
  805.         mands with the modifier "Y" will execute, and those with modifier 
  806.         "N" will not.   If no match is found, the reverse is true.  These 
  807.         conditions will hold until the next MATCH command is executed.
  808.              Phrases  are  matched EXACTLY;  upper  case  characters  are 
  809.         treated as different from lower case.
  810.              If the expression is preceded by a quotation mark  ("),  the 
  811.         entire expression,  including any commas,  is used for the phrase 
  812.         match.
  813.  
  814.         Examples:  MY:yes,Yes (If the preceding MATCH command yielded
  815.                        a phrase match, this command matches for the
  816.                        phrases "yes" and "Yes".)
  817.                    M:a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
  818.                        (If the comparison register contains any lower
  819.                        case character, a phrase match occurs.)
  820.                    M:"a,b,c,d   (The entire phrase 'a,b,c,d' is used  for 
  821.                        the phrase match.)
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  13
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.         JUMP command
  864.  
  865.              Form:  J[modifier]:[expression]
  866.  
  867.              This  command controls the flow of statement execution.  The 
  868.         statement lines in a VTL program are executed one by one,  in the 
  869.         order  in  which  they are found in the  program  file.   A  JUMP 
  870.         command  uses  the expression as a label,  and tries  to  find  a 
  871.         matching label elsewhere in the program (excluding the "*" prefix 
  872.         used to designate a label to the TYPE command).   If such a label 
  873.         is  not  found,  an error message is printed and the program  and 
  874.         interpreter terminate.   If the label is found,  the next line of 
  875.         text and subsequent lines are executed.
  876.              As lines of program are executed,  labels may be encountered 
  877.         as TYPE commands.  These labels are noted by the interpreter, and 
  878.         their  location  is stored.   A label may be any  combination  of 
  879.         characters (i.e.  any valid expression).  Up to 100 labels may be 
  880.         used in a single program.   Labels passed during a jump are  also 
  881.         noted.   Although  labels may be of any reasonable length (up  to 
  882.         254 characters), it is best to keep them short.
  883.              If  a JUMP command is executed,  and the specified label has 
  884.         already been noted, control is passed as described above.  If the 
  885.         label  has  not  been noted,  the remainder  of  the  program  is 
  886.         searched for it.
  887.  
  888.         Examples:  JY:frame1 (If a phrase match has occurred, execution
  889.                        resumes at the line following the line "*frame1")
  890.  
  891.                    C:$F=frame (inserts the string "frame" in string reg-
  892.                        ister F)
  893.                    J:$F1  (Jumps to the line following the label "frame1".
  894.                        The value "frame" is inserted in place of the
  895.                        register reference "$F".)
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  14
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.         USE subroutine command
  930.  
  931.              Form:  U[modifier]:[expression]
  932.  
  933.              This   command  executes  a  jump  to  a  subroutine.    The 
  934.         expression is interpreted as a label.   The current line location 
  935.         is  saved,  and a jump to the specified label  is  performed.   A 
  936.         RETURN  command exits the subroutine and resumes execution of the 
  937.         program at the line following the USE command.
  938.  
  939.         Example:  UN:mistake  (If the last MATCH was unsuccessful, the
  940.                        subroutine beginning at the line starting with the 
  941.                        label "*mistake" is executed.)
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  15
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.         RETURN from subroutine
  996.  
  997.              Form:  R[modifier]:
  998.  
  999.              If no subroutine is being executed, this command is ignored. 
  1000.                   Otherwise,  a jump is executed to the command following 
  1001.                   the most recently executed USE command.
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  16
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.         END command
  1062.  
  1063.              Form:  E[modifier]:
  1064.  
  1065.              This  command ends execution of the  current  program.   The 
  1066.         interpreter  then asks the user for the name of the next program.  
  1067.         If  the current program was being executed as a  subroutine,  the 
  1068.         originating program resumes.
  1069.  
  1070.         Example:  EY:  (If a phrase match has occurred, execution ends.)
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.         CALCULATE command
  1128.  
  1129.              Form:  C[modifier]:[register]=[expr.]{[operator][expr.]}
  1130.  
  1131.              This  command is used to perform simple calculations,  plac- 
  1132.         ing  the results in a register.   Calculations may be numeric  or 
  1133.         string,  depending  on the type of the register specified as  the 
  1134.         results' destination.   If no operator is specified, the value of 
  1135.         the expression is inserted in the register.
  1136.              The operators permitted for numeric calculations are:
  1137.  
  1138.                   + -- addition
  1139.                   - -- subtraction
  1140.                   * -- multiplication
  1141.                   / -- division
  1142.  
  1143.         The  two expressions separated by the operator are  evaluated  as 
  1144.         real  numbers.   Exponential notation is permitted.   Non-numeric 
  1145.         expressions  will  be  interpreted  as  0.    Division  by  0  is 
  1146.         permitted,  but will cause an error message; the maximum positive 
  1147.         real  or  integer  value  will be  inserted  in  the  destination 
  1148.         register.
  1149.              String  calculations  may  extract  either  the  leftmost  N 
  1150.         characters  of  the  first  expression  (operator  "<<")  or  the 
  1151.         rightmost  N characters (operator ">>"),  where N is the  numeric 
  1152.         value of the second expression.
  1153.  
  1154.         Examples:  CN:$A=help me!  (If the preceding MATCH was unsuccess-
  1155.                        ful, the expression "help me!" is inserted in
  1156.                        string register A.)
  1157.                    C:#A=%C+1  (The current value of integer register
  1158.                        C is inserted as the first expression; the second
  1159.                        expression is "1".  The value of integer register
  1160.                        C is incremented by 1 and inserted in real regis-
  1161.                        ter A.
  1162.                    C:$B=abcdefg<<3  (The string "abc" is inserted in
  1163.                        string register B.)
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  18
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.         HARDCOPY command
  1194.  
  1195.              Form:  H[modifier]:[expression]
  1196.  
  1197.              The  expression is printed on the currently selected  system 
  1198.         lineprinter.   If the lineprinter is off-line,  or no lineprinter 
  1199.         is present on the system, the computer will "hang".
  1200.  
  1201.         Example:  HY:The result is #C.  (The current value of real regis-               
  1202.                        ter  C  will be inserted in  the  expression,  and              
  1203.                        the  expression will be printed if a phrase  match               
  1204.                        has occurred.)
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.         OPEN a disk file command
  1260.  
  1261.              Form:  O[modifier]:{[mode],}[expression]
  1262.  
  1263.              The expression must be a valid DOS filename.   If no mode is 
  1264.         specified,  the file is initially opened for INPUT.   If the file 
  1265.         is not found,  a new file is opened for OUTPUT.  The file remains 
  1266.         open until a file close command is executed.   The access mode of 
  1267.         the file may be changed, however, by read and write commands.
  1268.              The  mode  is a single letter,  corresponding to  the  three 
  1269.         possible modes of access to a sequential file:
  1270.  
  1271.                   I -- input
  1272.                   O -- output
  1273.                   A -- append
  1274.  
  1275.         If  the specified mode is input,  the file is opened to  be  read 
  1276.         only.   If  the file is not found,  a new file with the same name 
  1277.         will be opened for output.   If the mode is output, a new file is 
  1278.         opened;  if  the file already existed,  its current contents  are 
  1279.         lost.   If the mode is append,  the file must already exist or an 
  1280.         error will occur.  If the file exists, all subsequent output will 
  1281.         be appended to its current contents.
  1282.  
  1283.         Example:  O:file.dat  (The disk file "file.dat" is opened.)
  1284.                   O:O,file.dat ("file.dat" is opened for output.)
  1285.                   O:A,file.dat ("file.dat" is opened for append.)
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  20
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.         eXIT (close) a disk file command
  1326.  
  1327.              Form:  X[modifier]:
  1328.  
  1329.              A  disk  file previously opened is closed.   If no  file  is 
  1330.         open,   an  error  message  is  printed,   and  the  program  and 
  1331.         interpreter exit.
  1332.  
  1333.         Example:  XY:  (If a phrase match has occurred, the currently
  1334.                        open disk file is closed.)
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  21
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.         GET (read) from a disk file command
  1392.  
  1393.              Form:  G[modifier]:[register]
  1394.  
  1395.              A  line of input is read from the currently open disk  file.  
  1396.         If  no file is open,  an error message is printed and the program 
  1397.         and  interpreter terminate.   If the file is currently  open  for 
  1398.         OUTPUT or APPEND,  the file is closed and reopened for INPUT.  If 
  1399.         the  end of file is encountered on an attempt to read,  an  error 
  1400.         message is printed and the program and interpreter terminate.
  1401.              If  the  destination register is numeric (real or  integer), 
  1402.         the line read is interpreted accordingly.   If the register is  a 
  1403.         string  register,   the  line  replaces  the  register's  current 
  1404.         contents.
  1405.  
  1406.         Examples:  GY:$A  (If a phrase match has occurred, a line is read 
  1407.                        from  the  currently open file,  and  inserted  in 
  1408.                        string register A.)
  1409.                    G:%Y   (A line is read from  the currently  open  file    
  1410.                        converted  to an integer,  and the result inserted
  1411.                        in integer register Y.)
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  22
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.         PUT (write) to disk file command
  1458.  
  1459.              Form:  P[modifier]:[expression]
  1460.  
  1461.              The  expression is written to the currently open disk  file. 
  1462.         If the file is opened for INPUT,  the file is closed and reopened 
  1463.         for  APPEND.   The expression is then written to the end  of  the 
  1464.         file.   If  no file is open,  an error message is printed and the 
  1465.         program and interpreter terminate.
  1466.              If an ampersand (&) is appended as the last character of the 
  1467.         expression,  the expression will be written to the file without a 
  1468.         terminal  carriage  return  and  line   feed.    Otherwise,   the 
  1469.         a  carriage return-line feed pair of characters will be added  to 
  1470.         the end of the expression written to disk.
  1471.  
  1472.         Example:  PN:Test failed.  (If the preceding MATCH was unsuccess-
  1473.                        ful,  the phrase "Test failed." is written to  the
  1474.                        currently open disk file.)
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  23
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.         LINK (chain) to next program command
  1524.  
  1525.              Form:  L[modifier]:[expression]
  1526.  
  1527.              The expression is a valid VTL program name (see below).  The 
  1528.         named  program is executed.   The contents of registers are  left 
  1529.         unchanged.   Data  may  be  passed to the  new  program  via  the 
  1530.         registers.   If  the named program is not found,  the interpreter 
  1531.         displays  an  error  message and exits.   If  the  expression  is 
  1532.         omitted, the interpreter exits.
  1533.              The  program  name must ALWAYS be a full DOS  filename  with 
  1534.         extension.  No default file extension is assumed.
  1535.              A  program  being executed as a subroutine via a DO  command 
  1536.         may chain to another program;  control will not be passed back to 
  1537.         the  original  ('calling')  program  until  an  END  command   is 
  1538.         encountered, or until the current line number exceeds the maximum 
  1539.         line number specified in the DO command.
  1540.  
  1541.         Examples:   L:prog2.vtl   (The  program prog2.vtl  is  executed.)           
  1542.                     LN:   (If the preceding MATCH was  unsuccessful,  the    
  1543.                        interpreter exits to DOS.)
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  24
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.         INSERT data into comparison register command
  1590.  
  1591.              Form:  I[modifier]:[expression]
  1592.  
  1593.              The expression is inserted into the comparison register, and 
  1594.         used  for  all  subsequent MATCH commands  until  the  comparison 
  1595.         register is reloaded by another INSERT or an ACCEPT or timed WAIT 
  1596.         command.
  1597.  
  1598.         Example:   I:$Q   (The current contents of string register Q  are   
  1599.         inserted in the comparison register).
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  25
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.         FRAME load command
  1656.  
  1657.              Form:  F[modifier]:[expression]{,[arg.1]{,...[arg.4]}}
  1658.  
  1659.              This command clears the display and then reads and  displays 
  1660.         up  to  23 lines of text from a file,  optionally beginning at  a 
  1661.         specified  line of the file.   The expression must be a valid DOS 
  1662.         file  name.   Up  to  four arguments  are  optional.   The  first 
  1663.         argument  is interpreted as the number of the first line  in  the 
  1664.         file to be displayed.  The second argument is the number of lines 
  1665.         to  be displayed (range 1-23).   If the first line to be read  is 
  1666.         out  of  range (i.e.  EOF is encountered),  an error  message  is 
  1667.         printed  and  the  program  and  interpreter  exit.   If  EOF  is 
  1668.         encountered  while  loading  a  frame,  the file  is  closed  and 
  1669.         execution proceeds.  A FRAME load command with only the file name 
  1670.         specified will load either the first 23 lines of the file or  the 
  1671.         entire  file,  if fewer than 23 lines are present.   If only  the 
  1672.         first  line  is specified,  that line and the next 22  lines  (or 
  1673.         fewer, if EOF is encountered) are displayed.
  1674.              The  third argument specifies a starting line number on  the 
  1675.         display.  This will be the line on which the first line read from 
  1676.         the  file is printed.   The fourth argument specifies a  starting 
  1677.         column number on the display.   All lines read from the file will 
  1678.         be  displayed beginning at this column number.   Use of these two 
  1679.         arguments permits changing the contents of a 'window' of the text 
  1680.         display, without altering other contents outside the window.
  1681.  
  1682.         Examples:   F:frame1.txt,11,5  (The display is loaded with  lines                
  1683.                         11-15 of the file "frame1.txt".)
  1684.                     FN:frames.f1,20    (If   the  preceding   MATCH   was 
  1685.                         unsuccessful,  line  20 and up to  22  succeeding 
  1686.                         lines  of file "frames.f1" are displayed.)
  1687.                     F:frame1.doc   (Up to 23 lines from file "frame1.doc"  
  1688.                         are displayed, beginning at the first line.)
  1689.                     F:frame1.txt,1,10,5,15  (The first 10 lines from file
  1690.                         "frame1.txt" are displayed,  beginning at line  5 
  1691.                         of the display, and offset 14 columns.
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  26
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.         YES-IF command
  1723.  
  1724.              Form:  Y[modifier]:[sub-cmd.],[expr.]{[operator][expr.]
  1725.  
  1726.              This  command either compares two expressions or compares  a 
  1727.         single  expression  with zero.   If the comparison is  true,  the 
  1728.         phrase-match condition flag is set to 'yes'.  If not, the flag is 
  1729.         set  to  'no'.   The  sub-command is  a  single  character  which 
  1730.         determines the mode of the comparison:
  1731.  
  1732.              % -- integer mode (expressions interpreted as integers)
  1733.              # -- real mode (expressions interpreted as real numbers)
  1734.              $ -- string mode (expressions interpreted as strings)
  1735.  
  1736.         A  single  expression  is compared with zero (a  null  string  in 
  1737.         string mode).   If the expression=0 (or a null string),  the flag 
  1738.         is set to 'no'; if not, the flag is set to 'yes'.
  1739.              In   the  two-expression  form,   the  two  expressions  are 
  1740.         separated by an operator:
  1741.  
  1742.              > -- greater than
  1743.              = -- equals
  1744.              < -- less than
  1745.  
  1746.         The  two  expressions are evaluated according to  the  mode,  and 
  1747.         compared  according  to  the operator.   If  the  condition  thus 
  1748.         expressed  is true,  the phrase match flag is set to  'yes'.   If 
  1749.         not, the flag is set to 'no'.
  1750.              This  permits  both  structured decision-making  within  VTL 
  1751.         programs,  and  exact  string  matching (obviating  some  of  the 
  1752.         difficulties in using the inexact matching of the M: command).
  1753.              In  using this command,  keep in mind that positive  numbers 
  1754.         placed  in the extended string registers are preceded by a  blank 
  1755.         (' ').
  1756.  
  1757.         Examples:   Y:%,%A>1  (the flag is set to 'yes' if the contents of 
  1758.                         integer register A are >1)
  1759.                     YN:$,$A=hello (if the flag is already set to 'no', the 
  1760.                         contents  of string register A are compared  with 
  1761.                         the  string "hello";  if the contents  =  "hello" 
  1762.                         then the flag is set to 'yes', otherwise to 'no')
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  27
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.         DO command
  1789.  
  1790.              Form:  D[modifier]:[filename]{,[first line]{,[last line]}}
  1791.  
  1792.              This  command  executes  the named file,  in  effect,  as  a 
  1793.         subroutine.   Execution of the calling program is suspended;  the 
  1794.         context (i.e.  all labels and pointers) of the calling program is 
  1795.         saved.  The registers' contents are left unchanged, however.  The 
  1796.         named file is executed beginning at the specified first line  (or 
  1797.         at  line  1 if none is specified).   Execution of the named  file 
  1798.         proceeds  until  an END command is encountered,  end of  file  is 
  1799.         reached,  or  the  number of the line to be executed exceeds  the 
  1800.         number of the last line, if this is specified.
  1801.              The  named  file cannot itself invoke another file via a  DO 
  1802.         command   (attempting  to  execute  a  DO   command  causes   the 
  1803.         interpreter  to halt,  with an error message).   Apart from  this 
  1804.         restriction,  all  other commands in the named file will  execute 
  1805.         normally.
  1806.              When  the  named  file  terminates  execution,  the  calling 
  1807.         program resumes at the next command.
  1808.              As  with  the Frame command,  the file name  specified  must 
  1809.         include the file extension (i.e. there is no default extension).
  1810.  
  1811.         Examples:   DY:frame44.vtl,1,23  (file "frame44.vtl" is executed, 
  1812.                         beginning at line 1,  and ending at line  23,  if 
  1813.                         this line is reached prior to an L: or E: command 
  1814.                         is executed)
  1815.                     C:%A=23\D:lesson.f%A  (file "lesson.f23" is executed, 
  1816.                         beginning at line 1)
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  28
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.         WAIT command
  1854.  
  1855.              Form:  W:{[expression]}
  1856.  
  1857.              This command, if used without an expression, halts execution 
  1858.         until a key is struck.  The key value struck is discarded.
  1859.              If an expression is specified,  the expression is  evaluated 
  1860.         as a number of seconds to wait for a key to be struck.  If no key 
  1861.         is  pressed during this time period,  the comparison register  is 
  1862.         erased  (i.e.  loaded with a null string),  and the phrase  match 
  1863.         flag  is  set to 'no'.   If a key (including a function  key)  is 
  1864.         struck,  the  character(s)  invoked by the keystroke replace  the 
  1865.         current contents of the comparison register, and the phrase match 
  1866.         flag is set to `yes`.
  1867.              This command may be used to time replies (i.e.  for a quiz).  
  1868.         Note that if a function key is struck, the entire expression (not 
  1869.         just  the first letter) associated with that key is  inserted  in 
  1870.         the comparison register.
  1871.  
  1872.         Examples:  W:  (execution halts until a key is struck)
  1873.                    W:10 (a keystroke is awaited for 10 seconds)
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  29
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.         ZERO command
  1921.  
  1922.              Form:  Z[modifier]:{sub-cmd.}
  1923.  
  1924.              This command erases the contents of all standard  registers, 
  1925.         or  all  of  a particular class of  register.   Numeric  register 
  1926.         contents are set to zero, and string register contents are set to 
  1927.         a  null string (i.e.  one of zero length).   If no subcommand  is 
  1928.         present,  all registers are zeroed.   A subcommand specifies  the 
  1929.         class  of registers to be zeroed,  and may consist of the  single 
  1930.         character:
  1931.  
  1932.                   % -- integer registers
  1933.                   # -- real registers
  1934.                   $ -- string registers
  1935.  
  1936.         The specified class of registers is cleared.
  1937.  
  1938.         Examples:  Z:  (all registers are cleared.)
  1939.                    Z:$ (all string registers are cleared.)
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  30
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.         Advanced Commands (specific for the IBM (R) PC)
  1986.  
  1987.              These  commands  control function key access,  video  screen 
  1988.         modes,  graphics,  sound,  and  switching between monochrome  and 
  1989.         color  display  adapters--functions which are  dependent  on  the 
  1990.         specific characteristics of the IBM (R) Personal Computer.
  1991.              Many  of  these  commands  have  subcommands  with  multiple 
  1992.         arguments.   Depending  on the subcommand,  arguments in the same 
  1993.         position in an argument list (a series of arguments separated  by 
  1994.         commas) may have different meanings.   In some cases,  therefore, 
  1995.         different  subcommand forms of the same command will be discussed 
  1996.         on separate pages to avoid confusion.
  1997.  
  1998.         Display Modes
  1999.  
  2000.              The  color graphics adapter may be used in one of 4  display 
  2001.         modes.  The selected mode determines the number of characters per 
  2002.         line when text is displayed,  and whether or not graphics (lines, 
  2003.         shapes,  etc.) in black and white or color may be displayed.   It 
  2004.         is  noteworthy that text may be displayed in any of these  modes, 
  2005.         including  all graphics modes,  but that its appearance  will  be 
  2006.         influenced  by  which mode is selected.   The monochrome  display 
  2007.         adapter  is always in 80-column text display  mode,  and  permits 
  2008.         only  limited graphics using special characters (as described  in 
  2009.         the IBM BASIC Manual,  pp.  G-1 to G-5), which are also available 
  2010.         in the color adapter's text modes.
  2011.              The color adapter's modes are:
  2012.  
  2013.                   0 -- text (40 or 80 columns--two text modes)
  2014.                   1 -- medium resolution (320 x 200) graphics
  2015.                             (with 40 column text display)
  2016.                   2 -- high resolution (640 x 200) graphics
  2017.                             (with 80 column text display)
  2018.  
  2019.         Either of the text modes,  and medium resolution graphics, may be 
  2020.         in either monochrome (black and white) or color.
  2021.              In   VTL,  the VIDEO WIDTH,  VIDEO COLOR,  and VIDEO  SELECT 
  2022.         commands are used to select display modes for the color  adapter.  
  2023.         The   VIDEO   COLOR  command  is  also  used  to  specify   color 
  2024.         combinations  for text or graphics display,  and is also used  to 
  2025.         vary  character  display  modes   (reverse,   blinking,   bright, 
  2026.         underlined)  for  text for both adapters.   At the cost  of  some 
  2027.         complexity,   the  VIDEO  commands  give  the  courseware  author 
  2028.         complete command of either display adapter.   The SCREEN commands 
  2029.         are  used  to create graphics using the color adapter's  graphics 
  2030.         modes,  which must first,  however,  be properly selected,  or an 
  2031.         error results.
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  31
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.         VIDEO control command
  2053.  
  2054.              Form:  V[modifier]:[sub-cmd.]{,[arg1,...,arg5]}
  2055.  
  2056.              This  command  provides  control  of  character  attributes, 
  2057.         and cursor location,  and also permits clearing the screen.   The 
  2058.         function desired is selected by the sub-command:
  2059.  
  2060.              Z -- clear screen
  2061.              C -- character attributes or selection of color
  2062.              L -- cursor location
  2063.              S -- selection of screen mode
  2064.              W -- selection of character display row width (in columns)
  2065.  
  2066.         Simple Forms
  2067.  
  2068.              The  'Z' subcommand requires no arguments,  and  causes  the 
  2069.         screen to clear.
  2070.              The  'W'  subcommand requires only one  argument,  which  is 
  2071.         either  '40'  or '80',  depending on the desired  display  width.  
  2072.         The  V:W  command automatically changes the color video  mode  to 
  2073.         character  (i.e.  non-graphics).   This form of the VIDEO command 
  2074.         should not be used with the monochrome adapter.   If the argument 
  2075.         is not specified, 40 columns is assumed.
  2076.  
  2077.         Examples:  V:Z  (clears the current screen)
  2078.                    V:W,80  (clears  the current screen and  sets  display 
  2079.                        mode to character, 80 columns)
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  32
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.         VIDEO COLOR command
  2119.  
  2120.              Form:  V[modifier]:C,arg1,arg2{,arg3}
  2121.  
  2122.              This  command  sets the display mode  for  all  subsequently 
  2123.         printed characters in character mode using the monochrome display 
  2124.         adapter, and also sets character and background colors for either 
  2125.         character mode or medium resolution graphics mode using the color 
  2126.         adapter.
  2127.              The 'C' subcommand takes up to 3 arguments, which are in the 
  2128.         same  order and which may assume the same values as the arguments 
  2129.         for  the  IBM  advanced BASIC 'COLOR' command.   The  effects  of 
  2130.         different  values of these parameters are discussed fully in  the 
  2131.         IBM BASIC manual, pp. 4-49 to 4-52.  However, for the convenience 
  2132.         of the user, an abridged discussion is included here.
  2133.              The  three  arguments,  which should  always  be  specified, 
  2134.         represent  'foreground' (arg1),  'background' (arg2) and `border` 
  2135.         (arg3).   'Border' has meaning only if the color adapter is being 
  2136.         used.   In text mode,  arg1 may range from 0-31 (default 0), arg2 
  2137.         may range from 0-7, and arg3 may range from 0-15.
  2138.              If the monochrome adapter is in use,  arg3 is  ignored.   If 
  2139.         arg1=0  then  the  foreground intensity (that of  all  characters 
  2140.         displayed) is black.   If arg1=1 then the foreground intensity is 
  2141.         low-intensity white, and all characters are displayed underlined.  
  2142.         If  arg1 is in the range 2-7,  the foreground intensity  is  low-
  2143.         intensity  white.   If 8 is added to any of these values  (except 
  2144.         0),  the foreground intensity becomes high intensity white; if 16 
  2145.         is added,  the characters blink.  If arg2 (background) is 0, then 
  2146.         the  background  intensity (surrounding displayed characters)  is 
  2147.         black.  If arg2 is 1-7, the background intensity is low-intensity 
  2148.         white.
  2149.              If the color adapter is in use, arg1 is the foreground color 
  2150.         (one  of the 16 possible colors in high or  low  intensity),  and 
  2151.         arg2 is the background color (one of the 8 possible low-intensity 
  2152.         colors).   Arg3  is one of the 16 possible colors in high or  low 
  2153.         intensity, which is assigned to the border of the screen, outside 
  2154.         the  area used for character display.   Adding 16 to the  desired 
  2155.         color value for arg1 causes the characters to blink.
  2156.              If  the color adapter is in medium resolution graphics mode, 
  2157.         then arg1  becomes the background color (one of the 16 possible), 
  2158.         and  arg2  may be a number from 0-255.   If the number  is  even, 
  2159.         color  palette '0' (green,  red,  brown) is used for  the  SCREEN 
  2160.         graphics  commands  (see below).   If the number  is  odd,  color 
  2161.         palette '1' (cyan, magenta, white) is used.  Arg3 is ignored, and 
  2162.         may be omitted.
  2163.  
  2164.         Examples:   V:C,0,7,0  (this sets reverse video mode,  with black 
  2165.                        characters on a white background)
  2166.                     V:C,12,3,1    (this   sets   foreground=light    red, 
  2167.                        background=cyan, border=blue in color mode)
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  33
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.              Tables  of colors and useful combinations of  arg1,arg2,arg3 
  2184.         are found below:
  2185.  
  2186.  
  2187.         Color table:        Low Intensity            High Intensity
  2188.  
  2189.                             0 -- Black               8 -- dark grey
  2190.                             1 -- Blue                9 -- light blue
  2191.                             2 -- Green              10 -- light green
  2192.                             3 -- Cyan               11 -- light cyan
  2193.                             4 -- Red                12 -- light red
  2194.                             5 -- Magenta            13 -- light magenta
  2195.                             6 -- Brown              14 -- yellow
  2196.                             7 -- White              15 -- bright white
  2197.  
  2198.         Some Useful Monochrome Display Combinations
  2199.  
  2200.                        7,0,0           (standard)  white  characters   on
  2201.                                            black background
  2202.                        0,7,0           black    characters    on    white
  2203.                                            background                     
  2204.                        1,0,0           underlined  white  characters   on
  2205.                                            black background
  2206.                        9,0,0           bright underlined white characters
  2207.                                            on black background
  2208.                       15,0,0           bright  white characters  on black
  2209.                                            background
  2210.                       16,7,0           blinking black characters on white
  2211.                                            background
  2212.                       17,0,0           blinking  underlined white charac-
  2213.                                            ters on black background
  2214.  
  2215.         Note:   the  use of blinking characters is extremely distracting, 
  2216.         and should be avoided except for EXTREME emphasis!
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  34
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.         VIDEO LOCATE (cursor) command
  2251.  
  2252.              Form:  V[modifier]:L,arg1,arg2,arg3{,arg4,arg5}
  2253.  
  2254.              This  command is used in text mode to move the cursor  to  a 
  2255.         specified position on the screen,  turn the cursor on or off, and 
  2256.         specify the cursor height and position.
  2257.              The 'L' subcommand takes up to 5 arguments, which are in the 
  2258.         same order and which may assume the same values as the  arguments 
  2259.         for  the  IBM  advanced  BASIC 'LOCATE'  command.   The  user  is 
  2260.         referred   to  the  IBM  BASIC  manual  pages  4-51  and   4-155, 
  2261.         respectively,  for further explanations.   Non-specified (omitted 
  2262.         or  blank)  arguments  are  interpreted  as  '0',  and  may  have 
  2263.         unintended results.
  2264.              Arg1  is  the  character display row (1-25).   Arg2  is  the 
  2265.         display column (1-40 in width 40, 1-80 in width 80).  Arg3 may be 
  2266.         either 0 (cursor off) or 1 (cursor on).
  2267.              Arg4  and arg5 specify the beginning and ending dot  row  on 
  2268.         the  current line used to display the cursor.   Fourteen dot rows 
  2269.         (0-13)  are  present on a given line displayed by the  monochrome 
  2270.         adapter;  8  dot rows (0-7) are displayed on a line by the  color 
  2271.         adapter.   If  arg4  and arg5 are  omitted,  the  current  cursor 
  2272.         (default 12,13 for monochrome and 6,7 for color) is preserved.
  2273.  
  2274.         Examples:   V:L,23,1,0  (positions cursor to beginning of line 23 
  2275.                        and turns it off)
  2276.                     V:L,10,10,1,1,13    (positions  cursor  to  line  10, 
  2277.                        column  10,  displays  it,  and sets  it  to  full 
  2278.                        character height)
  2279.  
  2280.         Note:   all  text  displayed  after the cursor  is  relocated  is 
  2281.         printed  beginning  at the current cursor location,  even if  the 
  2282.         cursor itself is not displayed.
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  35
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.         VIDEO SELECT screen mode command
  2317.  
  2318.              Form:  V[modifier]:S,arg1,arg2,arg3,arg4
  2319.  
  2320.              This  command  is  used to select the display mode  for  the 
  2321.         color graphics display adapter.
  2322.              Arg1  is  the  display  mode--0  for  text,   1  for  medium 
  2323.         resolution graphics, or 2 for high resolution graphics.
  2324.              Arg2  may be either 0 for color  disabled  (i.e.  monochrome 
  2325.         display) or 1 for color enabled.
  2326.              Arg3 and arg4 are meaningful only in text mode.  In order to 
  2327.         accomodate  graphics,   the  color  display  adapter  has  memory 
  2328.         capacity  far  in  excess of that needed for even 25  row  by  80 
  2329.         column  text  display.   There is sufficient memory to hold  four 
  2330.         full  pages of 25 x 80 display (numbered pages 0-3),  or  8  full 
  2331.         pages  of 25 x 40 display (pages 0-7).   The text display  width, 
  2332.         set  by the VIDEO WIDTH command described above,  determines  how 
  2333.         many  possible  pages  of text may be  specified.   Arg3  is  the 
  2334.         'active  page'--that to which all subsequent text is printed,  to 
  2335.         be  displayed  either currently or later.   Arg4 is  the  'visual 
  2336.         page'--i.e.  the  page currently being displayed.   Use of  these 
  2337.         arguments  permits concurrent loading of one page during  display 
  2338.         of another,  as for animation.   When changing pages, the current 
  2339.         cursor location is made current for the new active page.   It  is 
  2340.         therefore  wise  to specify cursor location with a  VIDEO  LOCATE 
  2341.         command  immediately  after switching active pages,  and to  make 
  2342.         note of the current cursor location on the old page, if intending 
  2343.         to  return to that location again.   Under normal  circumstances, 
  2344.         page switching is an unnecessary  complication,  however,  though 
  2345.         experienced courseware designers may use it to stunning effect.
  2346.  
  2347.         Examples:   V:S,0,0,1,1   (text  mode selected,  color  disabled, 
  2348.                        active and visual pages both page 1)
  2349.                     V:S,0,1,3,7    (text  mode,  color  enabled,  page  3
  2350.                        active,   page  7  displayed--valid  if   width=40 
  2351.                        columns ONLY!)
  2352.                     V:S,1,1,0,0  (medium resolution graphics mode,  color 
  2353.                        enabled)
  2354.                     V:S,2,0,0,0  (high resolution graphics mode)
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  36
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.         SCREEN graphics command
  2382.  
  2383.              Forms:  S[modifier]:[sub-cmd.],[arg1,...arg8]
  2384.                      S[modifier]:[sub-cmd.],[expression]
  2385.  
  2386.              This  command  is used to create  graphic  displays,  mainly 
  2387.         using  the color/graphics adapter,  though one subcommand may  be 
  2388.         used to produce a line of characters using either display system.  
  2389.         An  attempt  to use a graphics subcommand applicable only to  the 
  2390.         color  adapter while the monochrome adapter is in use will  cause 
  2391.         an error.
  2392.              The subcommands supported by the SCREEN command are:
  2393.  
  2394.              D -- draw lines, using turtle graphics
  2395.              C -- draw a circle
  2396.              S -- set a point to a given color
  2397.              R -- reset a point to background color
  2398.              P -- paint a region of the display a given color
  2399.              L -- display a line of characters
  2400.  
  2401.         Subcommand 'L' is the only one valid using the monochrome display 
  2402.         adapter.
  2403.              In  order to properly use the other  subcommands,  one  must 
  2404.         understand  the  coordinates  used to specify  locations  on  the 
  2405.         screen  in graphics modes.   In medium-resolution  graphics,  the 
  2406.         screen  is  divided  into  200 rows of  320  columns  of  picture 
  2407.         elements  ('pels'),  each  of  which may be colored one  of  four 
  2408.         possible colors.   In high-resolution graphics,  the screen holds 
  2409.         200  rows  of 640 columns of pels,  each of which may  be  either 
  2410.         black or white.  The coordinates begin at 0,0 which is located at 
  2411.         the   upper  left  hand  corner  of  the  screen.    The  maximum 
  2412.         coordinates (319,199 in medium,  and 639,199 in high  resolution) 
  2413.         are  of  the  point at the bottom right of the  screen.   When  a 
  2414.         graphics  mode  is  selected,  the screen  is  cleared,  and  the 
  2415.         currently  selected  pel  is that in the  center  of  the  screen 
  2416.         (160,100 in medium,  and 320,100 in high resolution).  All turtle 
  2417.         graphics  commands  then  may reference points relative  to  this 
  2418.         starting point.
  2419.              The  term  'turtle graphics' refers to drawing  lines  on  a 
  2420.         graphics  screen  by moving an imaginary cursor  (the  'turtle'), 
  2421.         which leaves a trail of colored pels behind it.  Movements may be 
  2422.         specified  either  in terms of absolute  coordinates  (i.e.  move 
  2423.         turtle  to  a  specified  point on the  screen)  or  in  relative 
  2424.         coordinates (move turtle n points vertical or horizontal from its 
  2425.         current position).   Although it is possible to draw any shape at 
  2426.         all by moving the turtle, doing so requires considerable practice 
  2427.         and  forethought,  as  well  as  full knowledge  of  the  command 
  2428.         language  used  to  move the turtle  around  the  screen.   Also, 
  2429.         creating  circles or painting in large areas of the screen  would 
  2430.         be very awkward using turtle graphics,  and therefore,  IBM BASIC 
  2431.         provides special functions for these purposes.
  2432.              The  shape  of  any figure drawn with  the  SCREEN  graphics 
  2433.         commands  is  influenced by the 'aspect ratio'  of  the  graphics 
  2434.         screen.  The display area is rectangular, not square, and so each 
  2435.  
  2436.  
  2437.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  37
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.         pel  is also a rectangle.   Thus,  a rectangle n pels wide and  n 
  2447.         pels  long is not a square as one might expect,  but a  rectangle 
  2448.         with  its long axis in the y direction.   Pels are more narrow in 
  2449.         the x direction than in the y direction.  The ratio of pel height 
  2450.         to width is 1.2:1 in medium resolution graphics and 2.4:1 in high 
  2451.         resolution graphics.   Thus, a rectangle would have to be 24 pels 
  2452.         wide and 20 pels high to appear as a square in medium resolution, 
  2453.         and  48 pels wide and 20 pels high to appear as a square in  high 
  2454.         resolution.
  2455.              As might be expected,  there is considerable  correspondence 
  2456.         between  the  SCREEN  graphics commands and  IBM  BASIC  graphics 
  2457.         commands, as is explained below.
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  38
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.         SCREEN DRAW command
  2514.  
  2515.              Form:  S[modifier]:D,[expression]
  2516.  
  2517.              This  command  is used to draw lines on the  color  graphics 
  2518.         screen,  using  turtle graphics;  an attempt to use this  command 
  2519.         while in text mode will cause an error.
  2520.              The  expression  consists  of a series  of  turtle  graphics 
  2521.         subcommands  which may be separated by spaces,  if  desired,  for 
  2522.         readability.   Each subcommand is a capital letter,  which may be 
  2523.         prefixed  by another capital letter (to modify its  effect),  and 
  2524.         which  is followed by either one number or two numbers  separated 
  2525.         by  a  comma.   These subcommands are fully explained in the  IBM 
  2526.         BASIC  manual,  pages  4-79  to 4-83.   All  of  the  subcommands 
  2527.         supported by the IBM BASIC 'DRAW' statement are valid, except for 
  2528.         the 'X' subcommand and the '={variable name'  construction,  both 
  2529.         of  which  will cause errors if used.   Improper turtle  graphics 
  2530.         subcommands  may  also  cause an error,  as  well  as  unintended 
  2531.         results!
  2532.              For  the  convenience  of  the  user,  the  subcommands  are 
  2533.         summarized  below.   Small  letter 'n' is used  to  represent  an 
  2534.         integer  number;  small letters 'x' and 'y' are used to represent 
  2535.         coordinate values (either absolute or relative).
  2536.  
  2537.              Un -- move turtle up n pels (decreasing y coordinate)
  2538.              Dn -- move turtle down n pels (increasing y coordinate)
  2539.              Ln -- move turtle left n pels (decreasing x coordinate)
  2540.              Rn -- move turtle right n pels (increasing x coordinate)
  2541.              En -- move diagonally up and right n pels
  2542.              Fn -- move diagonally down and right n pels
  2543.              Gn -- move diagonally down and left n pels
  2544.              Hn -- move diagonally up and left n pels
  2545.  
  2546.              These  subcommands move the turtle relative to  its  current 
  2547.         position.
  2548.  
  2549.              Mx,y -- move the turtle to the point with coordinates x,y
  2550.              M+x,y -- move the turtle x pels horizontal,  y pels vertical 
  2551.                   relative to current position
  2552.              M-x,y -- move turtle -x pels  horizontal (i.e.  left) and  y 
  2553.                   pels vertical relative to current position
  2554.  
  2555.              This  subcommand  is  used to move the turtle  either  to  a 
  2556.         particular   point  (absolute  coordinates  x,y)  or  in  an  x,y 
  2557.         displacement relative to the current position.
  2558.              Any of these subcommands may be prefixed with 'B',  in which 
  2559.         case the turtle moves but does not draw a line;  or with 'N',  in 
  2560.         which  case  the  turtle  moves,  then returns  to  its  previous 
  2561.         position.
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  39
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.              The  additional subcommands below may be used to modify  the 
  2579.         effect of the movement commands.
  2580.  
  2581.              An -- rotate all subsequent displacements n increments of 90 
  2582.                   degrees (n in the range 0-3)
  2583.              Cn -- draw  all subsequent lines in color n (n in the  range 
  2584.                   0-3).   The  default  color is  3.   The  actual  color 
  2585.                   selected  depends on which palette is in use--which may 
  2586.                   be set using the VIDEO COLOR command.
  2587.              Sn -- all  subsequent relative displacements are  multiplied 
  2588.                   by n/4 (as a scale factor) before they are executed
  2589.  
  2590.              In VTL,  very long turtle graphics commands may be  composed 
  2591.         by  assigning a string of subcommands to a string  register,  and 
  2592.         then   referencing   the  register  multiple  times  within   the 
  2593.         [expression] of a SCREEN DRAW command.   The compiled form of the 
  2594.         VTL interpreter permits strings of length up to 65,535 characters 
  2595.         (!);  however,  the  interpreter  will surely run out  of  memory 
  2596.         before  it runs out of string length,  especially on  a  computer 
  2597.         with  only  64K  of main memory.   The interpreted  form  of  the 
  2598.         interpreter   permits  a  maximum  string  length  of  only   255 
  2599.         characters.   In  any case,  command constructions using multiple 
  2600.         string register references should be used with caution!
  2601.  
  2602.         Examples:  S:D,BM25,25 U30R40D30L40  (draws  a  square  with  its 
  2603.                        lower left corner at 25,25)
  2604.                    C:$A=U30R40D30L40\S:D,$ABR25$A (draws two squares sep-
  2605.                        arated by 25 pels)
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  40
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.         SCREEN CIRCLE command
  2646.  
  2647.              Forms:  S[modifier]:C,arg1,arg2,arg3
  2648.                      S[modifier]:C,arg1,arg2,arg3,arg4
  2649.                      S[modifier]:C,arg1,arg2,arg3,arg4,arg5,arg6,arg7
  2650.  
  2651.              This  command is used to draw a circle,  or part of one,  in 
  2652.         graphics  mode using the color adapter.   An attempt to use  this 
  2653.         command in text mode will cause an error.
  2654.              Arg1,arg2  are the coordinates of the center of the  circle.  
  2655.         Arg3 is the radius of the circle.  These arguments must always be 
  2656.         specified.
  2657.              Arg4 is the color of the circle (default 3, range 0-3).
  2658.              Arg5 and arg6 are starting and ending angles in radians.  If 
  2659.         either is negative,  the ends of the segment of circle  specified 
  2660.         will be connected by lines to the center point.  These angles are 
  2661.         specified  using  standard  mathematical  notation  (i.e.  moving 
  2662.         counterclockwise with increasing angle).
  2663.              Arg7 is the aspect ratio for the circle, which may be varied 
  2664.         to  draw  an  ellipse  with its long axis in either the  x  or  y 
  2665.         direction.
  2666.              The  effect  of  different values  of  these  parameters  is 
  2667.         further explained in the IBM BASIC manual, pages 4-41 to 4-43.
  2668.  
  2669.         Examples:  S:C,100,100,40 (draws  a circle,  radius 40, center at 
  2670.                        100,100)
  2671.                    S:C,100,100,40,1 (draws similar circle, in color 1)
  2672.                    S:C,100,100,40,1,3.14,6.28  (draws lower half of  same 
  2673.                        circle)
  2674.                    S:C,100,100,40,1,3.14,6.28,2   (draws  lower  half  of 
  2675.                        ellipse with aspect ratio 2)
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  41
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.         SCREEN SET command
  2712.         SCREEN RESET command
  2713.  
  2714.              Forms:  S[modifier]:S,arg1,arg2{,arg3}
  2715.                      S[modifier]:R,arg1,arg2{,arg3}
  2716.  
  2717.              These commands are used to change the color of an individual 
  2718.         point on the graphics screen.  Arg1,arg2 is the coordinate of the 
  2719.         point.  Arg3 need not be specified, and defaults to 3 for the SET 
  2720.         command and 0 for the RESET command.  If arg3 is specified, it is 
  2721.         the color the point is to be set to (range 0-3 in medium, and 0-1 
  2722.         in high resolution), and the two commands are equivalent.
  2723.  
  2724.         Examples:  S:S,100,100 (pel  with coordinates 100,100 intensified 
  2725.                        with color 3)
  2726.                    S:R,100,100 (same pel intensified with color 0)
  2727.                    S:R,100,100,2 (same pel intensified with color 2)
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  42
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.         SCREEN PAINT command
  2778.  
  2779.              Form:  S[modifier]:P,arg1,arg2,arg3,arg4
  2780.  
  2781.              This command is used to fill in an area of the screen with a 
  2782.         given color.   The area is defined by picking a point within  it, 
  2783.         with  coordinates  arg1,arg2.   Arg3 is the color to be  painted.  
  2784.         Arg4 is the color of all points forming the boundary of the  area 
  2785.         to be filled in.  All of these arguments must be specified.
  2786.  
  2787.         Example:  S:D,BM25,25U20R24D20L24\S:P,7,27,3,3 (draws a square in 
  2788.                        color 3, and fills it in with color 3)
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  43
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.         SCREEN LINE command
  2844.  
  2845.              Form:  S[modifier]:L,arg1,arg2,arg3
  2846.  
  2847.              This  command may be used in either text or graphics mode to 
  2848.         place  a  line  of  characters  on  the   screen,   horizontally, 
  2849.         vertically or diagonally.
  2850.              Arg1  is  the  ASCII  code for the  character  to  be  used, 
  2851.         specified as a decimal integer.  Arg2 is the number of characters 
  2852.         to be displayed (i.e.  the number of times the character is to be 
  2853.         repeated).   Arg3  is the direction of the line,  relative to the 
  2854.         current cursor position, as displayed below:
  2855.  
  2856.                             6 7 8
  2857.                             5 C 1
  2858.                             4 3 2
  2859.  
  2860.         where C is the current cursor position.  As shown, if arg3=1, the 
  2861.         line  is  drawn  to the right;  if  arg3=4,  the  line  is  drawn 
  2862.         diagonally down and left.
  2863.              ASCII  codes  for all characters are found in Appendix G  of 
  2864.         the IBM BASIC manual.
  2865.  
  2866.         Example:  S:L,65,10,6  (displays a  row of 10 'A's diagonally  up 
  2867.                        and left)
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  44
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.         KEY control command
  2910.  
  2911.              Forms:  K[modifier]:[expression],[expression]
  2912.                      K[modifier]:[subcommand]
  2913.  
  2914.              This  command permits the user to assign a string expression 
  2915.         of up to 16 characters to any of the ten function keys  (F1-F10), 
  2916.         turn the function key display on line 25 of the screen on or off, 
  2917.         and list the assigned values, if any, of the function keys.
  2918.              The  first form of this command is used to assign a value to 
  2919.         a  function key.   The first expression is evaluated as a  number 
  2920.         between  1  and 10,  specifying the key;  the  second  expression 
  2921.         (which  is automatically truncated to 16 characters if too  long) 
  2922.         is assigned to the specified key.   If the second expression ends 
  2923.         in an ampersand (`&`),  a carriage return will be appended to the 
  2924.         expression if its length is 15 characters or less.
  2925.              The  second  form of the command  performs  other  functions 
  2926.         according to the subcommand:
  2927.  
  2928.              ON -- turns on the function key display
  2929.              OFF -- turns off the function key display
  2930.              LIST -- lists all function key values on the screen
  2931.  
  2932.         The  effects of these subcommands are those of the IBM BASIC 'KEY 
  2933.         ON', 'KEY OFF', and 'KEY LIST' commands (see Manual, pp. 4-131 to 
  2934.         4-133).   Initially,    VTL  assigns  no values  to  the 
  2935.         function keys.
  2936.  
  2937.         Note  WELL:   If the soft key display is ON,  and a VIDEO  LOCATE 
  2938.         command  is  used to attempt to move the cursor to  line  25,  an 
  2939.         error will result.
  2940.  
  2941.         Examples:  K:1,Valley Forge (the string expression "Valley Forge" 
  2942.                        is assigned to function key F1)
  2943.                    K:LIST  (all function key values are displayed)
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  45
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.         BEEP (sound) command
  2976.  
  2977.              Forms:  B[modifier]:[sub-cmd.],arg1{,arg2}
  2978.                      B[modifier]:[sub-cmd.],[expression]
  2979.  
  2980.              This command is used to activate the built-in speaker of the 
  2981.         PC,  to  create  single  tones,  or  to  play  a  melody.   Three 
  2982.         subcommands specify the action desired:
  2983.  
  2984.              B -- beep (at standard frequency)
  2985.              S -- sound a specified frequency for a specified interval
  2986.              P -- play  a  melody  using the IBM  BASIC  tone  definition 
  2987.                        language
  2988.  
  2989.              For  subcommand  'B',  arg1 specifies the number of times  a 
  2990.         'beep'  should  be  repeated.   The repeated  beep  sounds  as  a 
  2991.         continuous tone; thus arg1 specifies the length of the beep.
  2992.              For subcommand 'S', arg1 represents the frequency in Hz, and 
  2993.         ranges between 37 and 32767.  Arg2 represents the duration of the 
  2994.         sound in system clock 'ticks' (18.2 ticks in one second).
  2995.              For  subcommand 'P',  the second form of the BEEP command is 
  2996.         used.   The  expression is a string of commands in the IBM  BASIC 
  2997.         tone definition language, used by the PLAY statement (manual, pp. 
  2998.         4-209 to 4-212).  For the user's convenience, the commands, which 
  2999.         may be separated by spaces for readability, are summarized below.  
  3000.         All commands listed in the manual except 'X' are permitted.
  3001.  
  3002.              A  to G -- plays the indicated note in the  current  octave, 
  3003.                   sustaining  the note for the current length.   A '+' or 
  3004.                   '#' as a suffix (i.e.  'G#' or 'G+') indicates a  sharp 
  3005.                   (if valid);  a '-' as a suffix (i.e.  'G-') indicates a 
  3006.                   flat
  3007.              Nn -- n ranges between 0 (rest) and 84 (C'''), and specifies 
  3008.                   a   note   (an   alternate  method  besides   A-G   and 
  3009.                   accidentals)
  3010.              On -- n ranges between 0 and 6.  Selects the current octave.  
  3011.                   Octave 3 starts with middle C; octave 4 is the default.
  3012.              Ln -- n ranges between 1 and 64.   Selects the current  note 
  3013.                   length (1/nth note).   As an alternate method, if using 
  3014.                   A-G and accidental notation,  a note may be followed by 
  3015.                   n to specify the length of only that note (i.e. B-16 is 
  3016.                   a B-flat held as a 16th note)
  3017.              Pn -- n ranges between 1 and 64.   Specifies a rest of value 
  3018.                   1/nth.
  3019.              Tn  -- n  ranges between 32 and 255.   Sets the tempo  as  n 
  3020.                   quarter notes in a minute.  The default is 120.
  3021.              MF -- Music Foreground.  The VTL program does not continue 
  3022.                   until the specified melody has been completed.  This is 
  3023.                   the default state.
  3024.              MB -- Music  Background.   The VTL program continues while 
  3025.                   the melody is playing.   Use this with caution,  as the 
  3026.                   music may be distracting, and melodies of >256 notes to 
  3027.                   be played in background may cause an error.
  3028.  
  3029.  
  3030.  
  3031.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  46
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.              MN -- Music   Normal.   Each  note  plays  for  7/8  of  the 
  3042.                   specified length.  This is the default state.
  3043.              ML -- Music Legato.  Each note plays for the full length.
  3044.              MS -- Music  Staccato.   Each  note plays for  3/4  of  the 
  3045.                   specified length.
  3046.  
  3047.  
  3048.         Examples:  BY:B,10  (10 concatenated beeps)
  3049.                    B:S,55,36 (2 seconds of 55 Hz)
  3050.                    B:P,CDEFGAB O5 C (plays a scale in quarter notes)
  3051.  
  3052.         Note:   complex  melodies  may be formed by assigning phrases  to 
  3053.         string registers,  then using register references to insert  them 
  3054.         into  a  'B:P' command.   This feature should be used  cautiously 
  3055.         since  very  long expressions may cause an  error  by  exhausting 
  3056.         memory,  exceeding maximum string length,  or, if music is played 
  3057.         in  the  background,  exceeding maximum background  note  storage 
  3058.         space.
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  47
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.         QUICKMOVE command
  3108.  
  3109.              Form:  Q[modifier]:[sub-cmd.],[filename]{,arg1}
  3110.  
  3111.              This  command  is used to load an entire screen of  text  or 
  3112.         graphics.   In text mode, not only the characters are loaded into 
  3113.         the screen,  but all character attributes (i.e.  colors or modes) 
  3114.         are loaded too.   For the color adapter,  arg1 specifies the page 
  3115.         of  text  memory  (0-3 for 80 column,  0-7 for 40 column)  to  be 
  3116.         loaded.  In graphics mode, the entire screen is loaded for either 
  3117.         high or medium resolution,  and arg1 is omitted.  The argument is 
  3118.         ignored if the monochrome adapter is in use.
  3119.              Similarly,  this command may be used to 'dump' the  contents 
  3120.         of  the specified text page,  or the graphics screen,  to a  disk 
  3121.         file.  The subcommands are:
  3122.  
  3123.              L -- load screen from specified file
  3124.              D -- dump screen from specified file
  3125.  
  3126.         The action taken depends on the CURRENT display mode,  set either 
  3127.         by default or by a VIDEO SELECT command.  For subcommand 'L', the 
  3128.         specified  file is checked for appropriate length (2000 bytes for 
  3129.         a 40-column text screen, 4000 bytes for an 80-column text screen, 
  3130.         and 16000 bytes for a graphics screen).   If the file length does 
  3131.         not  match  the  current display  mode,  an  error  occurs.   For 
  3132.         subcommand  'D',  the current display mode and text screen  width 
  3133.         determines  the  size of the file created,  and  which  data  are 
  3134.         transferred.
  3135.              For  either  subcommand,  the specified file name must be  a 
  3136.         valid DOS filename, with extension.
  3137.  
  3138.         Examples:  V:S,1,1,0,0\V:C,1,0\Q:L,video.dmp   (medium-resolution
  3139.                        graphics mode is selected;  palette 0 is selected, 
  3140.                        with color 1 as background;  and a graphics screen 
  3141.                        previously saved in file 'video.dmp' is loaded)
  3142.                    V:W,40\V:S,0,0,0,1\Q:L,char.dmp,1 (40-column text mode
  3143.                        is  selected  with page 1 visualized;  page  1  is 
  3144.                        loaded with the previously saved contents of  file 
  3145.                        'char.dmp')
  3146.                    Q:D,char.dmp,3  (assuming  text  mode,   the   current 
  3147.                        contents  of  page 3--2000 bytes if in  40  column 
  3148.                        width, 4000 bytes if in 80 column width--is dumped 
  3149.                        into file 'char.dmp')
  3150.                    Q:D,video.dmp   (assuming graphics mode,  the contents 
  3151.                        of  the screen are dumped into  file  'video.dmp'.  
  3152.                        If the monochrome display is in use,  the contents 
  3153.                        of the current display are saved.)
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  48
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.         NEWDISPLAY command
  3174.  
  3175.              Form:  N[modifier]:[sub-cmd.]
  3176.  
  3177.              This  command  is valid if and only if both  monochrome  and 
  3178.         color/graphics  adapters  are present.   Otherwise,  use of  this 
  3179.         command will result in an error.  The subcommands are:
  3180.  
  3181.              C -- switch to color adapter
  3182.              M -- switch to monochrome adapter
  3183.  
  3184.         If  the  specified  adapter is already in  use,  the  command  is 
  3185.         ignored.   When a switch is made to the color adapter,  40-column 
  3186.         text  mode  is  selected  as  default.    Default  mode  for  the 
  3187.         monochrome adapter is 80-column text.
  3188.  
  3189.         Examples:  N:C (switch to color adapter)
  3190.                    N:M (switch to monochrome adapter)
  3191.  
  3192.         Note:   Extended register V (referenced by @V) contains a  single 
  3193.         capital  letter  specifying which adapter(s) VTL  found  present.  
  3194.         This  may  be 'M' (monochrome adapter only),  'C' (color  adapter 
  3195.         only),  or 'B' (both present).  The command, 'Y:@V=B' may be used 
  3196.         to test for the presence of both adapters.
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  49
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.            
  3239.         III.  Use of the Interpreter and Virtual Teaching Language
  3240.  
  3241.              The  interpreter is invoked with the command  "VTL<cr>".  As 
  3242.         described above,  VTL first searches for the file, "autoexec.vtl" 
  3243.         as a default program to execute.   If this file is not found, the 
  3244.         interpreter asks:
  3245.  
  3246.         program name:
  3247.  
  3248.         The  user then specifies the name of the program to be  run.  The 
  3249.         file extension ".vtl" need not be entered,  and is assumed. Files 
  3250.         with another extension may be executed as programs.
  3251.  
  3252.              The PILOT teaching language was developed in the late 1960's 
  3253.         by Dr.  John Starkweather, as a specialized computer language for 
  3254.         development  of  'courseware'--programs used  for  computer-aided 
  3255.         instruction (CAI).   The original language was quite simple, with 
  3256.         only a few basic commands (TYPE,  ACCEPT,  MATCH, JUMP, END).  As 
  3257.         computers became less expensive and more widespread, the original 
  3258.         language  was  extended  to incorporate more  commands,  and  was 
  3259.         further  modified to fit the capabilities of different  computer.  
  3260.         The  result  was  chaos  (as it  was  with  many  other  computer 
  3261.         languages),   and  a  standard  (PILOT  '73)  was  established--a 
  3262.         standard  which this interpreter ignores (!).   As usual,  when a 
  3263.         standard  is ignored,  there are good reasons for adding  to  the 
  3264.         PILOT  chaos.   The  1973  standard includes a number  of  multi-
  3265.         character  commands  (e.g.  AS:  for  ACCEPT  SINGLE)  which  add 
  3266.         confusion  to the syntax,  and therefore make the  language  less 
  3267.         usable  by  the  novices it was  supposedly  designed  for.   The 
  3268.         present  version uses only single-letter commands,  most of which 
  3269.         require only one expression following the colon (:),  and some of 
  3270.         which  require no modification at all.   Twenty-six  (A:  to  Z:) 
  3271.         commands  comprise the entire command set of the  language.   The 
  3272.         arrangement  and  form  of arguments (expressions  following  the 
  3273.         colon)  in  the more complex commands has been  made  consistent.  
  3274.         Also,  arguments  for the graphics and sound commands  have  been 
  3275.         kept  consistent  with  those  used by  corresponding  IBM  BASIC 
  3276.         statements:
  3277.  
  3278.                        VTL             IBM BASIC
  3279.  
  3280.                        V:L               LOCATE
  3281.                        V:C               COLOR
  3282.                        V:S               SCREEN
  3283.                        V:W               WIDTH
  3284.                        S:D               DRAW (excluding "X")
  3285.                        S:C               CIRCLE
  3286.                        S:S               PSET
  3287.                        S:R               PRESET
  3288.                        S:P               PAINT
  3289.                        B:S               SOUND
  3290.                        B:P               PLAY (excluding "X")
  3291.  
  3292.  
  3293.  
  3294.  
  3295.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  50
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.              The  following  paragraphs explore the ways this  new  PILOT 
  3306.         dialect   may  be  used  to  create  courseware,   as   well   as 
  3307.         presentations,  adaptive  tests,  and other uses for the fun  and 
  3308.         profit of the programmer.
  3309.  
  3310.         Creating a Program
  3311.  
  3312.              VTL programs are PC-DOS text files.   A file is a collection 
  3313.         of data on disk.   A text file is a collection of  text--letters, 
  3314.         numbers,  etc. arranged in sentences, stored on disk.  Text files 
  3315.         are created using a computer program designed to enter,  edit and 
  3316.         store  text,  using  the keyboard and video display to enter  and 
  3317.         edit,  and  the  disk drive to store.   The  simple  line  editor 
  3318.         EDLIN.COM which is supplied with PC-DOS is more than adequate for 
  3319.         entering  VTL  programs.   Instructions  for EDLIN are  found  in 
  3320.         Chapter 4 of the DOS manual.
  3321.              Users who have more sophisticated editors,  such as the  IBM 
  3322.         Personal Editor (R), or word-processing programs such as Wordstar 
  3323.         (R),  may wish to use these programs to create VTL files.   Word-
  3324.         processing  programs must be used with  caution,  however,  since 
  3325.         they  may  insert  peculiar characters into the  text  to  effect 
  3326.         formatting of printed output.   Wordstar,  for example,  must  be 
  3327.         used in its 'non-document' mode to create programs.
  3328.  
  3329.         Presenting Text with VTL
  3330.  
  3331.              The  simplest possible VTL program would be an existing text 
  3332.         file,  such  as a chapter from a book.   One would only  have  to 
  3333.         rename  the  file containing the text,  giving the file  the  new 
  3334.         extension  ".plt" (e.g.  chapter1.txt would become chapter1.plt).  
  3335.         Such a file would be treated by the interpreter as a long  series 
  3336.         of  TYPE  commands.   All of the text would be displayed  on  the 
  3337.         screen,  but would scroll past the reader too quickly to be read.  
  3338.         One could modify the file by inserting a line consisting of:
  3339.  
  3340.              \Press any key to continue...\W:
  3341.  
  3342.         every 22 lines.   As an alternative,  one could write and execute 
  3343.         the following program:
  3344.  
  3345.              Z:%\!this clears all the integer registers
  3346.              C:%A=1\!set the initial line number to 1
  3347.              *loop\F:chapter1.txt,%A\C:%A=%A+23
  3348.              \Press any key to continue...\W:\J:loop
  3349.  
  3350.         This program would display every 23 lines as a frame, then add 23 
  3351.         to the starting line number, and display the next 23 lines.  This 
  3352.         program  incorporates an 'endless loop' in line  3,  which  would 
  3353.         continue  to display frames until the FRAME command would run out 
  3354.         of  lines in the file,  at which time a "frame eof"  error  would 
  3355.         result.   As an alternative, one could count the number of frames 
  3356.         in the chapter, and modify the program thus:
  3357.  
  3358.  
  3359.  
  3360.  
  3361.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  51
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.              Z:%\C:%A=1\C:%F=1\!use %F for frame count
  3371.              *loop\F:chapter1.txt,%A\\Press any key to continue...
  3372.              W:\Y:%,%F=9\JY:end\!test if at 9th frame--last frame
  3373.              C:%A=%A+23\C:%F=%F+1\J:loop
  3374.              *end\E:
  3375.  
  3376.         The  FRAME  command is extremely powerful,  and is best  used  to 
  3377.         separate  the  text  of  a  lesson or  a  presentation  from  the 
  3378.         statements controlling the flow of a program.   The FRAME command 
  3379.         can  also be used to set up part of a screen as  an  illustration 
  3380.         (using  graphics characters built into the IBM PC character set), 
  3381.         and  then  present  text on another  part  of  the  screen.   For 
  3382.         example, the lines:
  3383.  
  3384.              F:illus23.grp,1,12
  3385.              F:text23.txt,1,12,12,1
  3386.  
  3387.         would  read 12 lines from file 'illus23.grp' to the top 12  lines 
  3388.         of  the display,  and read 12 lines from the file 'text23.txt' to 
  3389.         the next 12 lines of the display.   This is 'vertical windowing', 
  3390.         which is the easiest form of using sections of the display screen 
  3391.         as  'windows' for different sorts of information.   Using  column 
  3392.         offsets (the 5th argument of the FRAME command),  it is  possible 
  3393.         to do horizontal windowing as well, but this is much trickier.
  3394.  
  3395.         Presenting Graphics
  3396.  
  3397.              There  are several ways to present graphics using VTL.   The 
  3398.         first--creating  a  figure using graphics characters  in  a  text 
  3399.         file--was  alluded to in the preceding section.   Turtle graphics 
  3400.         may  be  used  to create pictures if you  have  a  color/graphics 
  3401.         adapter and display which is IBM BASIC compatible.   Using turtle 
  3402.         graphics is slightly more complicated, however.
  3403.              First,  the display must be set to graphics mode--medium  or 
  3404.         high  resolution.   The  color  palette must  then  be  selected.  
  3405.         Finally,  the  image  is  created  using  a  series  of  graphics 
  3406.         commands.  For example, this sequence:
  3407.  
  3408.              V:S,1,1,0,0\!this selects graphics mode, medium resolution
  3409.              V:C,7,0,0\!this selects white as foreground color,
  3410.              !palette 0, and a black border to the screen
  3411.              S:D,BM50,100U30R40D30L40\!this creates a white box with
  3412.              !its lower left corner at coordinates 50,100 on the screen
  3413.  
  3414.              A  third  technique  for  presenting graphics is  to  use  a 
  3415.         graphics  editing  program to create,  and save  an  image.   The 
  3416.         picture is saved as a disk file,  which,  if it is in the  proper 
  3417.         form,  may be loaded using a QUICKMOVE LOAD command.   Of course, 
  3418.         the  display  mode  and color must be set  before  the  QUICKMOVE 
  3419.         command can be executed.  The author recommends PCCRAYON (R) as a 
  3420.         cheap,  effective graphics editor, whose DRAW (.drw) files can be 
  3421.         loaded by VTL.  For example:
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  52
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.              V:S,1,1\V:C,7,0,0\Q:L,illus23.drw
  3438.  
  3439.         would  load  the  contents  of file illus23.drw  into  the  color 
  3440.         display  in medium resolution graphics mode.   Note that a  high-
  3441.         resolution  graphics file would also be loaded (erroneously!)  by 
  3442.         this  command  sequence--it is up to the programmer to  see  that 
  3443.         graphics modes are correct (but this is simple).
  3444.              Any  graphics  editor program which saves  the  contents  of 
  3445.         color  adapter  video memory in BLOAD form can be used to  create 
  3446.         screens  for VTL.   The disk file holding a screen must be  16512 
  3447.         bytes  in  length to be loaded by VTL.   (This statistic  may  be 
  3448.         checked using the DOS 'DIR' command.)
  3449.  
  3450.         Testing--Adaptive and Otherwise
  3451.  
  3452.              After  presenting  material,   one  may  wish  to  test  the 
  3453.         comprehension  of  the information by the user of  your  program.  
  3454.         The easiest way to do so is to ask a question on the screen, have 
  3455.         the  user  type in a reply,  and test the reply for  correctness.  
  3456.         For example:
  3457.  
  3458.                   How  many bytes must a graphics screen file hold to  be 
  3459.              valid for loading by a QUICKMOVE command?  &\A:\!get reply
  3460.              M:16512\TY:Correct!!!
  3461.              TN:Nope--16512 bytes is the correct answer.
  3462.  
  3463.         This  example  uses a MATCH command to test the user's  response, 
  3464.         which is automatically entered into the 'comparison  register'--a 
  3465.         temporary  storage  area  which  holds the  most  recently  typed 
  3466.         response from an ACCEPT or WAIT command.   One need not have  the 
  3467.         user type a response directly; for multiple choice questions, the 
  3468.         function  keys  can be assigned values,  and then pressed by  the 
  3469.         user to respond, as below:
  3470.  
  3471.              K:1,true\K:2,false
  3472.              *1\V:Z\\\\\\     True or false--Nuclear War can be hazardous
  3473.              to your health.
  3474.  
  3475.              F1 -- true
  3476.              F2 -- false
  3477.              \W:\M:true\TY:You said a mouthful, buddy!!
  3478.              M:false\TY:You must not have read the question!!!\JN:1
  3479.  
  3480.         Note that the WAIT command will return ALL characters transmitted 
  3481.         by pressing a key (including a function key).   The program above 
  3482.         tests also for pressing an invalid key,  and repeats the question 
  3483.         if one is pressed.
  3484.              Using  these and other facilities of VTL,  one  may  develop 
  3485.         many  varieties of test question.   Individual questions can then 
  3486.         be compiled into examinations.   User responses can be  recorded, 
  3487.         either  in  print  (via  a  HARDCOPY command)  or  on  disk  (via 
  3488.         sequential file operations).  For example:
  3489.  
  3490.  
  3491.  
  3492.  
  3493.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  53
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.              Your response:  &\A:$A\O:A,response.txt\P:$A\X:
  3504.  
  3505.         This records the response of the user in a file (already created) 
  3506.         named 'response.txt'.  The user input in this example is appended 
  3507.         to  the  existing contents of the file by using the  Append  file 
  3508.         mode for the OPEN command.   (The Output file mode would be  used 
  3509.         initially  to create the file and erase a previous file with  the 
  3510.         same name, if any existed.)
  3511.              A commonly used application of computer-aided instruction is 
  3512.         'adaptive  testing'.   For  this technique,  an examination  with 
  3513.         multiple questions is compiled.  The order in which the questions 
  3514.         are  presented  to the user is determined in part by  the  user's 
  3515.         responses.    Thus,   the  examination  'adapts'  to  the  user's 
  3516.         apparent level of knowledge.   In VTL,  this can be done by using 
  3517.         conditional  JUMP or DO commands,  where the condition is  tested 
  3518.         for as described above.
  3519.              If responses are to be timed,  the timed WAIT command can be 
  3520.         used for user responses:
  3521.  
  3522.              F1 -- true
  3523.              F2 -- false\\W:10\JN:noresponse\M:true\!etc. etc....
  3524.  
  3525.         The timed wait can also be used to time presentation of material.  
  3526.         The  number of seconds should be set so that the  slowest  reader 
  3527.         anticipated  can  finish  the  material (unless you  wish  to  be 
  3528.         tricky).   A  faster  reader can omit the pause by  pressing  the 
  3529.         space bar, or any other key.
  3530.  
  3531.         Program Flow and Segmentation
  3532.  
  3533.              Discussing  adaptive  testing brings us to  consider  how  a 
  3534.         teaching program should be designed in its entirety.   Since  VTL 
  3535.         reads  program  lines one at a time from disk,  the best  way  to 
  3536.         write  a  teaching  program in this dialect is  to  separate  the 
  3537.         course  material  from  the actual program as much  as  possible.  
  3538.         This keeps the main program concise, and keeps the pause involved 
  3539.         in  JUMPing  to a statement earlier in the program  as  brief  as 
  3540.         possible.   Different  parts  of the main program can be kept  in 
  3541.         short  program  files  which chain to each  other  via  the  LINK 
  3542.         command.   Subprograms  invoked  by  DO commands can be  used  to 
  3543.         create  graphics,   play  music,  present  text,  or  execute  an 
  3544.         examination  question.   In any case,  the designer of a  program 
  3545.         MUST  have  a  firm plan of the material  to  be  presented,  the 
  3546.         methods to be used to present it,  and the strategy to be used to 
  3547.         test the student's comprehension.
  3548.  
  3549.         Use of RAMDISK
  3550.  
  3551.              Electronic disk,  or 'RAMDISK' refers to the use of extended 
  3552.         computer  main  memory  ('RAM') to emulate a  disk  drive.   This 
  3553.         technique  is very popular with users of the IBM  PC,  which  can 
  3554.         address  up to 640K bytes (roughly 655,000 characters) of data in 
  3555.         main memory, but whose programs typically require only about 128K 
  3556.         bytes  (roughly  131,000 characters) for  operation.   Memory  in 
  3557.  
  3558.  
  3559.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  54
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.         excess  of 128K bytes can be used as temporary 'disk' storage  by 
  3569.         running a program which convinces DOS that a third diskette drive 
  3570.         is present, whose capacity equals the amount of excess memory.
  3571.              Needless  to say,  random-access main memory  will  transfer 
  3572.         data to the computer much faster than diskette.   If the computer 
  3573.         is  running  VTL,  and the program the interpreter  is  executing 
  3574.         resides  in 'RAMDISK',  the program will execute somewhat  faster 
  3575.         than from diskette.   FRAME and QUICKMOVE commands will also load 
  3576.         the  screen faster.   However,  if only a small amount of  excess 
  3577.         memory  is available for RAMDISK,  it is best to store  only  the 
  3578.         main program and subroutines in electronic disk.  The interpreter 
  3579.         itself  need not reside there.   A DOS batch file can be used  to 
  3580.         set up the electronic disk,  copy the requisite files to it,  and 
  3581.         begin   execution  (if  the  initial  program  segment  is  named 
  3582.         'AUTOEXEC.VTL')  as  in  this example,  which  assumes  that  the 
  3583.         program diskette is in drive A and the RAMDISK is drive C:
  3584.  
  3585.               DOS Command                  Effect
  3586.  
  3587.              RAMDISK/160         sets up 160K byte electronic disk
  3588.              COPY *.PLT C:       copies all program segments
  3589.              COPY *.TXT C:       copies all frame files
  3590.              C:                  sets default drive to C
  3591.              A:VTL               starts interpreter
  3592.  
  3593.         If  the  program only is to be copied to disk C (i.e.  all  frame 
  3594.         files remain on disk A),  the program must specify the disk drive 
  3595.         to be searched for frame files, for example:
  3596.  
  3597.              F:a:frame1.txt   instead of  F:frame1.txt
  3598.  
  3599.         As an alternative, drive assignments can be entered by the user:
  3600.  
  3601.              Program drive (A:, B:, C:):  &\A:$P
  3602.              Text drive (A:, B:, C:):  &\A:$T
  3603.              ...
  3604.              L:$Pprog44.plt
  3605.              ...
  3606.              F:$Tframe44.txt
  3607.  
  3608.         or these assignments can be read from a disk file.
  3609.              Since  electronic  disk can be so useful  for  VTL,  not  to 
  3610.         mention  most  other applications,  the  author  enthusiastically 
  3611.         recommends  this  technique  to  all IBM  PC  users.   A  typical 
  3612.         electronic disk program retails for $50-100, a small price to pay 
  3613.         for  the performance improvement,  if you already have more  than 
  3614.         128K bytes of main memory.   If you don't, 64K byte RAM chip sets 
  3615.         currently retail for under $50 each....
  3616.  
  3617.         Envoi
  3618.  
  3619.              The  author hopes that the information in this section  will 
  3620.         help the reader become an effective and enthusiastic user of  the 
  3621.         VTL  interpreter  and  language.   The  additional  demonstration 
  3622.         programs   included  with  the  interpreter  provide  some  other 
  3623.  
  3624.  
  3625.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  55
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.         examples  of the uses of VTL--the extent of which may be  limited 
  3635.         only by your imagination!
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659.  
  3660.  
  3661.  
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  56
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.         Appendix A:  Error Messages
  3702.  
  3703.              VTL  is designed to detect and report most of  the  possible 
  3704.         errors  in  command syntax,  file access,  and IBM BASIC  command 
  3705.         access  (i.e.  for  graphics)  which  a  courseware  designer  or 
  3706.         programmer may accidentally include in his programs.   Of course, 
  3707.         despite  careful design by the author,  not every possible  error 
  3708.         can be provided for.   If an error occurs which is not trapped or 
  3709.         internally detected, it is reported by the message:
  3710.  
  3711.         IBM BASIC error N at PILOT line M
  3712.  
  3713.         where  N  is  the  BASIC error code and M is  the  VTL 
  3714.         program  line  number at which the error occurred.   If  such  an 
  3715.         error occurs,  the courseware author should check the error  code 
  3716.         against  the  list in Appendix A of the IBM BASIC  manual.   Some 
  3717.         errors,  such  as 'Out of Memory',  may be self-explanatory.   An 
  3718.         error  code  of 5 (invalid function call)  usually  signifies  an 
  3719.         error  in  tone-definition  language or turtle  graphics  command 
  3720.         construction.    In  any  case,  errors  of  this  sort,  if  not 
  3721.         correctable by simple courseware modifications should be reported 
  3722.         to your software dealer or directly to the publisher.
  3723.               VTL error codes are displayed using the form:
  3724.  
  3725.               ** [error explanation] at line N of program [file]**
  3726.  
  3727.         where  N  is  the line of the  VTL program  in  which  the  error 
  3728.         occurred.  If  the  error  occurred while another file  is  being 
  3729.         executed  by  a  DO command,  an additional  message  is  printed 
  3730.         stating  the name and line of the program file from which the  DO 
  3731.         command was executed.    The following error messages are  listed 
  3732.         by error explanation.
  3733.  
  3734.         bad  chain file -- the filename specified for a LINK  command  is 
  3735.              invalid, or the file does not exist
  3736.         bad  draw syntax -- an error in construction of a turtle graphics 
  3737.              expression has been made
  3738.         bad  exec.  file  -- the filename specified for a DO  command  is 
  3739.              invalid, or the file does not exist
  3740.         bad  frame file -- the filename specified for a FRAME command  is 
  3741.              invalid, or the file does not exist
  3742.         bad graphics syntax -- illegal arguments have been provided for a 
  3743.              SCREEN command other than DRAW
  3744.         bad play syntax -- an error in construction of a  tone-definition 
  3745.              language expression has been made
  3746.         bad  quickmove  file  -- the filename specified for  a  QUICKMOVE 
  3747.              command is invalid, or a load file does not exist
  3748.         duplicate  label  =  [label] -- a second occurrence of  the  same 
  3749.              label in the current program has been detected
  3750.         end  of file -- a GET command encounters end of file (EOF) on  an 
  3751.              attempted read.
  3752.         exec.  file  eof -- the end of a file named in a DO  command  was 
  3753.              reached before the specified first line was found
  3754.  
  3755.  
  3756.  
  3757.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  57
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.         file  already  open -- a file has already been opened for  access 
  3767.              prior to the current OPEN command.
  3768.         file  not open -- a file close,  GET or PUT is attempted prior to 
  3769.              opening a file.
  3770.         frame eof -- the specified first line to be displayed of a  frame 
  3771.              file is out of range.
  3772.         illegal  beep command -- invalid construction of a  BEEP  command 
  3773.              has been detected
  3774.         illegal  beep subcommand -- a non-existant or invalid  subcommand 
  3775.              has been specified for a BEEP command
  3776.         illegal  calculation  -- either  no "=" or  an  invalid  register 
  3777.              reference encountered in a CALCULATE command.
  3778.         illegal  comp.  type  -- the subcommand for a YES-IF command  was 
  3779.              incorrect (i.e. not %, # or $)
  3780.         illegal  do command -- invalid construction of a DO  command  has 
  3781.              been detected
  3782.         illegal  filename  -- a  filename given to  an  OPEN  command  is 
  3783.              invalid.
  3784.         illegal  key directive -- the directive for a KEY command of  the 
  3785.              form K[modifier]:[directive] is invalid (i.e. not ON, OFF or 
  3786.              LIST).
  3787.         illegal  key  #  -- the function key number specified for  a  KEY 
  3788.              command  of  the form K[modifier]:[key #  expr.],[expr.]  is 
  3789.              outside the range of 1-10.
  3790.         illegal  quickmove command -- invalid construction of a QUICKMOVE 
  3791.              command has been detected
  3792.         illegal   quickmove  subcommand  -- a  non-existant  or   invalid 
  3793.              subcommand has been specified for a QUICKMOVE command
  3794.         illegal  read  register  -- an  invalid  register  reference  was 
  3795.              supplied as the destination for a GET command.
  3796.         illegal register destination -- an invalid register reference was 
  3797.              supplied as the input destination for an ACCEPT command
  3798.         illegal  screen  command  -- invalid  construction  of  a  SCREEN 
  3799.              command has been detected
  3800.         illegal   screen   subcommand  -- an  illegal   or   non-existant 
  3801.              subcommand has been specified for a SCREEN command
  3802.         illegal  video command -- invalid construction of a VIDEO command 
  3803.              has been detected
  3804.         illegal  video subcmd.  -- the subcommand for a VIDEO command  is 
  3805.              invalid (i.e. not L, C, or Z).
  3806.         illegal  zero  command  -- an  illegal  register  type  has  been 
  3807.              specified for a ZERO command
  3808.         invalid  newdisplay  command -- either both display adapters  are 
  3809.              not present, or an invalid subcommand has been specified for 
  3810.              a NEWDISPLAY command
  3811.         label  not  found  -- a JUMP command cannot  find  the  specified 
  3812.              label.
  3813.         nested  Do  -- a  file  being executed by  a  DO  command  itself 
  3814.              contains a Do command.
  3815.         printer  error  -- a printer hardware error (not ready  or  paper 
  3816.              out) occurs with a HARDCOPY command
  3817.         quickmove  mode mismatch -- the length of a specified  load  file 
  3818.              does not match that expected for the current display mode
  3819.  
  3820.  
  3821.  
  3822.  
  3823.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  58
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.         recursive  register  reference  -- this error may  occur  when  a 
  3833.              string register reference occurs within a line of input from 
  3834.              a file or the keyboard, which is assigned to the same string 
  3835.              register  referenced  in  the  line  of  input.    The  next 
  3836.              reference to that register will cause infinite expansion  of 
  3837.              the  reference,  with either an 'out of memory' or  `illegal 
  3838.              string length' error
  3839.         specified line out of range -- the first line of a file specified 
  3840.              to a DO command does not exist in the file
  3841.         subr.  stack  overflow -- more than 30 subroutines  were  nested, 
  3842.              causing this error message on the 31st subroutine call.
  3843.         too  many  labels  -- the  current  program  contains  more  than      
  3844.              100 labels;  the 101st has just been encountered.
  3845.         unspecified error -- an  error has been trapped  for which  VTL 
  3846.              has  no  handling routine.   This message precedes the  'IBM 
  3847.              BASIC error' message.
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  59
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.         Appendix B:  Extended String Registers
  3901.  
  3902.  
  3903.              As  noted  in  Section II,  there  are  26  extended  string 
  3904.         registers  maintained by  VTL,  the contents of which may not  be 
  3905.         changed   directly  by  the  user,   but  may  be  inserted  into 
  3906.         expressions when referenced.   A reference to an extended  string 
  3907.         register  consists  of  the character '@' followed by  a  capital 
  3908.         letter from A-Z.   The contents of the specified register will be 
  3909.         inserted  in the expression containing the  reference,  replacing 
  3910.         the reference (as for the other types of register).   Not all  26 
  3911.         of the extended string registers are used in the current release; 
  3912.         therefore, references to unused registers will be replaced with a 
  3913.         null string.
  3914.              The  registers  used  by  the  current  release,  and  their 
  3915.         contents are:
  3916.  
  3917.              @A -- date    VTL  execution    was   begun  (set  on   ini-
  3918.                   tialization)
  3919.              @B -- time     VTL    execution    was    begun   (set    on 
  3920.                   initialization)
  3921.              @C -- current command line (set when line read)
  3922.              @D -- date  of current  program execution (set when  program           
  3923.                   file first opened)
  3924.              @I -- length   of  contents  of  comparison  register   (set 
  3925.                   whenever contents changed)
  3926.              @J -- contents of comparison register (set whenever contents 
  3927.                   changed)
  3928.              @K -- returned value of numeric register from ACCEPT
  3929.              @L -- current program line number (set when line read)
  3930.              @P -- name  of current program (set when program file  first 
  3931.                   opened or when new file chained)
  3932.              @S -- number  of   seconds  elapsed  before  key  struck  on 
  3933.                   execution  of  most  recent WAIT command  (set  if  key 
  3934.                   struck)
  3935.              @T -- current time (set whenever a command is executed)
  3936.              @U -- uppercase equivalent of text ACCEPTed or INSERTed
  3937.              @V -- display adapters present: M, C or B
  3938.              @X -- filename  of  file  most  recently executed  by  a  DO 
  3939.                   command (set when file opened for execution)
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  60
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.         Appendix C:  Intermixing Text and Graphics
  3966.  
  3967.  
  3968.              Although the techniques for doing so are not well  explained 
  3969.         in  the  IBM BASIC manual,  it is possible to place text  on  the 
  3970.         screen while using the color/graphics adapter in either medium or 
  3971.         high  resolution  graphics  mode,  even though a  cursor  is  not 
  3972.         displayed  while in graphics mode.   This is done by specifying a 
  3973.         cursor location (via the VIDEO LOCATE command),  and then using a 
  3974.         TYPE command to print text at the specified location.
  3975.              Relating the position of text to graphics coordinates is not 
  3976.         difficult.   Characters  are  displayed in an 8 x 8  pel  matrix; 
  3977.         thus,  200 rows of pels permit 25 lines;  320 columns of pels (in 
  3978.         medium resolution) permit 40 columns; and 640 columns of pels (in 
  3979.         high resolution) permit 80 columns. The upper left hand corner of 
  3980.         a character matrix will begin at the coordinate (8*(R-1),8*(C-1)) 
  3981.         where  R  is  the row number and C is the column  number  of  the 
  3982.         character.   Characters  printed will be displayed in the current 
  3983.         foreground color.
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  61
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.                                       INDEX
  4032.  
  4033.              A
  4034.  
  4035.         ACCEPT command  8,9,10,11,24,52,53
  4036.              conversational form 11
  4037.         Arguments (for commands) 9
  4038.         Automatic program execution 6,54
  4039.         AUTOEXEC.VTL 6,54
  4040.  
  4041.              B
  4042.  
  4043.         BASIC compiler dialect 3
  4044.         BASIC run time errors 57
  4045.         BEEP command 45
  4046.  
  4047.              C
  4048.  
  4049.         CALCULATE command 8,9,13,17,27,39,50,51
  4050.         Chaining VTL programs 6,23
  4051.         Closing a disk file 20
  4052.         Color, setting 33
  4053.         Command syntax 10-48
  4054.              ACCEPT 11
  4055.              BEEP 45
  4056.              CALCULATE 17
  4057.              DO 27
  4058.              END 16
  4059.              FRAME 25
  4060.              GET 21
  4061.              HARDCOPY 18
  4062.              INSERT 24
  4063.              JUMP 13
  4064.              KEY 44
  4065.              LINK 23
  4066.              MATCH 12
  4067.              NEWDISPLAY 48
  4068.              OPEN 19
  4069.              PUT 22
  4070.              QUICKMOVE 47
  4071.              RETURN 15
  4072.              SCREEN 36-43
  4073.              TYPE 10
  4074.              USE 14
  4075.              VIDEO 31-35
  4076.              WAIT 28
  4077.              XIT 20
  4078.              YES-IF 26
  4079.              ZERO 29
  4080.         Comments 8
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  62
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.              D
  4098.  
  4099.         Disk copying 4
  4100.         DO command 23,27,53
  4101.  
  4102.              E
  4103.  
  4104.         END command 16,23,51
  4105.         Error messages 56-58
  4106.  
  4107.              F
  4108.  
  4109.         File copying 4,5
  4110.         File operations 20-23
  4111.              open 20
  4112.              close 21
  4113.              read 22
  4114.              write 23
  4115.         FRAME command 25,50,51,54
  4116.  
  4117.              G
  4118.  
  4119.         GET command 8,9,21
  4120.  
  4121.              H
  4122.  
  4123.         HARDCOPY command 3,18
  4124.  
  4125.              I
  4126.  
  4127.         INSERT command 9,24
  4128.         Installation 4-5
  4129.         Interpreter
  4130.              features 6-7
  4131.              installation 4-5
  4132.  
  4133.              J
  4134.  
  4135.         JUMP command 13,50,52,53
  4136.  
  4137.              K
  4138.  
  4139.         KEY command 44
  4140.  
  4141.              L
  4142.  
  4143.         Labels 8,10,13,14
  4144.         LINK command 23,53,54
  4145.  
  4146.              M
  4147.  
  4148.         Manual, printing 4
  4149.         MATCH command 12,52
  4150.         Modifier 8,9
  4151.  
  4152.  
  4153.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  63
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.              N
  4165.  
  4166.         NEWDISPLAY command
  4167.  
  4168.              O
  4169.  
  4170.         OPEN (a disk file) command 19,53
  4171.              modes 19,21
  4172.         Operators 9,17,26
  4173.  
  4174.              P
  4175.  
  4176.         Phrase match 8,12,16
  4177.  
  4178.              Q
  4179.  
  4180.         QUICKMOVE command 47,52,54
  4181.  
  4182.              R
  4183.  
  4184.         Ramdisk (electronic disk) 53,54
  4185.         Registers 6,8-9
  4186.              comparison 9,12
  4187.              extended string 9,59
  4188.              integer 6,8,11,17,21,26,27
  4189.              naming 8-9
  4190.              real 6,8,17,18
  4191.              string 6,8,9,13,17,21,24,26,39
  4192.         RETURN command 14,15
  4193.  
  4194.              S
  4195.  
  4196.         SCREEN command 30,36-43,51
  4197.              CIRCLE subcommand 36,40,49
  4198.              DRAW subcommand 36,38-39,49,51
  4199.              LINE subcommand 36,43,49
  4200.              PAINT subcommand 36,42,49
  4201.              RESET subcommand 36,41,49
  4202.              SET subcommand 36,41,49
  4203.         Subcommands 9,30
  4204.  
  4205.              T
  4206.  
  4207.         Turtle graphics 36
  4208.         TYPE command 10,51,52
  4209.  
  4210.  
  4211.              U
  4212.  
  4213.         USE (subroutine) command 14
  4214.  
  4215.              V
  4216.  
  4217.  
  4218.  
  4219.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  64
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.         VIDEO command 30,31-35,49,51,52,60
  4229.              COLOR subcommand 30,31,32-33,49,51,52
  4230.              LOCATE subcommand 31,34,49,60
  4231.              SELECT subcommand 30,31,35,49,51,52
  4232.              WIDTH subcommand 30,31,35,49
  4233.              ZERO subcommand 31,49,52
  4234.         Video display modes 30,32,35
  4235.              selection 35
  4236.         VTL interpreter
  4237.              running 49
  4238.              language design 49
  4239.         VTL programs
  4240.              creation 8,50
  4241.              chaining 23
  4242.              naming 50
  4243.  
  4244.              W
  4245.  
  4246.         WAIT command 9,24,28,50,51,52,53
  4247.  
  4248.              X
  4249.  
  4250.         XIT (close disk file) command 20
  4251.  
  4252.              Y
  4253.  
  4254.         YES-IF command 26,51
  4255.  
  4256.              Z
  4257.  
  4258.         ZERO command 29,50,51
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.         COPYRIGHT STUART A. JONES 1982, 1983, 1984      Page  65
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.      To print the manual, use the 'docu.bat' batch file.
  4292.      The self-running demonstration programs may be run by specifying
  4293. program 'srun' to the interpreter.
  4294.      Requests for information, support, and (of course) registrations should
  4295. be addressed to:
  4296.  
  4297.              Stuart A. Jones
  4298.              C/O Nuclear Software
  4299.              1045 Treeline Drive
  4300.              Allentown, Pa. 18103
  4301.