home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / bix / wind.doc < prev    next >
Encoding:
Text File  |  1986-08-04  |  7.2 KB  |  164 lines

  1. Turbo/IBM & Clones - Windowing, page access, lotsa nifties - UCIVMS725
  2. (This and the next 3 messages contain all required source)
  3.  
  4. Contributed by John Leonard (a.k.a. UCIVMS725).
  5.  
  6. Dear Jim,
  7.  
  8. Here is the Screen I/O package that I mentioned on BIX.  The following
  9. is a directory of the disk and a description of each of the files:
  10.  
  11. TEXTWIND PAS     2718   5-20-86   2:31p
  12.    This is a sample program showing uses for some of the procedures
  13.    and functions in the package.  In preparing this diskette, I found
  14.    that the UP and DOWN features only work on my machine when either
  15.    Superkey or Sidekick is loaded ( I didn't bother to narrow down
  16.    the actual cause.)  Oh well,  one can not expect perfection in
  17.    such a short period.
  18.    This is the source code for the sample program.  It should be studied
  19.    carefully to see how the Include modules are ordered, etc.  I tried to
  20.    include examples of most of the features in the package.
  21.  
  22. BIOS     SYS     3905   5-20-86  10:21a
  23.    This is the hardware emulation portion of the package.  Most of the
  24.    Bios Screen Interrupts are included.
  25.  
  26. COLORS   SYS     6504   5-20-86  10:24a
  27.    This module need only be included if one is working on a color monitor,
  28.    or wants the special blink,inverse,etc. options.  I have everything
  29.    in this module documented in the Header (I hope).
  30.  
  31. DISPDEF  SYS     3267   5-20-86  10:26a
  32.    This is the Type Declaration module for the I/O system.  All of the
  33.    structures and global variables are defined here.  I tried to name
  34.    them in such a manner that one would not normally get a conflict
  35.    with everyday variable names.
  36.  
  37. DISPLAY  SYS    19435   5-20-86  10:29a
  38.    This is the main I/O Include module.  A header in the file describes
  39.    all of the functions and subroutines available.
  40.  
  41. PBIOS    SYS     5149   5-20-86  10:27a
  42.    This is the Pseudo-Bios Include module.  When a display screen other
  43.    than the hardware is selected, all character I/O is routed through
  44.    here.
  45.  
  46. SAVE     SYS     2678   5-20-86  10:27a
  47.    This module provides disk support for the display screens.  A screen
  48.    may be saved and retreived using these modules.  A possible addition
  49.    to the package may occur in the module.  It would be nice to be
  50.    able to save several screens a file as records, in this manner one
  51.    could have a large file containing lots and lots of screens (help
  52.    messages??) and retreive them with a command similiar to:
  53.  
  54.        loaddisplay( DisplayPageNumber, Filename, RecordNumberInFile).
  55.  
  56. STRINGS  SYS     8284   5-20-86  10:30a
  57.    I put together a bunch of handy string utilitys ( and others ) and
  58.    stuck them here.  Of special interest is a string editor, that allows
  59.    the programmer to display a string and then allow the user to edit
  60.    it ( a la Sidekick "newfile" prompt ).  I think that someone on BIX
  61.    was asking for a procedure like this.  Study this procedure, I think
  62.    you will find it interesting ( and probably in need of an overhaul!).
  63.  
  64. WINDOW   SYS    17350   5-20-86  10:29a
  65.    Special window utilities are included in this module.  Once a window
  66.    has been defined (a window is a smaller portion of a display page),
  67.    it may be moved with these utilities.  I also have some other goodies
  68.    hiding in here, too!
  69.  
  70.  
  71.    There are FOUR core modules that MUST be included for everything to
  72.    work properly:
  73.  
  74.       DISPDEF.SYS
  75.       BIOS.SYS
  76.       PBIOS.SYS
  77.       DISPLAY.SYS
  78.  
  79.    The others are optional.  I usually take pieces from others
  80.    and put them in a single include module, depending on the code
  81.    requirements of the application and the features used.  If my
  82.    application is not very big and I am lazy, I usually include them
  83.    all.
  84.  
  85. Background:  I came up with the idea to build this package after looking
  86.    at the BIOS listings for Interrupt $10.  I saw the use of screen pages
  87.    and wondered why no one else bothered to use them.  I also saw how
  88.    fast programs like Sidekick could "plop" things on and off the display
  89.    and thought that would be a powerful addition to any program.  I also
  90.    checked around and found that there were no software companies writing
  91.    Turbo Compatible Include Packages that would do just what I had defined.
  92.    ( for Cheap, at least ).
  93.  
  94.  
  95. Features:  Screen pages are allocated dynamically, meaning you don't
  96.    waste memory that you don't need.  Screens may be saved and loaded
  97.    directly from disk, meaning you can write a program to generate
  98.    screens ( I have the rudiments of one) and load them almost instantly
  99.    in you actual application.
  100.    This is how the package is designed:
  101.  
  102.  
  103.                              /- PBIOS ( for non-harware pages )
  104.                             /
  105.         write  -- conoutptr
  106.                             \
  107.                              \- BIOS  ( for the hardware page )
  108.  
  109.    When WindowInit is called, a check for Mono versus Color screens is
  110.    made.  Thus this will work on both types of monitors without having
  111.    to worry about the different stuff at the guts!  A check of the video
  112.    vertical retrace is also made to eliminate snow with moving windows,
  113.    etc.
  114.  
  115.    There is a lot of stuff in these modules, and it has been so long that
  116.    I was actually inside them I have forgot why I did some things.  If
  117.    you have any direct questions, I can answer them, but I am having
  118.    trouble describing all of these goodies off the top of my head.
  119.      (So ask lots of questions!!)
  120.  
  121. About the release of this stuff to BIX:
  122.  
  123.    I have no problem letting people on BIX have access to this stuff.  I
  124.    just hope that no one gets is and then starts selling it.  I have
  125.    a feeling that there is a market for this ( I would have bought it
  126.    a couple of months ago!)  I decided to let it go to the public
  127.    domain because I have been too busy to follow up on all of the things
  128.    that need to go into a software package...plus I am sick of working
  129.    on it.  Let me know what you think...is it still worth marketing??
  130.  
  131.    After using Turbo Prolog, I see that Borland will probably build
  132.    all of these features directly into the language (version 4.0) and
  133.    this stuff will be put out of a job.  TP4.0 won't be out until
  134.    next year some time, so there is still some life left in this, however.
  135.  
  136.    If this is posted on BIX, please make sure that my name and the
  137.    following address is kept with all of the modules, so if anyone decides
  138.    to sell it, they could let me in on it.
  139.  
  140.    If you have any comments or questions, please feel VERY free to contact
  141.    me, either on BIX or other means.  I am very appreciative of your
  142.    help on BIX.
  143.  
  144.  
  145.    Sincerly,
  146.  
  147.    John D. Leonard II
  148.    P.O. Box  16744
  149.    Irvine, California
  150.    92713
  151.    (use this address in the modules).
  152.  
  153.    (714) 856-6571 at work
  154.    (714) 733-9079 at home
  155.  
  156.  
  157. P.S. If the modules bomb out without exiting properly, chances are
  158.      that your cursor may be turned off, or worse yet, set to a different
  159.      hardware page.  I have included a little Macro program that I keep
  160.      somewhere on my PATH so if this happens, I can reset all of
  161.      goodies.  This is similar to HFIX provided by BORLAND in the
  162.      TURBO GRAPHIX packages.  The program is names GFIX and is currently
  163.      set to reset to Mono Cursor Size (scan lines 11-12).
  164.