home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / pan.zip / PAN.DOC < prev    next >
Text File  |  1989-11-01  |  4KB  |  72 lines

  1.                    PAN LEM
  2.  
  3.                 BY JOE HUGHES
  4.  
  5.                    10/30/89
  6.  
  7. The lem is a small assembly language program which enables CLARION to move a region
  8. of text either right or left at very high speed.  It can therefore be used to horizontally
  9. scroll either the whole screen or just a section of it.
  10.  
  11. It is set up to emulate the way the CLARION SCROLL command uses parameters.  Just as the
  12. format of the SCROLL command is:
  13.  
  14.      SCROLL(first row,first column,rows,columns,count)
  15.  
  16. The format of PAN is:
  17.  
  18.      PAN(first row,first column,rows,columns,count,fill)
  19.  
  20. Just as in the SCROLL command the "count" parameter can be negative or positive to
  21. change the direction.  If "count" is negative, the block of text will be moved to the
  22. right.    Conversely, if "count" is positive the block of text will be moved to the left.
  23.  
  24. The only difference between PAN and SCROLL is that SCROLL will use the attribute of the
  25. upper left corner of the rectangle specified to determine the attribute of the area that
  26. is blanked.  PAN allows you to specify what the "fill" of the blanked area, in case
  27. the attribute of the upper left corner is different than the area to be blanked.
  28.  
  29. To specify the "fill" parameter set up a hex equate as follows:
  30.  
  31.      The hex of the foreground and background followed by the hex of the ASCII character.
  32.  
  33. Therfore, a blue blank would be 1720H, 17 for a blue background and 20 for the hex of a space character.
  34. In the sample program, another type of fill is shown, 4F2AH, which produces a
  35. white asterisk on a red background.  Initially, the equate BLUE_BLANK is set to 1720H in the sample
  36. program, I encourage you to try the other equate.
  37.  
  38. You are probably wondering why I decided that a negative count would move the block of text
  39. to the right, instead of to the left since negative numbers are traditionally on the left
  40. side of a number line.    I did this because PAN will most likely be used in response to a key
  41. press, for example a left arrow key and a right arrow key.  If you think about it for a moment
  42. you will realize that when the user pressed a LEFT arrow key to PAN the screen left, the operation
  43. actually performed on the screen would be to move the text block to the RIGHT, and then fill in
  44. the leftmost column.  Therefore, the sign of the "count" parameter corresponds to the key that
  45. is pressed.  This methodology is also illustrated in the sample program.
  46.  
  47. Notice in the sample program how I change STARTY as the program proceeds, I encourage
  48. you to remove these lines and then test the program. You will see how PAN can be used
  49. to PAN the block to an anchored point.
  50.  
  51. Lastly, notice how fast the program can throw up a new column, and change the attribute of only part
  52. of the column, and also that it leaves the attribute of the block to be moved intact.
  53.  
  54. ERROR HANDLING:
  55. The 'first row' and 'rows' parameters must be in the range of 1 to 25, and
  56. the 'first column' and 'columns' parameters must be in the range 1 to 80 or else the
  57. PAN statement is ignored.  There is no error checking on the last two parameters, 'count'
  58. and 'fill.'  PAN also does not check to see if the sum of the 'first column' and
  59. the 'columns' parameter exceeds the screen limit of 80.     For example, if the first column is 75
  60. and you ask PAN to PAN a block 10 columns, the block will wrap five columns over onto the left side
  61. the screen.  I did this for speed reasons, and there are some instances where it is useful,
  62. I also thought it would be more useful as an error flag than ignoring the statement.
  63.  
  64. I hope that this LEM proves useful, because the bulletin board has been of great help
  65. to me, especially the mouse.lem and the putkbd.lem.
  66.  
  67. Finally, in no event will I, Joe Hughes, be liable to you for any lost profits
  68. or damages resulting from the use of this software, including but not limited
  69. to indirect, special or consequential damages.
  70.  
  71. If there are any problems or questions please feel free to call me at (202) 663-7600.
  72.