home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / SDA30.ZIP / SDA.DOC < prev    next >
Encoding:
Text File  |  1983-03-05  |  79.6 KB  |  2,113 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                           ESCREEN DESIGN AIDF
  25.  
  26.  
  27.                                  Copyright 1983
  28.  
  29.                                        by
  30.  
  31.                                    DD Systems
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.              Dan Daetwyler
  51.              Route 5, Box 518A
  52.              Springdale, AR 72764
  53.              501-756-0212
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.            
  62.  
  63.  
  64.  
  65.  
  66.  
  67.         Screen Design Aid - Version 3.0
  68.  
  69.  
  70.         EPREFACEF
  71.  
  72.              This is a T.P.I.R product!  (The Price Is... Reasonable?)  I 
  73.         object  to  paying  half the price of my hardware  for  a  single 
  74.         software  package,  so  I'm trying to do something about  it.   I 
  75.         believe  that there are enough "micros" around to make a  reason-
  76.         able  return on your labor investment through  volume...  if  you 
  77.         don't  have  to pay substantive advertising and marketing  costs.  
  78.         If  you're reading this document,  you have the package.   It  is 
  79.         copyrighted, so what are your rights?  They are given here:
  80.  
  81.         --  You are free to copy, and encouraged to distribute to any/all 
  82.              of your friends,  the materials included in the distribution 
  83.              diskettte.  Please include this document.
  84.  
  85.         --  You  may use these materials in any way you see fit,  but you 
  86.              may  not "sell" the package.   You may use screens  designed 
  87.              using the package in commercial products,  and the  $SDA.OBJ 
  88.              module and the $FIELD.MAC macros are hereby declared "Public
  89.              Domain",  so  you  are free to use those in your  commercial 
  90.              endevors.
  91.  
  92.         Where's the "catch"?   Simple.   Its up to you.   If you use this 
  93.         package, and like it, send me a check for $25.  Otherwise, thanks 
  94.         for experimenting!   What do you get for the $25, besides a clear 
  95.         conscience?   Not much.  I'll put you on my mailing list and when 
  96.         (not  if) bugs are encountered,  I'll notify you and  offer   our 
  97.         handy, dandy copy service, which incidentally is available to all 
  98.         your friends for their initial copy,  if you don't want to bother 
  99.         copying   the  diskette.    I'll  also  notify  you  when  future 
  100.         developments  are available:   within a few weeks,  we'll have  a 
  101.         programmers  full  screen  editor,  a  catalog  facility,  and  a 
  102.         reasonable "batch" listing capability that makes use of all those 
  103.         "goodies" hiding in the EPSON printer.  
  104.  
  105.              The copy service mentioned,  is also simple:  Send diskette, 
  106.         mailer, and enough postage to the writer and we'll make a copy of 
  107.         the distribution diskette for you.  If you don't want to send the 
  108.         diskette,  mailer,  et al., send a check for $7.50 and we'll send 
  109.         you a new Verbatim with the materials.
  110.  
  111.         DISCLAIMER (Or I really don't want to be sued!)
  112.  
  113.         Although  reasonable  testing  has  been  conducted,   under   no 
  114.         circumstances will the author be liable to you or any third party 
  115.         for  any damages,  including lost profits or other incidental  or 
  116.         consequential damages arising out of the use of, or the inability 
  117.         to use,  this software.  Further the offers made in this document 
  118.         are  subject to withdrawal at any time and without  notification, 
  119.         and prices quoted are subject to change without notice.      
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.         Preface                         2
  128.  
  129.  
  130.  
  131.  
  132.  
  133.         Screen Design Aid - Version 3.0
  134.  
  135.  
  136.                                 TABLE OF CONTENTS
  137.  
  138.         Preface .........................................  2
  139.  
  140.         Introduction ....................................  4
  141.  
  142.         Organization of Document ........................  6
  143.  
  144.         Basic Operation .................................  7
  145.  
  146.         Saving a Screen ................................. 12
  147.  
  148.         Loading an Existing Screen ...................... 14
  149.  
  150.         Field Definition/Maintenance .................... 15
  151.  
  152.         Printing Screens ................................ 19
  153.  
  154.         Printing Field Tables ........................... 20
  155.  
  156.         Changing Display Device ......................... 21
  157.  
  158.         Color ........................................... 22
  159.  
  160.         Line Lengths .................................... 23
  161.  
  162.         Application Interface ........................... 24
  163.  
  164.         High Level Languages ............................ 27
  165.  
  166.         Technical Reference ............................. 30
  167.  
  168.         Error Messages .................................. 32
  169.          
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.         Table of Contents               3
  194.  
  195.  
  196.  
  197.  
  198.  
  199.         Screen Design Aid - Version 3.0
  200.  
  201.  
  202.         EINTRODUCTIONF
  203.  
  204.              The  Screen  Design  Aid  (SDA,  henceforth)  is  a  utility 
  205.         designed   to  permit  effective  exploitation  of  the   graphic 
  206.         capabilities  of  the IBM Personal Computer,  when  operating  in 
  207.         "text"  mode.   It  requires a relatively minimal  configuration, 
  208.         operating  on something less than a 64K machine euipped  with  at 
  209.         least  one  diskette  drive,  and utilizing at least one  of  the 
  210.         display interfaces (Monochrome or color/graphic) provided by IBM. 
  211.         It  can be used with monitors of either 40 or 80  character  line 
  212.         resolution, and will operate in either "black and white" or color 
  213.         mode.  IBM DOS (or equivalent) is required.
  214.  
  215.              Basically, it does no more than provide a relatively simple, 
  216.         fast  method  for  laying out display screens for  use  in  other 
  217.         processes.  This "trivial" task happens to be a relatively labor-
  218.         ious job and is usually more than painful.   The display hardware 
  219.         provided is excellent, and includes a fairly comprehensive set of 
  220.         "graphic" characters than may be displayed in "text"  mode.   Un-
  221.         fortunately,  no effective means for utilization of this facility 
  222.         was  provided.   The user is forced to perform detailed  clerical 
  223.         "coding" at the individual character level if he or she wishes to 
  224.         exploit the excellent character set.  This utility elminates that 
  225.         "coding",  and  provides a few other fringe benefits that  should 
  226.         find a lot of friends.
  227.  
  228.              Before  going  to  more detail,  fair  warning!   If  you're 
  229.         looking  for  a  true  "graphic"  capability  for  use  with  the 
  230.         color/graphic  board,  this ain't it!   This utility operates  in 
  231.         "text" mode exclusively,  and is limited to the graphics that can 
  232.         be  formed  using  the read only memory  (ROM)  based  characters 
  233.         provided by the hardware.  
  234.  
  235.              Having  said at least one thing its not,  what is  SDA?   It 
  236.         provides the following functions:
  237.  
  238.              -- Permits  the  definition  of  a  "screen"  utilizing  any 
  239.                   combination of the 254 displayable characters.
  240.  
  241.              -- Captures this definition in a compressed form, usually a 
  242.                   few  hundred  bytes versus the 4000  required  for  the 
  243.                   actual screen.
  244.  
  245.              -- Permits full exploitation of the attribute byte (eg:
  246.                   high intensity, blink, underscore, reverse, et al).
  247.  
  248.              -- Provides  simple  "maintenance"  of the  image,  so  that 
  249.                   required modifications are "painless".
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.         Introduction                    4  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.         Screen Design Aid - Version 3.0
  266.  
  267.  
  268.              -- Allows for definition of up to 100 fields on each screen, 
  269.                   where the "field" is limited only by line length. 
  270.                   Fields,  incidentally,  may have their own  (different) 
  271.                   attributes.  The application using the screen may then
  272.                   easily:
  273.  
  274.                   *  Output to a field
  275.  
  276.                   *  Position (cursor) to a field
  277.  
  278.                   *  Clear a field
  279.  
  280.                   *  Input from a field (destructively/non-destructively)
  281.  
  282.                   *  Out/In from a field (output followed by input)
  283.  
  284.              -- Provides a convenient interface that may be "bridged"
  285.                   to most "high level" compiled languages.  A minimum
  286.                   bridge to BASIC is provided, and sufficient data for
  287.                   development of other bridges is included in this 
  288.                   document.
  289.  
  290.              -- Provides full color support for those users equipped with
  291.                   the color/graphics interface.
  292.  
  293.              -- Provides both 80 and 40 character line support for users
  294.                   with the color/graphics interface.
  295.  
  296.              -- "Memory cost" for the application is limited to slightly
  297.                   over   500  bytes  PLUS  the  size  of  the  compressed 
  298.                   screen(s) used.
  299.  
  300.              -- Utilizes  "memory mapped" I/O,  so performance is  easily 
  301.                   within human response thresholds.
  302.  
  303.              -- Liberally provided with "help" menus and prompt aids, to 
  304.                   assist in "learning" the system.
  305.  
  306.              -- Provides documentation support by permitting print of the
  307.                   resulting screens (and their field tables), on EPSON
  308.                   MX80 with GRAFTRAX plus.
  309.  
  310.         In short,  provides all the facilities needed for the "bread  and 
  311.         butter" application utilizing interactive display screens.
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.         Introduction                    5  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.         Screen Design Aid - Version 3.0
  332.  
  333.  
  334.         EORGANIZATION OF DOCUMENTF
  335.  
  336.              Because of the variety of interfaces,  display devices, line 
  337.         lengths,  etc., it would be easy to become so involved in details 
  338.         as to make use of the utility appear complicated.  It is not!  To 
  339.         avoid this pitfall,  this document begins by ignoring some of the 
  340.         more  sophisticated uses of the utility.   The next sections will 
  341.         "walk  through" development of a screen,  and will  not  consider 
  342.         which  display  adapter  or line length your machine  happens  to 
  343.         have.   The  following  sections  then  explore  different  "Line 
  344.         lengths"  and "Color".  
  345.  
  346.              A  section  on use of screens in applications  is  then  in-
  347.         cluded,  together  with  a "cook book" for interfacing with  high 
  348.         level  languages.   A "technical reference" section is  included, 
  349.         which provides insight into the compressed screen,  field tables, 
  350.         etc., for the user that wishes to know more than you need to know 
  351.         to  use the utility.   Finally,  a very brief "error" section  is 
  352.         included,  to  cover the few primitive error conditions that  may 
  353.         occur during use of the utility.  
  354.  
  355.              It  is  suggested  that all users follow  through  the  next 
  356.         section.   Beyond that section, you can "pick and choose" to suit 
  357.         your  operating environment and needs.   The next section assumes 
  358.         you  will bring the utility up on your machine,  and  follow  the 
  359.         text with use of the utility.  To prepare for that process, it is 
  360.         suggested that you copy the file, SDA.COM to a work diskette, and 
  361.         maintain  your distrubution diskette as a "master  backup".   The 
  362.         file  is  NOT protected,  and you are free to copy it  using  the 
  363.         standard DOS utilities (see Preface for your "rights").  The file 
  364.         is  approximately 24,000 bytes,  so be sure you have a relatively 
  365.         empty diskette.  
  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.         Organization of Document        6
  392.  
  393.  
  394.  
  395.  
  396.  
  397.         Screen Design Aid - Version 3.0
  398.  
  399.  
  400.         EBASIC OPERATIONF
  401.  
  402.              Assuming  that DOS is loaded and running,  simply enter  the 
  403.         "command":
  404.  
  405.                        SDA
  406.  
  407.         As  soon as the load process is complete,  you will see, on  what 
  408.         ever  display  you happen to be using,  the main "menu" for  SDA.  
  409.         This menu lists the major functions available under SDA,  and you 
  410.         may   select   any  function  by  entering   the   single   digit 
  411.         corresponding  to the function,  and depressing the "enter"  key.  
  412.         If  you happen to hit a wrong digit,  the error prompt giving the 
  413.         acceptable  range of values,  and a request to "depress any  key" 
  414.         will appear.  
  415.  
  416.              Since we're starting "cold", enter "1" -- a request to enter 
  417.         "edit/create".   Your  screen will immediately "clear"  with  the 
  418.         exception  of a few cryptic characters on the lowest line of  the 
  419.         display.   A  flashing cursor will be in the upper left corner of 
  420.         the screen.  
  421.  
  422.              Before explaining the "prompt line" (lowest line), let's try 
  423.         something else.   Depress function key 9 (hereafter given as F9).  
  424.         Again,   the  screen  immediately  changes,  but  this  time  its 
  425.         relatively  full  of "text".   Don't bother to read it  all  now.  
  426.         We'll come back to it many times in the next few paragraphs.  For 
  427.         now,  notice the last line "depress any key to exit", and hit the 
  428.         space bar (or any other key).   Whap!  Back to the "edit screen".  
  429.         As you'll discover,  anything that was displayed on this  screen, 
  430.         before entering "help" mode, will be restored after "help" mode.
  431.  
  432.              Now  lets look at the prompt line.   The first two fields on 
  433.         the  left  are relatively obvious:   the row and  column  of  the 
  434.         current  cursor  position (zero,  zero).   Let's move the  cursor 
  435.         around a bit.   Use any of the arrow keys on the numeric key  pad 
  436.         or the "backspace" key.   If you happen to display numeric digits 
  437.         rather  than  see the cursor move,  you have the "Num  Lock"  key 
  438.         depressed.  Depress it once, and try again.  OK now?
  439.  
  440.              Two things to note, as you move the cursor.  The prompt line 
  441.         display "tracks" the cursor,  by showing the current row/col each 
  442.         time  a key is depressed (yes,  the "typematic" function works  - 
  443.         hold a key down,  and watch the cursor fly).   Second, the cursor 
  444.         "wraps" the screen.   If you go off the right side,  you enter on 
  445.         the  same line on the left side.   Similarily,  exit/entry on the 
  446.         top  and  bottom of the screen also "wraps".   Depending  on  the 
  447.         device you're using,  you'll find that the last column is  either 
  448.         39  or  79.   The "bottom" row is 23,  since we're using line  24 
  449.         (25th line) for the prompt (but you can use it too...  we'll talk 
  450.         about that later).  
  451.  
  452.              OK,  that should be enough watching the blinking light  move 
  453.         around.   Position  the  cursor  to any convenient point  on  the 
  454.         screen,  and key in "data".   "Data", by the way is about all the 
  455.  
  456.  
  457.         Basic Operation                 7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.         Screen Design Aid - Version 3.0
  464.  
  465.  
  466.         other  keys on the keyboard,  with the exception of the  function 
  467.         keys,  the numeric keypad keys, and use of the "control" or "Alt" 
  468.         key  combinations.   For example,  hit the "enter"  key.   That's 
  469.         strange...  a music note appeared, and the cursor advanced!  Well 
  470.         that's  just  what it should do.   Other than the  normal  cursor 
  471.         advance after a character entry, all cursor movement must be made 
  472.         by using the numeric keypad "arrow" keys.   Carriage  return/line 
  473.         feed  just  happens to be two valid  graphic  characters.   Since 
  474.         we've  got 254 of them and only about 90 keys,  we're frugal with 
  475.         keys.   It'll   feel  a little strange for a  short  period,  but 
  476.         you'll get used to it quickly.  One trick is to "wrap" the screen 
  477.         and then move down one line.  
  478.  
  479.              Experiment  with  the keys a bit.   Don't  use  the  numeric 
  480.         keypad  keys  or function keys,  yet,  but anything else is  fair 
  481.         game.   Screen getting messy?   OK, hit F9, and we're back to the 
  482.         "help"  screen.   Scan  down the list to F8 -- Erase  screen  and 
  483.         field table.   Hit any key,  and we're back to the mess you left.  
  484.         Now try F8.   Whoops!   What happened?   Screen went  blank,  and 
  485.         there's  this "Are you sure?" message on the prompt line.   First 
  486.         let's say "N" for no.   Back to the mess!   Ok,  now lets try  F8 
  487.         again, and this time respond "Y" to the protection against fumble 
  488.         fingers.   That's  better.   Blank screen,  prompt line restored, 
  489.         cursor back to the upper left corner... in fact just like when we 
  490.         started.  
  491.  
  492.              You  may  use  F8 any time you  desire.   Just  remember  -- 
  493.         anything you haven't saved to disk is LOST, LOST, LOST.  
  494.  
  495.              One more little "housekeeping" exercise.   Type any  message 
  496.         you  like on the screen.   F9 to see the "help" screen,  and this 
  497.         time  scan down to F10 -- Exit to Main Menu.   Hit any  key,  and 
  498.         confirm that your message is still there.   OK, now hit F10.  And 
  499.         we're back to the main menu we started with.   Ho hum,  so  what?  
  500.         Well  enter a "1" again,  and when you return to the edit  screen 
  501.         you'll  see your message is still displayed.   SDA will save  the 
  502.         current screen through all of its manipulations.   In fact, there 
  503.         are  only  two  ways to getting rid of it.   One  you've  already 
  504.         learned,  F8,  to  clear the screen.   The other is to  "load"  a 
  505.         "saved" screen over the top of the current screen.  
  506.  
  507.              So far, about all you've got is a very limited single screen 
  508.         editor...right?   OK,  lets start to play a bit.  F9, and look at 
  509.         F3 - Toggle Normal/Reverse video.  While you're here, look at F4, 
  510.         F5 and F6 also.  F3 through F6 all control the "attribute" of the 
  511.         character  you're keying to the screen.   Hit any key,  and we'll 
  512.         see how they work.   First hit F3.   The prompt line changed.  In 
  513.         the field following "At:",  the "N" (for normal) became "R"  (for 
  514.         reversed).   Now  key in some data (yes,  the space bar is data), 
  515.         and watch the characters appear black on white, rather than white 
  516.         on  black.   I'll  mention that the "FG:" and "BG:"  fields  also 
  517.         changed,  but  we'll worry about them in the section on  "Color".  
  518.         You can ignore them throughout this section.  
  519.  
  520.              One  of  the  exercises  you can  perform  is  to  note  the 
  521.  
  522.  
  523.         Basic Operation                 8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.         Screen Design Aid - Version 3.0
  530.  
  531.  
  532.         difference  between the space bar and the right arrow key.   When 
  533.         you're in reverse video,  the difference is noticable.  The space 
  534.         bar is "data",  but the right arrow is not.   Useful when  you're 
  535.         either trying to move over something without eraseing it, or when 
  536.         you do want to erase.  
  537.  
  538.              I  won't bother telling you to hit F8 when your screen  gets 
  539.         messy.   Hit F3,  and return to normal video.   Now hit F4.  This 
  540.         time  the  prompt line displays a "B" for "blink".   Key in  some 
  541.         data and watch it flash!.   Hit F4 to turn blink off, and hit F5.  
  542.         An "H" for "high intensity" appears, and the data you key will be 
  543.         displayed  at the "high intensity" level of your display  device. 
  544.         F5 to turn it off,  and F6 to see "U" (for underscore) and  watch 
  545.         your data appear with the "underscore".  
  546.  
  547.              Now that you've seen it work, try various combinations.  All 
  548.         but one is permissable, although one is of doubtful utility.  You 
  549.         may  not have "reverse" video and "underscore" active at the same 
  550.         time.   You've  probably already noticed that you can't get  this 
  551.         combination  on  the  prompt line.   The reason  is  a  "hardware 
  552.         limitation",  so  SDA  won't  allow  it.   "High  intensity"  and 
  553.         "reverse video" is the "doubtful" combination.   SDA will  permit 
  554.         it, but it sure won't be used for any normal case.  
  555.  
  556.              Now  do  the F9 and look at the last several lines  -- those 
  557.         labeled "Home",  "PgUp",  "PgDn", "Ins", and "Del".  Hit any key, 
  558.         and we'll try "Ins" and "Del" first.   Position your cursor to  a 
  559.         mid  point  of a string,  and hit the "Del" key.   As  you  would 
  560.         expect,  a single character was deleted,  while the right side of 
  561.         the  line  was shifted left -- blank inserted at the  right  end.  
  562.         Now tap the "Ins" key.   The "In" flag appears on the prompt line 
  563.         to  warn you that you're in "insert mode",  and data entered will 
  564.         be "inserted" into the line at the cursor.  The right side of the 
  565.         line if shifted right to make room.   Characters shifted off  the 
  566.         end of the line went into the "bit bucket", and are lost.  Delete 
  567.         works  each  time you depress the key.   Insert "toggles" a  mode 
  568.         switch,  and you remain in insert mode until the next  depression 
  569.         of the "Ins" key.
  570.  
  571.              That  was about what you would have expected,  but the  next 
  572.         gets a bit more "tricky".   Move your cursor to the bottom screen 
  573.         line (line above the prompt line),  and enter a data string.   Do 
  574.         the  same thing with the top line.   Now depress the "PgUp"  key.  
  575.         Three  things happened.   First,  an "up arrow" appeared  on  the 
  576.         prompt  line,  indicating  that you're "shifted".   The top  line 
  577.         disappeared from the display,  and all lower lines were moved  up 
  578.         one.   Finally,  the  bottom line showed up blank.   Move back to 
  579.         that bottom line (blank), and key in another string.  Now hit the 
  580.         "PgDn" key.   Your original top line reappears,  the new  "bottom 
  581.         line" disappeared, and the old bottom line shifted down to become 
  582.         the  current  bottom  line.   What's all this?   Not  that  much.  
  583.         Remember,  I  told  you that you could use all 25  lines  of  the 
  584.         display, even though SDA used one for the prompt line?  Well this 
  585.         is  the  mechanism that lets you do  that.   Normally,  the  edit 
  586.         screen  is displaying the first 24 lines of the completed screen.  
  587.  
  588.  
  589.         Basic Operation                 9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.         Screen Design Aid - Version 3.0
  596.  
  597.  
  598.         When "shifted",  it displays lines 2 through 25 (1 through 24  if 
  599.         you start with zero).   All 25 lines are "remembered" and will be 
  600.         in your completed screen,  however.  This shift function lets you 
  601.         use  that  bottom  line just as you would any other line  on  the 
  602.         display.  
  603.  
  604.              Of the last group of keys we noted, we've still got one left 
  605.         -- "Home".   This  one is not appropriately  labeled,  so  you're 
  606.         memory will have to serve.  To see it most effectively, do the F8 
  607.         bit, and then key a single word at the left margin of the screen.  
  608.         With  the cursor still on the line containing the word,  hit  the 
  609.         "Home" key.   Centered!   That's all it does.   Specifically,  it 
  610.         will  center the string defined by the left most non-blank to the 
  611.         right   most  non-blank  characters.    I'm  tired  of   counting 
  612.         characters  and  computing the leading  blanks,  and  this  works 
  613.         nicely.
  614.  
  615.              The  F7 key will be discussed in the section on "Color",  so 
  616.         just ignore it now.
  617.          
  618.              OK,  that's  all...  but two of the keys defined on the help 
  619.         screen.   Where  are  the "graphics"?   That's  those  keys,  but 
  620.         they're  at least two topics themselves.   If you glance  at  the 
  621.         help  screen,  you'll see that F1 is defined to "toggle" graphics 
  622.         mode, while F2 is defined to "assign graphic characters".  Before 
  623.         we can use graphics,  we'll have to "assign" some,  so let's talk 
  624.         about F2 first.  
  625.  
  626.              This  is  the  function  that  gets  around  the  apparently 
  627.         unsolvable  problem of having less than half as many keys  as  we 
  628.         have  characters  to play with.   Poke F2 and let's see  what  we 
  629.         have...    Ugh,  what a mess.  That's every displayable character 
  630.         available  on  the machine,  with the exception of the  "standard 
  631.         data" characters we've been using.   To keep from getting  bogged 
  632.         down in mechanics,  let's do this quickly.   The cursor is in the 
  633.         upper left corner, and the "happy face" graphic character at that 
  634.         position  is "high lighted".   Depress any "data" key (preferably 
  635.         one you can remember for a few minutes,  like "A" or  "a").   The 
  636.         character you depressed will appear in the list on the right side 
  637.         of  the screen,  together with an equals symbol,  and the  "happy 
  638.         face".   You've  just  "assigned" the "happy face" to  that  key.  
  639.         Using  the numeric pad arrow keys,  move the cursor  around,  and 
  640.         note how the graphic characters are high lighted showing which is 
  641.         active  (you  have the cursor too,  just as a  double  visibility 
  642.         aid).   You may "assign" up to 19 graphic characters.   You  need 
  643.         more?   You'll never remember which is which...  but OK.  You may 
  644.         "reassign" as you desire.   If you select the same data character 
  645.         as you have selected previously, you'll see a "prompt" which says 
  646.         "Reassign?".  An "N" will cancel the assignment, while a "Y" will 
  647.         cause  the  prior assignment to be replaced by your  current  re-
  648.         quest.  I'd suggest you only assign a few keys this time, and try 
  649.         to  remember which is which.   When you've assigned all that  you 
  650.         wish to, hit the "Esc" key and you're back to your edit screen.
  651.  
  652.  
  653.  
  654.  
  655.         Basic Operation                 10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.         Screen Design Aid - Version 3.0
  662.  
  663.  
  664.              Two  points to remember.   If you use up the 19  slots,  you 
  665.         "must" reassign, if you wish other graphics.  There is no "clear" 
  666.         function for graphic assignments, other than bringing the utility 
  667.         down and starting all over.   On the other hand,  the assignments 
  668.         you've  made are "remembered" from screen to  screen,  throughout 
  669.         the session.  Second, above all, remember the "Esc" to get out of 
  670.         the assignment phase.   Nothing else will take you out,  short of 
  671.         Ctrl-Break,  which takes you completely out of the utility,  with 
  672.         the loss of what ever you were working on.  
  673.  
  674.              So  now  we've  assigned some keys.   I hope you  used  "a".  
  675.         Let's enter that character a few times.   Gee,  it still displays 
  676.         as "a".   Hit F1,  and enter some more "a's".   Now you're seeing 
  677.         your  "happy face".   You also noted a change in the prompt  line 
  678.         which now displays "Gr" for graphics mode.  Hit F1 again, and the 
  679.         prompt  will disappear,  and your "a" key is now again  producing 
  680.         "a's".  
  681.  
  682.              And that really is it.   You've covered all of the functions 
  683.         of  the edit phase!   We're not done,  of course,  but you've got 
  684.         enough  now to define a "pretty" screen.   I'd suggest  you  play 
  685.         with  the  edit  phase for a little while,  and then  clear  your 
  686.         screen  and try to define a screen that might have  applicability 
  687.         to some application or another.  Leave room for some "fields" for 
  688.         input and/or output.   Put on headings, etc., and if you want the 
  689.         field  to  have an "initial display" fill in the  initial  value.  
  690.         When you've completed that exercise, proceed to the next section.
  691.  
  692.  
  693.  
  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.         Basic Operation                 11
  722.  
  723.  
  724.  
  725.  
  726.  
  727.         Screen Design Aid - Version 3.0
  728.  
  729.  
  730.         ESAVING A SCREENF
  731.  
  732.              We'll assume you're still in "edit" phase,  and the  current 
  733.         screen is displayed.  Depress the F10 key, and return to the main 
  734.         menu.   Function  3  permits saving the screen you just  created.  
  735.         Depressing  that key will reward you with a prompt screen  and  a 
  736.         request for a file name.   
  737.  
  738.              I'll  assume  you're familiar with DOS file names,  and  DOS 
  739.         file  name  conventions.    Your  response  to  the  prompt   may 
  740.         (optional) include a drive specifier (ie:  B:),  and must include 
  741.         the  "name"  portion of a file name.   It should NOT include  the 
  742.         "type".   If it does, the type will be ignored.  Entering a name, 
  743.         and depressing the "enter" key will result in some disk  activity 
  744.         and then,  normally,  a return to the main menu.  If you happened 
  745.         to  pick  a  name that already exists on the drive  you  selected 
  746.         (default or specification), you'll get another prompt which warns 
  747.         you that this case exists,  and asks permission to proceed.   You 
  748.         can respond "Y",  in which case the old file is deleted,  or "N", 
  749.         which  will  put back to the original prompt,  and  you  can  try 
  750.         another  name.   "Esc" takes you totally out of the "save"  mode, 
  751.         and back to the main menu.  
  752.  
  753.              Having made it back to the main menu,  try choice 8!  Yes, I 
  754.         know that takes you out of SDA, but there's madness in my method, 
  755.         or  some  such stuff.   Note that you'll get the usual  "Are  you 
  756.         sure?"  prompt,  to keep from accidentally exiting and  losing  a 
  757.         file you've worked awhile on.   This time, tell it "Y", and we'll 
  758.         go back to DOS.  Enter the DOS command for the drive you've saved 
  759.         to:
  760.  
  761.                   DIR [drive:] savename.*
  762.  
  763.         You  should see two files listed,  one with the type .IMG and the 
  764.         other with the type .INC.   Note the size of the .IMG file.  This 
  765.         is the amount of memory your screen will take when included in an 
  766.         application.   If you didn't "fill" the screen with garbage,  I'm 
  767.         sure  you'll  find the size is substantially less than  the  4000 
  768.         bytes  required to store a screen image.   This file is a  binary 
  769.         file,  and is not directly "viewable".   It is, incidentally, the 
  770.         file the SDA will work with if we do any additional work on  this 
  771.         screen.  
  772.  
  773.              The  .INC  file,  on  the other hand,  may be  displayed  by 
  774.         entering the TYPE command:
  775.  
  776.                   TYPE  [drive:]savename.INC
  777.  
  778.         What  you're seeing going whipping by is a set of data  constants 
  779.         in a source format acceptable to the Assembler.   We'll talk more 
  780.         about  this form in the section discussing interface to  applica-
  781.         tions.   Another  section discusses the content of these files in 
  782.         some detail, but we'll wait for that section.
  783.  
  784.  
  785.  
  786.  
  787.         Saving a Screen                 12
  788.  
  789.  
  790.  
  791.  
  792.  
  793.         Screen Design Aid - Version 3.0
  794.  
  795.  
  796.              This exercise was simply to demonstrate that when you "save" 
  797.         a screen,  you're creating two files, both of which have use, and 
  798.         to demonstrate that a significant compression occurs.   One point 
  799.         to  remember.   With the .IMG file,  we can always re-create  the 
  800.         ???.INC file,  but the reverse is NOT true.  The .IMG file is the 
  801.         one SDA works with, while the .INC file is a "spin off" for other 
  802.         purposes.  
  803.  
  804.              Now,  fire  up SDA again,  and we'll continue with the  next 
  805.         section.
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  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.         Saving a Screen                 13
  854.  
  855.  
  856.  
  857.  
  858.  
  859.         Screen Design Aid - Version 3.0
  860.  
  861.  
  862.         ELOADING AN EXISTING SCREENF
  863.  
  864.              Assuming we're at the main menu,  glance at option 2.   That 
  865.         seems to be the one we're ready for,  so enter a 2.  Up comes the 
  866.         usual  prompt  menu,  this time asking for the name of  the  file 
  867.         containing  the  screen to edit.   Enter the name you saved  your 
  868.         screen under.   Just as in saving the screen, the drive specifier 
  869.         is optional,  and the type is ignored.   The utility will load  a 
  870.         file  of the name you provided,  with a type of  .IMG.   Assuming 
  871.         nothing "glitched",  there will be some brief disk activity,  and 
  872.         then  you'll flash back to the main menu.   In the event you made 
  873.         an  error on the name,  a "not found" prompt will appear and  you 
  874.         can try again.   As in save,  the "Esc" will take you back to the 
  875.         main menu without executing the load function.  
  876.  
  877.              Now,  enter a "1",  and confirm that your screen is back  on 
  878.         display.   You  could  make "corrections" or extensions  at  this 
  879.         point,  if  needed,  and then save the screen again.   This time, 
  880.         we're just demonstrating that what you had,  you still have.  Hit 
  881.         F10,  and we'll go back to the main menu.   We're about ready for 
  882.         option "4" -- field definition or maintenance,  so let's  proceed 
  883.         to the next section.
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.         Loading An Existing Screen      14 
  920.  
  921.  
  922.  
  923.  
  924.  
  925.         Screen Design Aid - Version 3.0
  926.  
  927.  
  928.         EFIELD DEFINITION/MAINTENANCEF
  929.  
  930.              From the main menu, enter "4", and you'll be rewarded by yet 
  931.         another screen.  This one has a blank column on the left and some 
  932.         text  on  the right.   The text will be repeated and expanded  in 
  933.         this section,  so you don't have to read it now.  Note that there 
  934.         are  a  "list" of active function keys shown in the body  of  the 
  935.         text.
  936.  
  937.              Before getting into the "mechanics" of definition of fields, 
  938.         let's talk first about what is a field, and what use are they?
  939.  
  940.              First,  a  field  is  any  contiguous  string  of  character 
  941.         positions,  all  of which must be within the same  display  line.  
  942.         The content of the positions does not effect this definition.
  943.  
  944.              Second,  under  SDA,  a field may have its own "attributes", 
  945.         which may differ from that assigned in the original definition of 
  946.         the screen itself.   For example, lets assume that row 2, columns 
  947.         10  to  20  on the screen contain the first  20  letters  of  the 
  948.         alphabet,  normal attribute.   We could define a field containing 
  949.         any  or  all  of  those  characters,   or  extending  beyond  the 
  950.         characters,  and  the  field could be given the "high  intensity" 
  951.         attribute.  Gee isn't that nice... so what?        
  952.  
  953.              Well,  when the screen is displayed the 20 letters would  be 
  954.         displayed  at normal intensity,  however the first I/O  operation 
  955.         against  that  field  would cause the result of that  I/O  to  be 
  956.         displayed  at high intensity!   Works nice when you want to  high 
  957.         light a user's response against the "static" screen body.  
  958.  
  959.              This  is  probably  a great place to talk about  this  vague 
  960.         thing called I/O.   As you read in the introduction,  we  provide 
  961.         support for:  output to a field,  input from a field,  a combined 
  962.         output followed by input,  the clear of a field,  and the ability 
  963.         to  position  the cursor to a field.   Let's take them one  at  a 
  964.         time,  and in a bit more detail.  Don't worry about how we invoke 
  965.         the function,  yet.   This is what the function does, when you do 
  966.         invoke it.  
  967.  
  968.         EOutput to a fieldF -
  969.  
  970.              This  function permits output of a character string  to  the 
  971.         specified field.  The attributes of the displayed literal will be 
  972.         the attbributes of the field.   The string may be terminated by a 
  973.         null.  Output of the string will continue until one of two condi-
  974.         tions  is met.   Either the "end of string" (nul) is  encountered 
  975.         before  the  end  of field,  or the end of field  is  encountered 
  976.         first.   In the former case, the balance of the field will be set 
  977.         to blank,  with the attributes of the field.   In either case the 
  978.         cursor  will be positioned to the "end of  field"  position,  and 
  979.         remains there on return to the caller.
  980.  
  981.  
  982.  
  983.  
  984.  
  985.         Field Definition/Maintenance    15
  986.  
  987.  
  988.  
  989.  
  990.  
  991.         Screen Design Aid - Version 3.0
  992.  
  993.  
  994.         EInput from a fieldF -
  995.  
  996.              Similar to output,  this service will position the cursor to 
  997.         the  start of a defined field,  and wait for input.   As input is 
  998.         keyed  to the field,  it will be displayed,  with  the  attribute 
  999.         assigned  to  the field.   Since this function returns the  input 
  1000.         string to a user defined  buffer, it is the user's responsibility 
  1001.         to  assure  that the buffer is at least as long  as  the  defined 
  1002.         field.   The  input operation is terminated by any of the follow-
  1003.         ing:  "enter" key, "Esc" key, "Tab right", "Tab left".  Feed back 
  1004.         information is provided in the return to indicate which  termina-
  1005.         tor occured,  and to provide the length of the valid string (zero 
  1006.         is valid).  The input operation will NOT be terminated by exceed-
  1007.         ing  the field length.   Rather if such an attempt is  made,  the 
  1008.         "beep"  signal from the console will be invoked,  and the current 
  1009.         data character not accepted.  Only a terminator or a backspace is 
  1010.         acceptable at end of field.  The backspace may be used to correct 
  1011.         keying errors.
  1012.  
  1013.              This  function includes one additional  option.   The  input 
  1014.         operation   may  be  "destructive"  or   "non-destructive".    In 
  1015.         "destruct" mode, initiation of the input operation will clear the 
  1016.         defined  field  to blanks with the  appropriate  attribute.   The 
  1017.         "non" mode leaves the existing display unchanged, except for data 
  1018.         keyed  in  by the user.   This permits display of  the  "default" 
  1019.         value for a field.   Note that this "default" must be established 
  1020.         by  software,  since  if the user makes an  immediate  terminator 
  1021.         response (no data entry),  the feed back will provide a length of 
  1022.         zero, and an indication of the terminator used.  
  1023.  
  1024.         EOut/In functionF -
  1025.  
  1026.              This  is  simply  a  single  call  combining  the  functions 
  1027.         described in the previous paragraphs.  It is useful when you wish 
  1028.         to  display  "existing"  data and  allow  overwrite.   The  Input 
  1029.         portion  of  this  operation is always in  the  "non-destructive" 
  1030.         mode.
  1031.  
  1032.         EField clearF -
  1033.  
  1034.              Clears  the  defined  field to  blanks  with  the  attribute 
  1035.         defined for the field.  Cursor is left at START of field.
  1036.  
  1037.         EPosition CursorF - 
  1038.  
  1039.              Positions  cursor  to  START of a  defined  field.   Current 
  1040.         display is not changed, nor is field content.  
  1041.  
  1042.         Having learned what you can do with fields, now we're in a better 
  1043.         position  to define some.   Refer back to the screen.   The  keys 
  1044.         displayed  as  "active"  are  also covered on  a  "help"  screen.  
  1045.         Depressing F9 will display that screen,  and as before, returning 
  1046.         to the field maintenance screen from "help" is simply the  matter 
  1047.         of depressing any key.
  1048.  
  1049.  
  1050.  
  1051.         Field Definition/Maintenance    16
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.         Screen Design Aid - Version 3.0
  1058.  
  1059.  
  1060.              Key  assignments  are  as  consistent  as  possible  between 
  1061.         functions.  You'll note that F9 is still "help", F8 is clear (the 
  1062.         field table ONLY, this time), and F10 returns to the main menu.
  1063.         Keys F5 through F7 are not used at this point in this phase.   To 
  1064.         better  demonstrate the remaining keys,  press F3 (Add to end  of 
  1065.         field list) and watch your current screen appear.
  1066.  
  1067.              This  is  not the "edit" screen,  although it has  the  same 
  1068.         appearance.   We'll come back to the various options available on 
  1069.         this  screen,  but for right now,  simply move the cursor to  the 
  1070.         start of a likely field and depress F1.  Note that an "*" appears 
  1071.         on  the prompt line.   This is a flag to indicate you're half way 
  1072.         through the process of defining a field.   Now move the cursor to 
  1073.         the other end of the field, and again depress F1. 
  1074.  
  1075.              Flash!  Back to the original field maintenance  screen,  but 
  1076.         now  you'll  see one entry in the previously blank column on  the 
  1077.         left.   As the column headings indicate, the data displayed (from 
  1078.         left to right), is the field number, row (0-24), column (0-screen 
  1079.         width), length, and attributes of the field.  
  1080.  
  1081.              To  give  us something to work with,  press  F3  and  define 
  1082.         another field, repeating the above process.  Do this two or three 
  1083.         times,  until you have defined three or four fields,  ending with 
  1084.         the  field table display.   As you go through this process you'll 
  1085.         note  that  the list of fields continues to  extend  towards  the 
  1086.         bottom  of the display.   You'll also note that the last entry in 
  1087.         the  list is high lighted.   You've also noticed some changes  on 
  1088.         the field definition screen,  but we'll delay discussion of those 
  1089.         for a few moments.  
  1090.  
  1091.              Two of the numeric keypad arrow keys are active.  The up and 
  1092.         down  arrows  (only).   Try pressing the "up"  arrow.   The  high 
  1093.         lighted entry moved "up" the list.  The down arrow moves the high 
  1094.         lighted  entry  down,  of course.   The indicated  entry  is  the 
  1095.         currently "active" entry.  Note the content of the list, position 
  1096.         the  active  entry somewhere in the list (not at  the  end),  and 
  1097.         depress  F1 (insert field before active entry).   You'll get back 
  1098.         to  the definition screen,  so use F1 twice (this time to  define 
  1099.         another  field),  and  when you return to the active  field  list 
  1100.         you'll find that the field you just defined has been inserted  in 
  1101.         the list immediately before the field you selected.
  1102.  
  1103.              Depressing F2 will delete the currently active field,  while 
  1104.         F4  allows you to redefine it.   As we mentioned  previously,  F8 
  1105.         will  clear  the  entire field table (complete with an  "are  you 
  1106.         sure" prompt), while F10 will return you to the main menu, and is 
  1107.         used  after you have completed field  definition.   Incidentally, 
  1108.         you may enter field definition,  define a few fields,  return  to 
  1109.         the  edit  phase,  modify the screen,  and then return  to  field 
  1110.         defintion  to  find your original definitions as you  left  them.  
  1111.         Note  that  if the change in the edited screen throws your fields 
  1112.         out of alinement,  its your problem to fix them.   There's no tie 
  1113.         back   between  the  edit  screen  phase  and  the  field   table 
  1114.         maintenance phase.  
  1115.  
  1116.  
  1117.         Field Definition/Maintenance    17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.         Screen Design Aid - Version 3.0
  1124.  
  1125.  
  1126.  
  1127.              Two points,  before we discuss the field definition  screen.  
  1128.         The  number of fields that may be defined for a screen may be any 
  1129.         number between zero (valid),  and 100.   As you exceed the number 
  1130.         of fields that can be displayed (20),  the list simply grows  off 
  1131.         the  top or bottom of the screen.   If you're positioned at field 
  1132.         30  and  want to see field 3,  simply move the  currently  active 
  1133.         field to the top of the displayed list (using the up arrow),  and 
  1134.         continue  to depress the up arrow.   You'll see the  list  scroll 
  1135.         down until field 1 is displayed.  Similarily, if the field is off 
  1136.         the display "at the bottom", use the down arrow until you see the 
  1137.         field you've selected.  
  1138.  
  1139.              Now on to the field definition screen.   Again, there's a F9 
  1140.         "help"  screen.   If you use one of the field definition keys (F1 
  1141.         F3 or F4) to get back to the definition screen,  you can bring up 
  1142.         the "help" screen, and follow it through this brief discussion.  
  1143.  
  1144.              At first glance, this "help" menu appears almost the same as 
  1145.         the  edit  "help" screen,  but closer examination  will  indicate 
  1146.         differences.   F1  is  now the "define field"  key  (rather  than 
  1147.         toggle  graphics mode,  which isn't applicable now).   F2 is  not 
  1148.         active.   F3  through F7 have the same functions as they did  for 
  1149.         edit,  but F8 is not active.   F9 is still the "help" key,  while 
  1150.         F10   simply  returns  you  to  the  maintenance  screen  without 
  1151.         definition of a field.   "Home" is not active,  nor are "Del"  or 
  1152.         "Ins".   "PgUp" and "PgDn" are,  and allow shifting the screen as 
  1153.         in  edit,  when you wish to define a field on the bottom line  of 
  1154.         the  screen.   The cursor positioning keys work the same as edit, 
  1155.         of course.   Not much "new" here,  so hit any key to get back  to 
  1156.         the definition screen.
  1157.  
  1158.              Since you've defined several fields, you'll notice the "half 
  1159.         tone"  areas demarking the location of the fields.   These  areas 
  1160.         have  "clobbered" any data you might have included in the  screen 
  1161.         at that point.   Not to worry...  the data is still there, but we 
  1162.         need to show two things in the same space and the display devices 
  1163.         won't  cooperate  to that extent.   A "standard" practice  is  to 
  1164.         enter the "default" value on the original screen, and then define 
  1165.         a field over the top of it.   By using the input function in non-
  1166.         destructive  mode,  you can display the default,  but permit  the 
  1167.         user to key over the top when he wants to change the default.  
  1168.  
  1169.              As  we've said several times,  the field has an attribute of 
  1170.         its  own.   You'll see it show up in the field table,  and  there 
  1171.         will  be  some  change in the "half tone" display  when  you  use 
  1172.         different attributes.  Try defining a field with "high intensity" 
  1173.         for an example.  
  1174.  
  1175.              That's   all  for  field  definition.    I've   deliberately 
  1176.         "skipped" any discussion of F7 in field definition  phase,  since 
  1177.         that's  only  used  under  "Color" mode and  is  discussed  in  a 
  1178.         separate section.   When you've experimented as much as you like, 
  1179.         return to the main menu (F10).
  1180.  
  1181.  
  1182.  
  1183.         Field Definition/Maintenance    18
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.         Screen Design Aid - Version 3.0
  1190.  
  1191.  
  1192.         EPRINTING SCREENSF
  1193.  
  1194.              This  time,  don't  start poking keys till you've read  this 
  1195.         paragraph.   If  you  do not have the EPSON MX80  with  GRAFTRAX 
  1196.         plus,  or a "bit level" equivalent device,  the only reason  for 
  1197.         reading  this  section  is to learn what  you're  missing!   This 
  1198.         function will only work using such a device.   You're welcome  to 
  1199.         try  it on your printer,  but I'll tell you now that the  results 
  1200.         will not be usable.
  1201.  
  1202.              For  those  with the "goodies" options,  this  section  will 
  1203.         continue.   Assuming  you've left the screen you created  in  the 
  1204.         utility (if not,  you can reload it using the 2 option),  depress 
  1205.         the  5  key and hit "enter".   You'll be rewarded by yet  another 
  1206.         menu,  which asks for a "caption".   Key in any string (up to  40 
  1207.         characters)  you  might like to use as a caption for the  screen.  
  1208.         If  you  don't want a caption,  try keying one  blank,  and  then 
  1209.         "enter".   No data at all will behave similar to the "Esc", which 
  1210.         will "take you out" with out printing the screen.
  1211.  
  1212.              So  the  printer  "fires  up" and  you  start  printing  the 
  1213.         screen...  very  slowly!   If you become fascinated with  printer 
  1214.         head  motion,  and watch it,  you'll notice that it behaves in  a 
  1215.         very  unusual manner.   Sweeps part  way,  hesitates,  backs  up, 
  1216.         resweeps,  etc.,  etc.  Don't worry about it, since that's normal 
  1217.         behavior  when printing a mix of "dot graphics" and  text.   This 
  1218.         whole behavior pattern (together with the low speed) is caused by 
  1219.         the  requirement  to  print characters the printer  doesn't  have 
  1220.         "built in".   Under this utility,  however,  the printer can  and 
  1221.         will  print any character you've included on your display  screen 
  1222.         (or at least a reasonable facsimile, thereof).      
  1223.  
  1224.              When  the  screen finally completes,  your caption  will  be 
  1225.         added,  centered  in  the  second line below  the  screen.   That 
  1226.         completes  the  "functioning" of this  option,  however  for  the 
  1227.         "mechanics" of this operation, we'll include a few other words.
  1228.  
  1229.              Paper  alignment  (prior to starting the utility) should  be 
  1230.         with  the  perfs positioned at the top of  the  bail.   Sorry  if 
  1231.         you've  adopted a different "standard" position.   Seems to be at 
  1232.         least  two  used in practice.   Printing is  done  in  compressed 
  1233.         print,  eight lines/inch.  This gives something that approximates 
  1234.         screen  representation.   Don't worry about your printer  control 
  1235.         load, however.  The utility restores the printer to normal print, 
  1236.         six lines/inch when it ends.  Similarily, it keeps track of forms 
  1237.         position,  and will restore to top of form when the utility ends, 
  1238.         so DON'T REPOSITION THE PAPER after printing a screen.  
  1239.  
  1240.              The  format  is such that two screens will be printed  on  a 
  1241.         single  11"  sheet,  or if you use the next option  (print  field 
  1242.         table), a screen and its field table will usually be printed on a 
  1243.         single sheet (if you have less than 75 fields, that is).  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.         Printing Screns                 19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.         Screen Design Aid - Version 3.0
  1256.  
  1257.  
  1258.         EPRINT FIELD TABLEF
  1259.  
  1260.              Option  6  permits  printing the field  table.   This  one's 
  1261.         requirements are not as stringent,  and will work on any  printer 
  1262.         capable  of handling 132 column print.   Again,  its designed for 
  1263.         the EPSON,  and you could find some "funny" characters showing up 
  1264.         at the start of print on other printers.   Again, the first thing 
  1265.         you  see is a menu requesting a "caption".   "Esc" will take  you 
  1266.         out without printing,  while a "caption" of any string (at  least 
  1267.         one character, which may be blank) of up to 40 characters will be 
  1268.         accepted.  
  1269.  
  1270.              A print out of the current field table results.   The format 
  1271.         is a three column layout, with headers.  The only thing "cryptic" 
  1272.         is  the last columns of the attributes,  which contain "F:xxxxxx" 
  1273.         and "B:xxxxxx".   These are "colors" and become meaningful in the 
  1274.         section  discussing  "Color".   When print  is  complete,  you're 
  1275.         returned to the main menu.   If you're using this option but  not 
  1276.         the screen print, better read the screen print option for details 
  1277.         of paper handling, alignment, etc.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  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.         Print Field Table               20
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.         Screen Design Aid - Version 3.0
  1322.  
  1323.  
  1324.         ECHANGING DISPLAY DEVICEF
  1325.  
  1326.              Two groups of users will be interested in this section.  For 
  1327.         those afluent types that have both the Monochrome Display and the 
  1328.         Color/Graphics  board,   read  on.    For  those  with  only  the 
  1329.         color/graphics board, and a monitor that will operate effectively 
  1330.         in either 80 or 40 character line width,  read on.   For the user 
  1331.         who  has  only  the Monochrome display,  or who does not  have  a 
  1332.         monitor  that will work in 80 character mode,  you might as  well 
  1333.         skip  this section.   But since you won't,  you can read and  see 
  1334.         what you're missing.  
  1335.  
  1336.              WARNING:   ANY "CURRENT" SCREEN AND FIELD TABLE WILL BE LOST 
  1337.         WHEN THIS FUNCTION IS INVOKED.   IF YOU HAVE A SCREEN AND WANT TO 
  1338.         KEEP IT, DO A "SAVE" BEFORE USING THIS FACILITY.
  1339.  
  1340.              Before poking keys,  be sure your hardware configuration  is 
  1341.         "ready".   For example,  if you're running on the monochrome, but 
  1342.         have the color graphics adapter and a monitor driven by it,  turn 
  1343.         the  monitor on.   Now,  enter "7",  and on your current  display 
  1344.         device  you'll see yet another menu.   This one says what  device 
  1345.         you're  currently on (Monochrome or Color/graphics),  and asks if 
  1346.         you want to switch.   A "y" response is called for,  so enter it, 
  1347.         and  then  look at the next response.   This one says  what  your 
  1348.         current  line  width is,  and asks if you want to change  to  the 
  1349.         other supported length (80-40).   Make the appropriate  response, 
  1350.         and  the  display  will be refreshed with the  configuration  you 
  1351.         requested, but you'll still be asked to confirm by responding "Y" 
  1352.         to the last prompt.   When you give this last "Y", you'll see the 
  1353.         display  switch to the other display monitor (if you  have  two), 
  1354.         and/or the line width change to the requested width.   And you'll 
  1355.         be back to the main menu.
  1356.  
  1357.              I won't include it here, but you'll be interested in reading 
  1358.         the  section on "40 Character screens on 80  character  terminals 
  1359.         and Visa Versa" included later in this document.
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.         Changing Display Device         21
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.         Screen Design Aid - Version 3.0
  1388.  
  1389.  
  1390.         ECOLORF
  1391.  
  1392.              If  you have the Color/graphics display board,  and a  color 
  1393.         display,  this section will interest you.   Before getting in  to 
  1394.         the  discussion,  a couple of "disclaimers".   First,  the  color 
  1395.         names used are those in the "book".   I've already found that the 
  1396.         actual  color  displayed varies widely with the type  of  display 
  1397.         device.  The only "solution" is "try it and see", and then do the 
  1398.         mental  conversion  necessary to match the color names  with  the 
  1399.         color shown on the display.   Second,  unless you have a true RGB 
  1400.         monitor,  using 80 character line width is likely to be a joke -- 
  1401.         but  not too funny.   Readability is likely to be totally lost on 
  1402.         most composite monitors.  
  1403.  
  1404.              Its probably a good place to mention that assigning  "color" 
  1405.         to  the  attribute  typically has "no effect" on  the  Monochrome 
  1406.         display.   The  one  exception is  that  requesting  "underscore" 
  1407.         attribute or the color "blue" has the same effect.  
  1408.  
  1409.              With that introduction, get to the "edit" screen (option "1" 
  1410.         on  the main menu),  and depress F7.   This will produce  another 
  1411.         menu which simply asks for the "foreground" color you wish to use 
  1412.         at this point in time.   Entering the initial letter of the color 
  1413.         (X  for  black)  and depressing the "enter" key  will  cause  the 
  1414.         display  to change to a request for the "background"  color.   In 
  1415.         either  case,  an  "enter" without data simply leaves  the  color 
  1416.         currently assigned,  still in effect.  After your response to the 
  1417.         "background" prompt, you'll be returned to the "edit" screen.  
  1418.  
  1419.              Assuming you're on a color display, you can play around with 
  1420.         various  combinations.   The color can be changed for  each  data 
  1421.         character  entry,  if  you like rainbows,  or it can be  left  in 
  1422.         effect  for  the entire screen.   The attribute  assignment  keys 
  1423.         still  work as they did,  with two exceptions.   Underscore  will 
  1424.         force  a  foreground  color of "Blue",  and will not  produce  an 
  1425.         underscore.  Normal/Reverse Video now has the effect of "swaping" 
  1426.         the foreground and background colors.  
  1427.  
  1428.              This  key  has  a similar use  in  field  definition  phase, 
  1429.         permiting  assignment  of "color" to field attributes  associated 
  1430.         with  the  defined  fields of the display.   Its  use  should  be 
  1431.         obvious, so we'll wave at a detailed review of the screen.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.         Color                           22 
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.         Screen Design Aid - Version 3.0
  1454.  
  1455.  
  1456.         E40 CHARACTER SCREENS TO 80 CHARACTER DISPLAYS
  1457.         E(AND VISA VERSA)F
  1458.  
  1459.              This topic gets a bit complicated.   If you normally operate 
  1460.         using a single display width, you can safely ignore this section.  
  1461.         On the other hand,  if you want your application to be capable of 
  1462.         running on most configurations, you'll probably need this data.
  1463.  
  1464.              First, screens are "saved" in either 40 or 80 character line 
  1465.         width.   The mode of the "save" is determined totally by the mode 
  1466.         you're running in at the time of the "save".  If you're operating 
  1467.         on  an 80 character display,  you can't save in 40 width and visa 
  1468.         versa.   So  to  control the width of "saved"  screen,  you  must 
  1469.         control the width of the mode you're operating under.  
  1470.  
  1471.              Second, the display generation code (used in the utility and 
  1472.         included for your use with applications) will attempt to  display 
  1473.         a  screen  irregardless of the mode of the display its  outputing 
  1474.         to.   It  does this by either expanding or truncating the  screen 
  1475.         when  the  screen  mode doesn't  match  the  display  mode.   For 
  1476.         example,  if you're trying to display a 40 character screen on an 
  1477.         80 character terminal,  it simply "centers" the image,  providing 
  1478.         20 blanks of padding on either side of the image.  
  1479.  
  1480.              Displaying  an 80 character screen on a 40 character display 
  1481.         is  not  as satisfactory.   The only thing the display  code  can 
  1482.         rationally do is to truncate the image,  and that's what it does.  
  1483.         It  displays  the first 40 columns of  each  line,  dropping  the 
  1484.         remainder.
  1485.  
  1486.              What's the effect of all this?  Assuming you wish to use the 
  1487.         screens  on any device,  your preferred mode of operation will be 
  1488.         in 40 character line mode.   Do the edit, field assignment, etc., 
  1489.         and  then  "save".   The resultant screen can be used  on  either 
  1490.         Monochrome  or  color/graphics adapters,  and will be  usable  in 
  1491.         either  40  or  80  character  line  mode.    It  also,   not too 
  1492.         incidentally,  will make a smaller compressed image,  so it saves 
  1493.         both disk and memory space.
  1494.  
  1495.              If you have to work on an 80 character device,  then its all 
  1496.         up to you.   If you build your screen in the first 40 columns  of 
  1497.         the  edit  screen (and stay totally within those  columns),  then 
  1498.         when  that screen is saved,  it can be displayed on a  40  column 
  1499.         device, since the 40 unused columns will simply be discarded.  It 
  1500.         includes the penalty of a slightly larger "compressed" image than 
  1501.         that described for the same screen in 40 column mode.
  1502.  
  1503.              This  utility is a good example of the 40 column mode.   All 
  1504.         of the screens used were formed under that option,  and therefore 
  1505.         may  be displayed on either 40 or 80 column  devices,  in  either 
  1506.         color  or black and white.   I won't claim the "art work" is good 
  1507.         nor will I boast about the choice of colors...  I'm a hacker, not 
  1508.         a painter... but it does demonstrate the flexibility of SDA. 
  1509.  
  1510.  
  1511.  
  1512.  
  1513.         Line Lengths                    23
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.         Screen Design Aid - Version 3.0
  1520.  
  1521.  
  1522.         EAPPLICATION INTERFACEF  
  1523.  
  1524.              Use  of  screens  produced by SDA may be  made  by  Assembly 
  1525.         Language  programs.   The  next section discusses "bridges"  that 
  1526.         permit  use  of the screens by "high  level"  languages.   It  is 
  1527.         suggested  that even if your interest is "high level",  that  you 
  1528.         read this section.   It contains information you will need if you 
  1529.         attempt to "bridge" to a language other than BASIC.
  1530.  
  1531.              Assembly  usage is very easy.   Just use the macros provided 
  1532.         in the file $FIELD.MAC.  The macros are well commented, but we'll 
  1533.         cover  them,  and  the  code  sequences  generated  here,  as  an 
  1534.         introduction to the "bridges" of the next section.
  1535.  
  1536.              In all cases,  a "command code" which indicates the function 
  1537.         desired,  is provided in the AH register.   In all cases but one, 
  1538.         the  field number is given in the AL  register.   Other  register 
  1539.         usage is specified where appropriate.   In all cases the register 
  1540.         status,  with the exception of the AX register,  is preserved and 
  1541.         restored  before  return to the calling program.   In the  single 
  1542.         case that "feed back" is provided,  that data is contained in the 
  1543.         AX register.
  1544.  
  1545.              To display a screen:
  1546.  
  1547.                   $FDISP          screen-image        
  1548.  
  1549.                     or
  1550.  
  1551.                   XOR       AH,AH
  1552.                   MOV       DX,OFFSET screen-image
  1553.                   CALL      $SDA
  1554.  
  1555.              To output to a field:
  1556.  
  1557.                   $FDOUT    field-number,character string
  1558.                   
  1559.                     or
  1560.  
  1561.                   MOV       AH,1
  1562.                   MOV       AL,field-number
  1563.                   MOV       DX,OFFSET character-string
  1564.                   CALL      $SDA
  1565.  
  1566.         where  character-string  is any string terminated by a zero  byte 
  1567.         (nul).   Output  will  cause the string to be  displayed  in  the 
  1568.         output field, and the cursor left at end of field.  If the string 
  1569.         is  shorter  than  the field,  the balance of the field  will  be 
  1570.         cleared to blank.   If the string is longer than the  field,  the 
  1571.         string  will  be  truncated  to  field  length.   Note  that  the 
  1572.         attribute of the displayed data is that defined for the field.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.         Application Interface           24
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.         Screen Design Aid - Version 3.0
  1586.  
  1587.  
  1588.              To input from a field:
  1589.  
  1590.                   $FDINP    field number,buffer,[flag]
  1591.  
  1592.                      or
  1593.  
  1594.                   MOV       AH,2
  1595.                   MOV       AL,field number  or  field number+80H
  1596.                   MOV       SI,OFFSET buffer
  1597.                   CALL      $SDA
  1598.  
  1599.         where "buffer" is any work buffer for return of the input string.  
  1600.         It  is YOUR responsibility that the buffer is at least as long as 
  1601.         the  defined  field.   The "flag" in the macro is  any  non-blank 
  1602.         string,  which will cause the expansion to "add 80H" to the value 
  1603.         in  AL.   This  "+80H" indicates that a  "non-destructive"  input 
  1604.         operation is desired.  Input may be either "destructive" or "non-
  1605.         destructive".  Destructive clears the field to be blanks with the 
  1606.         field's attributes,  while "non-destructive" simply positions the 
  1607.         cursor to the start of the field.   In either case,  input  waits 
  1608.         for  keyed  data.   If  data is entered and  the  last  character 
  1609.         position  of the field is filled,  a "beep" signal is given  when 
  1610.         any  additional character entry is attempted.   A terminator or a 
  1611.         "backspace" are the only acceptable characters when positioned at 
  1612.         end of field.  When "entry termination" is sensed, return is made 
  1613.         to the caller, with the following "feed back" information.
  1614.  
  1615.              The  input  string will be in the  "buffer"  provided.   The 
  1616.         length of the returned data will be contained in the AL  register 
  1617.         (zero length is valid), while the AH will contain data indicating 
  1618.         the type of termination that occured.  The AH contents may be:
  1619.  
  1620.                   AH = 0    Normal return ("enter" key)
  1621.                   AH = 1    Right tab
  1622.                   AH = 2    Left tab
  1623.                   AH = 4    "Esc" key
  1624.                   AH = 8    Scan code terminator
  1625.  
  1626.         In  all but the first case above,  the carry flag will be set  on 
  1627.         return.   The  scan  code  terminator is  a  special  case.   The 
  1628.         hardware  produces  two characters for special  keys.   First,  a 
  1629.         "nul"  character,  and then typically the scan code of  the  key.  
  1630.         When  this condition is sensed,  the "nul" is discarded,  and the 
  1631.         second  character  is moved to the buffer,  and the  80H  bit  is 
  1632.         turned  on in that character.   Finally the carry and the AH code 
  1633.         are set, and return is made.  
  1634.  
  1635.              You'll note that this is set up for rapid "field advance" by 
  1636.         using, and sensing, the use of the tab keys.
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.         Application Interface           25
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.         Screen Design Aid - Version 3.0
  1652.  
  1653.  
  1654.              To perform output followed by input in a single call, use:
  1655.  
  1656.                   $FDOIN    field-number,output-string,buffer
  1657.  
  1658.                     or
  1659.  
  1660.                   MOV       AH,3
  1661.                   MOV       AL,field-number+80H
  1662.                   MOV       DX,OFFSET output-string
  1663.                   MOV       SI,OFFSET buffer
  1664.                   CALL      $SDA
  1665.  
  1666.         which  is  simply  a  combination  of  the  previously  discussed 
  1667.         functions.   Feed  back  is  the same as  that  in  the  previous 
  1668.         function.   Note that "non-destructive" mode is automatic in this 
  1669.         option, when using the macro.
  1670.  
  1671.              To  clear a field,  or to position the cursor to a field are 
  1672.         almost identical:
  1673.  
  1674.                   $FDCLR    field-number  or  $FDPOS   field-number
  1675.  
  1676.                     or
  1677.  
  1678.                   MOV       AH,4 (clear)  or  MOV    AH,5  (position)
  1679.                   MOV       AL,field-number
  1680.                   CALL      $SDA
  1681.  
  1682.         These simple primitives are all that have been defined,  current-
  1683.         ly,  for  use of the screens.   They seem to be all that are  re-
  1684.         quired,  and provide the basic building blocks for management  of 
  1685.         complex screens.
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.         Application Interface           26
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.         Screen Design Aid - Version 3.0
  1718.  
  1719.  
  1720.         EHIGH LEVEL LANGUAGEF          
  1721.  
  1722.              Since essentially all high level languages support some form 
  1723.         of a "call" interface,  building a "bridge" to permit utilization 
  1724.         of  screens from high level code appears straight  forward.   The 
  1725.         program BASSCR is included with this distribution,  and is such a 
  1726.         bridge for compiled BASIC.  It performs correctly with either the 
  1727.         "run time execution library" or the "stand alone" products of the 
  1728.         compiler.   A listing of the source form of this program would be 
  1729.         helpful in following the discussion given.
  1730.  
  1731.              Interface and parameter passing is usually performed through 
  1732.         the "stack".   BASIC,  at least,  only insists that the SS and SP 
  1733.         registers  be reset to the entry value,  before returning to  the 
  1734.         calling BASIC modules.  Those two registers are saved immediately 
  1735.         on  entry.   Note  that the MOV instruction uses the  CS  segment 
  1736.         register,  rather  than the normal DS.   Both DS and ES registers 
  1737.         point to the BASIC data area on entry.   The BP register is  then 
  1738.         set to the value of the entry SP, and used to access the stack.  
  1739.  
  1740.              The  "call" interface defined for this bridge expects  three 
  1741.         parameters: the first two are integers while the last is a string 
  1742.         variable.   The  convention  is  that the first  integer  is  the 
  1743.         command  type,  while  the  second  is the  field  number  (where 
  1744.         applicable).   The arguments are passed as pointers to  arguments 
  1745.         in the stack,  with the first argument at the "top".  You'll note 
  1746.         that  the  stack  offset for the first argument is 8  (number  of 
  1747.         arguments  plus 1 times 2).   Getting this pointer into an  index 
  1748.         register  and then using the index to get the integer  is  direct 
  1749.         code.  Since  we  are  only  interested in the low  byte  of  the 
  1750.         integers,  the  required byte is saved temporarily,  and the  2nd 
  1751.         argument  loaded using the same technique (offset  6).   The  two 
  1752.         arguments are then returned to the AH and AL register, since they 
  1753.         are the command type and field number, respectively.
  1754.  
  1755.              The  third argument is an optional string pointer,  so after 
  1756.         establishing the address to the pointer,  that address is  simply 
  1757.         "saved" (SAVSI).  Unfortunately, establishing the requirement for 
  1758.         the string pointer requires "decode" of the command type, so that 
  1759.         function  is next performed.   As an aside,  note that the use of 
  1760.         the segment registers is such that the BASIC data segment is used 
  1761.         for  access to the pointers,  while the segment register set  for 
  1762.         this code is used for "saves".  
  1763.  
  1764.              Decode  of  the type then permits  establishing  the  proper 
  1765.         string relationships for the various call types.   The "combined" 
  1766.         output/input operation is not supported in this code, although it 
  1767.         could readily be supported by a single simple change.  Because of 
  1768.         the  segment  addressability  problem,  and the need to  place  a 
  1769.         terminating  "nul" on output strings,  all string operations  are 
  1770.         mapped through an internal buffer in this code.   The code  which 
  1771.         handles  this mapping and segment register manipulation is direct 
  1772.         and straight forward, so no further explanation is given here.
  1773.  
  1774.  
  1775.  
  1776.  
  1777.         High Level Language             27
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.         Screen Design Aid - Version 3.0
  1784.  
  1785.  
  1786.              One point is important.  BASIC provides a very limited stack 
  1787.         when calling a user application.  This stack must handle not only 
  1788.         the  bridge code,  but must also handle $SDA.   $SDA is a  "stack 
  1789.         hog", and requires at least 106 bytes of stack area.  This forces 
  1790.         reassignment of the SS and SP registers before calling $SDA,  and 
  1791.         the inclusion of a stack area in the bridge.  
  1792.  
  1793.              You'll  note that even though considerable  manipulation  of 
  1794.         registers  has  been made,  the only requirement for  "clean  up" 
  1795.         before  return is the restoration of the SS and SP registers.   A 
  1796.         FAR return is required with an argument of 2 times the number  of 
  1797.         passed parameters.  
  1798.  
  1799.              For  the "sharp eyed",  yes there is a call to BIOS  turning 
  1800.         "on"  the  cursor.    In  writing  this  bridge,   I  found  some 
  1801.         interesting behavior patterns coming out of BASIC.  It apparently 
  1802.         does  not  follow the DOS/BIOS interfaces for screen  management.  
  1803.         Not  only did I "lose" the cursor on return from this  code,  but 
  1804.         BASIC ignored the cursor position established by SDA,  when doing 
  1805.         I/O on its own.  Originally, I had hoped that simply using SDA to 
  1806.         display  the screen,  and to position the cursor,  would be  ade-
  1807.         quate.  This would eliminate the cumbersome LOCATE code sequences 
  1808.         of  BASIC,  but would permit use of the I/O statements  directly.  
  1809.         Unfortunately,  that won't work!!   So, use the I/O facilities of 
  1810.         SDA when working with screens.  
  1811.  
  1812.              How do you put the whole mess together?   Well,  first embed 
  1813.         the  .INC  file  into  an  assembler  program  that  should  look 
  1814.         something like this:
  1815.  
  1816.              CODE     SEGMENT PARA PUBLIC 'CODE'
  1817.                       ASSUME    CS:CODE,DS:CODE
  1818.              ;
  1819.                       PUBLIC    BASMEN
  1820.              ;
  1821.              BASMEN   EQU       $
  1822.                   (Include the .INC file here)
  1823.              ;
  1824.              CODE     ENDS
  1825.              ;
  1826.                       END
  1827.  
  1828.         Now assemble this thing.  You have on the distribution diskette a 
  1829.         module  named BASSCR.OBJ.   Write your BASIC program (or look  at 
  1830.         the  program named DEMO on the distribution diskette),  and  then 
  1831.         run Link.   When Link requests "object" module names, give it the 
  1832.         string:  your-module+BASSCR+BASMEN+$SDA.  Obviously, these object 
  1833.         modules  must all be on the "signed on" drive,  and the remainder 
  1834.         of  the link parameters are standard responses as for  any  other 
  1835.         BASIC  compilation.   The  result is a program that will use  SDA 
  1836.         generated screens.  
  1837.  
  1838.              I'm  sure this is enough information to guide you in writing 
  1839.         your own "bridges" what ever language you prefer.   I started  to 
  1840.         build  primitive  bridges  for  additional  languages,   but  its 
  1841.  
  1842.  
  1843.         High Level Language             28
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.         Screen Design Aid - Version 3.0
  1850.  
  1851.  
  1852.         difficult  to anticipate the potential use,  and that use  should 
  1853.         effect the form of the "call" interface.   Frankly,  I also  felt 
  1854.         that  I  really  didn't want to have to dig through  all  of  the 
  1855.         "nits"  in other languages...   I'm an Assembler bigot,  so happy 
  1856.         bridge building...
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  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.         High Level Language             29
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.         Screen Design Aid - Version 3.0
  1916.  
  1917.  
  1918.         ETECHNICAL REFERENCEF
  1919.  
  1920.              For  those  of you who have a burning desire  for  a  deeper 
  1921.         understanding  of  this  whole mess,  I've  included  this  brief 
  1922.         section  on  the compressed screen and include files produced  by 
  1923.         this process.   You really don't need this information for use of 
  1924.         the  utility,  so  if your curiosity bump is not  itching  badly, 
  1925.         don't bother reading this section.
  1926.  
  1927.              First,   the   .IMG   and  .INC  files   contain   identical 
  1928.         information, in an obviously different format.  All the .INC file 
  1929.         is,  is  an "external" representation of the  binary  information 
  1930.         contained in the .IMG file.   Its converted to "external" so that 
  1931.         it  can  be handed to the assembler,  who then converts  it  back 
  1932.         again into its binary form,  but now it has the nice attribute of 
  1933.         being an .OBJ file which can be linked with your code.
  1934.  
  1935.              So  what does the .IMG file contain?   It divides  into  two 
  1936.         sections:   The field table, and the compressed image.  Beginning 
  1937.         with the first word, its content is:
  1938.  
  1939.              First  word  contains a count of the defined fields in  this 
  1940.         screen.   Immediately  following  the first word is a  series  of 
  1941.         repeating entries, each four bytes in length, one for each field.  
  1942.         An  entry contains in the first byte the row of the start of  the 
  1943.         field,  in the second byte, the column of the start of the field.  
  1944.         The third byte contains the length of the field, while the fourth 
  1945.         contains  the  attribute  of  the  field  (as  defined  in  IBM's 
  1946.         technical reference manual).  
  1947.  
  1948.              Immediately  following  the field table  is  the  compressed 
  1949.         image.   The  first word of the image is a "length" of the image, 
  1950.         including  the  length word.   Following this length  word  is  a 
  1951.         string  of  slightly  more complex  structure.   This  string  is 
  1952.         composed  of  three  types  of  "sub-strings".   Sub-strings  are 
  1953.         identified by their first byte.   If the byte is 0FFH,  then this 
  1954.         is  an attribute sub-string,  and the next byte is the  attribute 
  1955.         that  is  to  be used until next encountering an  attribute  sub-
  1956.         string.  Screens typically start with an attribute sub-string.
  1957.  
  1958.              If the byte is 00H,  then this is a repeating character sub-
  1959.         string.  The next byte is the number of times the character is to 
  1960.         be repeated (max of 255), and the following byte is the character 
  1961.         to be repeated.  
  1962.  
  1963.              Any other byte configuration (other than FFH or 00H),  is  a 
  1964.         data sub-string which is a single byte.   Its simply data that is 
  1965.         to be placed on the screen.  
  1966.  
  1967.              I'm sure with this,  the basic loop is  apparent.   Starting 
  1968.         with  the upper left corner of the screen,  and the start of  the 
  1969.         string,  simply  decode  the sub-strings and store the  resultant 
  1970.         data  characters and the current attribute.   When the string  is 
  1971.         exhausted,  you're  at the end of the regen buffer,  since  every 
  1972.         byte  in the original screen is represented.   One  minor  point.  
  1973.  
  1974.  
  1975.         Technical Reference             30
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.         Screen Design Aid - Version 3.0
  1982.  
  1983.  
  1984.         Since  a  "compressed"  string requires  three  bytes,  repeating 
  1985.         characters  must  repeat more than three times  before  they  are 
  1986.         "compressed"  into  a repeating character  substring.   Three  or 
  1987.         less, they simply are placed in the string without compression.
  1988.  
  1989.              I  won't  dwell  on making 40 character screens work  on  80 
  1990.         character displays,  (and visa versa) but that is simply a matter 
  1991.         of  "reformatting"  the regen buffers  after  expansion.   You've 
  1992.         probably noticed an almost subliminal flash of a poorly displayed 
  1993.         screen prior to seeing the "steady" image.  This is caused by the 
  1994.         "reformatting"  required.   If the "flash"  bothers  you,  simply 
  1995.         avoid  using 40 character screens on 80 character  displays.   It 
  1996.         won't occur if you match the screen to the display.
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.         Technical Reference             31
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.         Screen Design Aid - Version 3.0
  2048.  
  2049.  
  2050.         EERROR MESSAGESF
  2051.  
  2052.              The  only "true" error messages issued by this utility  come 
  2053.         from diskette I/O error conditions.  All are identified as to the 
  2054.         cause  of error and the file involved.   They appear  at  various 
  2055.         locations  on the screens,  so I won't attempt to delineate  each 
  2056.         message.   If  you  encounter  a "read" error,  I hope  you  were 
  2057.         "backed up".   A write error will invariably be because of a lack 
  2058.         of space,  either directory or data,  so try again with a "clean" 
  2059.         diskette.   You  may "swap" diskettes at any time the utility  is 
  2060.         not actually engaged in reading or writing disk, so if you have a 
  2061.         problem  writing  one  diskette,  wait till  you  get  the  error 
  2062.         message, and then swap diskettes, and try the command again.  
  2063.  
  2064.              Because  of the difficulty in testing "error code",  this is 
  2065.         probably the "softest" area in the utility.   I've tried to force 
  2066.         all error conditions,  but I'm sure I missed a  few.   Typically, 
  2067.         these  conditions  will only occur when something is "not  right" 
  2068.         with the hardware, so try again after correcting your problem.
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  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.         Error Messages                  32
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.