
/* file QRIPTECH.TXT **

               _________________________________________  
            ///                                         \\\
           <<<  QRIP TSR Technical specifications, v1.2  >>>
            \\\_________________________________________///


-----------
Description
-----------

The QRIP TSR is an interface which can act as an 'overlay' for a terminal
program that needs RIP emulation.  1stReader 2.0 loads it just before
calling a RIP BBS, and then transfers control of its output to QRIP,
creating a seamless appearance of RIP emulation.  WWIVRIP uses it
only if it's installed before WWIV is run - but it makes for perfect
local RIP graphics.

Using QRIP for RIP emulation has some definate advantages over using
Telegrafix's RIPscrip libraries.  First, QRIP restricts itself to
a small chunk of memory, making your terminal free to act as it always
has in the past.  Second, your terminal could be upgraded to new
versions of RIPscrip simply by upgrading your version of QRIP.  QRIP
also gives you powerful functions such as the pop-up mode and
text screen switching.

For a better understanding of the way QRIP/TSR operates, take a look
at its operation in 1stReader 2.0 by Sparkware.


--------------------
Strategy for the API
--------------------

  This is a basic method for making a QRIP-compatible application.  I
have described it before the actual spec so that programmers will know
what to look for as they read over the next section.

  A QRIP-compatible application should first detect the presence of
QRIP (function F0).  If QRIP reports that it can't takeover DOS,
the application should ignore QRIP's presence and possibly report
and error message stating that QRIP is corrupted in some way.

  The app should check the flags (returned by the emulation check) and
change them *only as necessary* (function 01).  Many applications won't
even need to bother with this.

  For each output string, the application should call one of the API 
string output routines (functions 04, 05, 09, or 0AH).  Then it should 
call function 06, to receive any characters pending from QRIP.
If BX returns with a value of 1, the terminal should call function
0CH to receive a whole string.

  If you decide to use functions 09 or 0AH to accomplish your purposes,
QRIP will automatically call function 06 before returning, and instead
of using two calls, you only need to do one.  Functions 04 and 05, on the
other hand, require constant polling of 06.  You should use whichever
one is more convenient, but be aware that each call to QRIP requires
a complete switch-over of DOS control, a process which can take a few
milliseconds.

  When in 'hotkey' mode, your terminal should send all keystrokes to
QRIP through function 18H.  Anything it doesn't accept will be piped
back through to function 06, so it will be sent directly to the BBS.
Hotkey mode is a necessary feature for your terminal.

  When connecting to a BBS, the terminal should set the icons directory
with the string pointer returned by function 08.  When carrier is lost,
call function 19H so the user can recover control completely.

  To do a general reset of QRIP, you can simply turn off graphics and
turn them back on.  Note that if you use this method, QRIP has built-in
monitor protection that doesn't allow the screen to change modes faster
than once per second.

  Before exiting, your app ought to return the flags to their original,
saved state.  Use function 02 to do this.

  When you're all done with QRIP, the author recommends you call function
FFh to deinstall, rather than doing a QRIP /u.  It's much safer.

  All of the functions mentioned above are essential for a QRIP-compatible
terminal.  Most of the rest are additional features that aren't
necessary for all applications.


-------------
QRIP API spec
-------------

Conventions in the API specs:

      For all flags, 1 means 'set', 'true', 'on', or 'yes', and 0 means
  'reset', 'false', 'off', or 'no'.  Just so we have no discrepancies.

      All numbers are in decimal unless they have an 'H' or 'h' at the
  end to signify hexadeciaml, or unless they have a hexadecimal digit
  in them (A-F).

Interrupt 2F (DOS Multiplex interrupt)
  This interrupt is used for interface with DOS TSR's like ASSIGN and PRINT
  and some shareware/freeware TSR's.  QRIP uses this interrupt for
  external control by applications.  The AX, BX, CX, and DX registers are
  used for all parameters and returns.  All registers not used by QRIP
  will be restored to their original values before return from the
  interrupt.

  To access QRIP, call int 2F with:

  AH = ACh    ; QRIP multiplex interrupt ID number
  DI = 1092h  ; Secondary verification of a QRIP call

    Then load AL with the QRIP function number:

    AL = 0:  Give QRIP a time slice.

               This is used to update the music and flashing timers.
               Whenever there's no activity whatsoever, the terminal
               might simply call this as often as it wants.
               It is usually a short routine.  This function is
               always called internally through the other functions,
               so you usually don't have to bother with this one.

               No return.

    AL = 1:  Change internal flags.

               This call uses the BX and CX registers to change bit-coded
               flags.  Each bit set to a 1 in BX will turn ON a flag, and
               each bit set to a 1 in CX will turn OFF a flag.  The flags
               are:

                 bit 0 (0001h):  ANSI emulation.  Defaults on.

                 bit 1 (0002h):  RIP emulation.  Defaults on.

                 bit 2 (0004h):  Graphical commands allowed.  QRIP turns this
                                 off when the set_viewport RIP command is
                                 called with parameters of zero.  Defaults
                                 to on.

                 bit 3 (0008h):  TTY text allowed.  This isn't like the text
                                 suppression flag - RIP graphics turn this
                                 flag on and off all the time.  Defaults to
                                 on.

                 bit 4 (0010h):  Disable @ variable recognition.  QRIP
                                 defaults to disabling when in TSR mode,
                                 but someone out there might have reason
                                 to put the @ variables back in.

                 bit 5 (0020h):  Wait for key at RIP_END_SCENE (|#) commands.
                                 Defaults off.

                 bit 6 (0040h):  Anti-stripping.  The /# parameter.  Defaults
                                 to off in TSR mode.

                 bit 7 (0080h):  Sound.  The /s parm.  Defaults on.

                 bit 8 (0100h):  Automatic message filter.  The /m parm.
                                 Defaults off in TSR mode.  You are warned
                                 that the author has never tried the message
                                 filter while in TSR mode, nor did he expect
                                 that it would ever have much purpose for
                                 the TSR.

                 bit 9 (0200h):  Display-only mode.  The /y parameter.
                                 If this flag is off, QRIP will wait
                                 for the local user to answer certain
                                 prompts.  If it's on, QRIP will flash
                                 windows on the screen but won't give the
                                 local user time to answer.  This is most
                                 useful when QRIP is used as a local
                                 RIP display for BBS programs.

                bit 10 (0400h):  TTY text suppression.  The /x parm.
                                 Defaults off in TSR mode.

                bit 11 (0800h):  Loopback mode.  Turn this on to disable
                                 special codes 104H-10DH; QRIP will handle
                                 these modes directly.

                bits 12-15:      Reserved.

               The return is the same as the QRIP installation check
               (see AL = F0H).  Note that CX will return the new status of
               all of the flags.
    
    AL = 2:  Turn off graphics screen.

               QRIP will turn off the graphics screen by itself unless
               the RIP_NO_MORE auto-finish flag is off.  The screen will be
               restored to its pre-graphics state.

               No return.

    AL = 3:  Turn on graphics screen.

               Every time a RIP sequence is encountered, the screen is
               switched to graphics mode anyway.  This is just provided for
               apps that need manual control.  It can also be used as
               a manual reset: it does precisely the same thing as "!|*"
               (which means the graphics are NOT restored - see functions
               14H and 15H.)

               No return.

    AL = 4:  Send a string to QRIP.

               - - -
               All TTY, ANSI, RIP, VT102, etc. enters QRIP through functions
               4, 5, 9, or 10.  Your terminal will probably only use
               one of the four.  There are only slight differences
               between them.
               - - -

               DX = segment address of the string
               BX = offset of the string
               CX = length of string

               The string doesn't need to be null-terminated, but CX must
               contain the length.  If CX is 0, nothing will be output.

               No return.

    AL = 5:  Output a null-terminated string to QRIP.

               Same as AL = 4, but the string must be null-terminated and
               CX is disregarded.

               DX = segment
               BX = offset

               No return.

    AL = 6:  Receive characters from QRIP.

               QRIP will return any characters that should be sent
               back to the BBS.  This is for terminals that can't
               take in strings immediately after sending them.
               Using function 4 or 5, with 6, requires two calls
               for every update, while using 9 or 0AH (6 not
               required) requires only one.

               Returns:

               AX = character to send to BBS or special message.
               BX = 1 if an entire string is waiting to be sent.
                    (0 if not.)
               CX, DX = The same as AX.  If your program has trouble
                        receiving the special codes, try using these
                        returns instead.

               If AX = 1 through FFH, the character should be sent to the
               BBS.  If AX = 0, no characters.  Special codes also exist:

                 AX = 100H   The terminal should wait for the user to press
                               a key before sending any more data.  When the
                               key is pressed, the host terminal *must*
                               call function 16H with BL = 0 (see AL = 16H)
                               or function 18H.

                 AX = 101H   QRIP has detected both mouse buttons or the
                               middle button pressed.  1stReader uses this
                               function to call up the virtual keyboard.

                 AX = 102H   RIP_ENTER_BLOCK_MODE.
                               RIPscrip has the ability to auto-start any 
                               kind of standard upload/download protocol.
                               The terminal should call function 1AH to
                               find out the filename, the protocol, etc.
                               that was communicated by a RIP command.
                               It should then start up/downloading.

                 AX = 103H   Right mouse button pressed.

          NOTE on codes 104H - 10DH:
            The terminal can respond any way it likes to these
            switches, but whenever any modes are switched on
            or off, the mode change should be reported to QRIP
            through function 16H.  QRIP will assume no change
            was made unless told otherwise (in other words,
            if one of these codes is sent by QRIP to your terminal,
            QRIP will still think nothing has changed until you
            report that something has changed, through 16H).  All 
            of these switches are all initialized to OFF when loading 
            the QRIP TSR.

                 AX = 104H   The BBS requested that the terminal should turn
                               ON the status bar at the bottom of the
                               screen.  In QRIP, the status bar is usually
                               the protected area.  QRIP won't turn it off
                               automatically; the host terminal should
                               decide what to do with this code.

                             It might be a good idea to respond to the user
                               pressing Alt-SPACE by toggling the status
                               bar.  Just remember to report any status
                               change to QRIP.

                 AX = 105H   The BBS requested the status bar OFF.

                 AX = 106H   BBS requested VT-102 user-terminal emulation
                               mode.  This means that certain keys on the
                               user's terminal should change a little bit.
                               From the RIPSCRIP 1.54 document:

                                               F1 - ESC [ M
                                               F2 - ESC [ N
                                               F3 - ESC [ O
                                               F4 - ESC [ P
                                               F5 - ESC [ Q
                                               F6 - ESC [ R
                                               F7 - ESC [ S
                                               F8 - ESC [ T
                                               F9 - ESC [ U
                                              F10 - ESC [ V
                                             PGUP - ESC [ I
                                             PGDN - ESC [ G
                                             HOME - ESC [ H
                                              END - ESC [ F
                                           INSERT - ESC [ L
                                        CURSOR UP - ESC [ A
                                        CURSOR DN - ESC [ B
                                      CURSOR LEFT - ESC [ C
                                     CURSOR RIGHT - ESC [ D

                               QRIP currently supports most of VT-102.
                               Full emulation is coming soon.

                 AX = 107H   The BBS requested VT-102 mode off.

                 AX = 108H   The BBS requested Doorway mode on.  If your
                               terminal doesn't support it yet, what it
                               does is send the pure IBM ASCII/keyboard
                               scancode values directly to the BBS.  For
                               normal ASCII keys, your terminal should send
                               the ASCII value to the BBS, but for extended
                               keys, send a zero followed by the scancode
                               of the key pressed.  You should also use the
                               standard "Alt-=" combination to toggle
                               doorway mode.

                 AX = 109H   Doorway mode off.

                 AX = 10AH   Hotkeys mode on.  This allows the user to
                               press keys on the keyboard to activate
                               mouse buttons that have the hotkey flag
                               enabled.  When this mode is on, the
                               host terminal should send QRIP all of the
                               keys pressed by the user to function 18H.
                               Of course, the terminal doesn't have to
                               send *all* of the keys - keys like F5
                               (shell to DOS in 1stReader) might be
                               filtered.

                 AX = 10BH   Hotkeys mode off.

                 AX = 10CH   BBS requested Tab-key button-changing on.
                               This basically means that anytime the user
                               presses <TAB> or <ENTER>, the host terminal
                               should send that key to QRIP through
                               function 18H.

                 AX = 10DH   Tab-key mode off.

                 AX = 10EH   XOFF.  QRIP has entered a pop-up mode, and has
                               activated a 4k buffer that will store
                               anything that's coming in for when it's
                               ready to process it.  If the terminal has
                               hardware or software flow control, it
                               should be activated so QRIP's buffer doesn't
                               overflow.

                               NOTE: This code is sent anytime popup mode
                               is activated, even by function 12H below.
                               Therefore, when the host terminal calls 12H,
                               it can ignore this special code.

                 AX = 10FH   XON.  Pop-up mode just turned off.
                               NOTE: Function 13H will automatically generate
                               this code and it can be ignored just like
                               code 10E.

                 AX = 110H   
                     through 
                      119H   In RIPterm, there is a setup screen in which
                               you can set up applications that can
                               automatically be run with request from the
                               BBS.  Up to 10 (#0-9) applications are allowed.
                               These codes are generated whenever these
                               requests are made.  Your terminal may
                               choose to ignore these, as they are pretty
                               much nonstandard in the author's opinion.
                               However, application #0 is supposed to be
                               a standard text editor; if your application
                               has a built-in editor (like 1stReader does),
                               code 110H ought to be able to execute it.

                               Unfortunately, there is currently no way
                               to pass command-line parameters from the
                               BBS to the application.

                 AX = 1FFH   The terminal should send an ASCII 0
                               character to the BBS.

               (And back to the rest of function 6...)

               If BX returns 1, there is an entire string waiting to be sent.
                 It can be sent back to the terminal through function 12.
                 The terminal may choose to ignore this, and it can receive
                 all characters through this function, but there is a
                 speed penalty in doing so.

    AL = 7:  Return the absolute address of the font directory string.

               If a program has the capability to set up QRIP, it may
               do so with functions 7 and 8.  Each string buffer has
               a length of 80 characters and MUST be nul-terminated.

               returns:
                 DX = segment
                 BX = offset

               Simply write in the new full pathname at the address,
               making sure the 80-char limit is imposed.  The new path
               won't take effect until the graphics screen is
               re-initialized (by turning it off and then on).  It isn't
               required to have a backslash at the end.

    AL = 8:  Return the absolute address of the icons directory string.

               See AL = 7.  Same thing but for the icons directory.  The
               new path takes effect immediately.

               The icons directory is used to store icon files and 'callable'
               RIP files for use by the BBS.  Your host terminal should
               somehow organize a directory structure so that each BBS
               has a different icons directory, and whenever a connection
               is made, your terminal should set the QRIP icons directory
               to the BBS's directory.

               This string MUST end with a backslash (followed by a nul),
               unlike the fonts directory.

    AL = 9:  Same as AL = 4, but it will automatically return any
               characters waiting, the same way as AL = 6.

   AL = 0AH: Same as AL = 5, but it will automatically return any
               characters waiting, the same way as AL = 6.

   AL = 0BH: Execute a RIP_END_SCENE.

               Just like sending "!|#" on a new line.  QRIP will
               activate all mouse buttons and cancel the RIP
               timeout.

               No return.

   AL = 0CH: Get an entire string to send back to the BBS.

               For terminal programs, sometimes a button executed by
               the user will require automatic response through QRIP.  A
               terminal program using QRIP should therefore call this
               function when function 6, 9, or 10 has directed it here.
               Remember that the string *CAN* contain ASCII 0 characters!

               Returns:

               AX = 0 if there's nothing to send (whatcha callin' here for?)
                    1 if everything's OK, and DX:BX has the string to send.
                    2 if there's a special code waiting in function 4, 5,
                      or 6 (shoulda looked back there first!)

               If AX returns 1,
                 DX = segment address of string.
                 BX = offset.
                 CX = length.

   AL = 0DH: Set protected area at bottom of graphics screen.

               QRIP will allow you to put your terminal's status bar
               and other information at the bottom of the screen in
               such a way that whatever you write in the protected
               area will not be affected by the BBS.

               BL = attribute to fill area.  The background color, if bit
                 7 is set, will be high-intensity instead of blinking.
               CL = number of text lines  (0 to turn off protected mode.)

               No return.

   AL = 0EH: Write a nul-terminated string in the protected area.

               DX = segment
               BX = offset
               CL = x offset from upper-left corner of protected area
                      to place the string (starting at 0).
               CH = y offset (also starting at 0).

               Note: The string will be chopped on the right edge.

               No return.
             
   AL = 0FH: Scroll a portion of protected area.

               BL = upper-left x offset
               BH = upper-left y offset
               DL = lower-right x offset
               DH = lower-right y offset
               CL = number of lines to scroll the window upward
                      (downward not permitted.)

               No return.

   AL = 10H: Set the color of strings written to the protected area.

               BL = attribute - if bit 7 is set, bkg will be high-intensity
                 instead of blinking.

               No return.

   AL = 11H: Convert the protected area to the whole screen.

               By doing this, the host terminal will be able to write
               anywhere on the screen in 8x8 font (80x43) through
               the protected-area functions.  This shouldn't be used
               except where necessary; the pop-up window mode and the
               normal protected area should serve much better for most
               purposes, although there are fewer restrictions with this
               mode.  Just remember, it won't be a protected mode
               anymore, and the BBS will be able to write all over it.

               On entry:
               BX = 1: Allow writing to full screen.
               BX = 0: Normal protection.

               No return.

   AL = 12H: Turn on pop-up window mode.

               If pop-up mode is turned on, the host terminal will be able
               to write on the screen, and restore the screen very quickly
               when it's done.  The writing on the screen can be done
               by simply sending QRIP a RIP file through function 4 or 5.
               Any buttons sent will be made active, so QRIP can respond
               to buttons through the usual functions 6 and 0CH.

               The picklists, the variable queries, and the green
               info-boxes all use pop-up mode.

               An example of the use of pop-up window mode:

                   1stReader calls function 12H.
                   1st sends a RIP file that puts a window on the screen
                     like this:

                       +-----------------------------------+
                       |Thanks for calling, Mark!          |
                       |                                   |
                       |Minutes used: 10                   |
                       |                                   |
                       |@$% +--------------------------+   |
                       |NO C|+---+ Exit Terminal? +---+|   |
                       |    ||Yes|                |No ||   |
                       |    |+---+                +---+|   |
                       |    +--------------------------+   |
                       |                                   |
                       |                                   |
                       |                                   |
                       |                                   |
                       |                                   |
                       |                                   |
                       +14400 | RIP | 57600N81,2  | Offline+
                       +-----------------------------------+

                   1stReader then calls function 6 repeatedly, waiting
                     for the user to press one of the buttons.
                   The user presses "No".
                   The button responds to 1st with a single character,
                     "N", according to the button definition in the RIP.
                   1st receives the "N" and calls function 13H.
                     The pop-up window disappears, and everything
                     returns to exactly the way it was.

               This mode has some specific restrictions.  While in
                 pop-up mode, the host terminal should *-NOT-* (even
                 though QRIP allows it):

                   - Reset the screen with |* or $RESET$.  QRIP will
                       automatically turn off popup mode if the terminal
                       tries to do so.
                   - Use the clipboard.  (Icons are okay.)
                   - Have more than 64 mouse fields and buttons total,
                       even though QRIP allows 128.  Buttons numbered
                       64 through 127 will corrupt QRIP's saved mouse
                       fields.
                   - Change the EGA palette.
                   - Save the graphics screen, the mouse fields,
                       or the clipboard to disk with the corresponding
                       RIP variables.
                   - Use pop-up pick lists, unless it's okay that that the
                       pick list automatically takes QRIP out of pop-up mode.

                       The pick lists might be especially useful for compact
                       Yes/No choices.  An example:

                       !|10000((Exit Terminal Mode?::Y@Yes,N@No))

                       This is a pick list definition that will send back
                       "Y" if the user clicks "Yes" or "N" if the
                       user clicks "No".  The pick lists are also
                       kind of aesthetic, so you might try them.

                   - Use the RIP variable definition command (|1D), *-unless-*
                       it's a non-interactive definition and the variable
                       is known to be already defined.  Nor should you
                       use standard variable queries to have the user
                       input data, *unless* it's okay that pop-up mode
                       will be automatically canceled.
                   - Use templates.  This means you can use regular
                       buttons, but if you use radio or checkbox
                       buttons, you stand in danger of destroying the
                       BBS's template definitions.  The author of QRIP is
                       considering changing this so it saves the templates
                       for pop-up mode, and thereby allows host terminals
                       to use radio/checkbox buttons.

                   + Writing to the protected area is okay, but the 'picture'
                       of the area will be restored when pop-up mode is
                       turned off.  The viewport will also be incorrect
                       if the number of protected lines is changed.  The
                       protection itself is also ignored while in popup
                       mode, that is, a RIP designed for pop-up mode will
                       be able to write right over the protected area.

               These restrictions aren't permanent, and except for $RESET$,
                 the author will lift specific restrictions if anyone has
                 a need for it.

               One more general restriction: avoid starting pop-up
                 mode if there is RIP coming in at the time.  QRIP makes
                 its best attempt to make pop-up mode available anywhere,
                 but the RIP processing section of QRIP (especially 
                 dealing with variable queries and definitions) is far 
                 too complex to account for every scenario.  If this 
                 restriction causes difficulty, you might try making 
                 a very simple RIP monitor that watches for CR/LF pairs 
                 and checks whether a ctrl-A, ctrl-B, or ! follows.  When
                 CR/LF is followed by anything other than ctrl-A, ctrl-B,
                 or '!', it's perfectly safe at that time to start
                 pop-up mode.
               
               Other than that, the pop-up window mode is very powerful
                 for making an especially compact and very friendly user
                 interface.
               
               No return.

   AL = 13H: Turn off pop-up window mode.  The screen will be completely
               restored very quickly and seamlessly.

               No return.

   AL = 14H: Save the graphics screen and go to text mode.

               This is a way to switch to text mode and back.
               The graphics screen is stored on disk and the screen 
               is switched to text mode, clearing the screen.  When 
               you call this, it is IMPERATIVE that you don't call 
               any other functions but 15H when you're through.

               No return.

   AL = 15H: Restore the graphics screen saved with function 14H.

               Remember that the host terminal must *not* call the regular
               functions 2 or 3 to turn on/off graphics while QRIP is
               in "screen saving" mode (initiated by function 14H).

               No return.

   AL = 16H: Report a mode change to QRIP.

               All modes default to OFF when QRIP is first installed as a TSR.

               On entry:
               BL = 00H: A key was pressed to signify the end of the key
                           wait initiated through special code 100H.
                           QRIP will flush its buffer and return to
                           normal.

               BL = 01H: status bar on
               BL = 02H: status bar off

               BL = 03H: VT-102 mode on
               BL = 04H: VT-102 mode off

               BL = 05H: doorway mode on
               BL = 06H: doorway mode off

               BL = 07H: hotkeys mode on
               BL = 08H: hotkeys mode off

               BL = 09H: tabkey mode on
               BL = 0AH: tabkey mode off

                 Only the VT-102 mode changes will actually affect QRIP's
                 operation.  The rest are intended for simply reporting
                 the status to the BBS when it's requested.

               No return.

   AL = 17H: Call a RIP file.

               On entry:
               DX:BX = pointer to nul-terminated string containing filename
                       of RIP file to call.  The file can be in the current
                       icons directory (checked first), the QRIP.EXE
                       directory (checked second), or the current
                       directory.  The .RIP extension isn't necessary.
                       Path specifications (with backslashes or colons)
                       are NOT allowed and will be obliterated.

               This is mostly useful in pop-up mode.  It will call the file
                 exactly as if the "|1R" RIP command were executed.

               No return.

   AL = 18H: Send a user key to QRIP.

               On entry:
               BX = key that was pushed.  For normal ASCII keys,
               send the ASCII value.  For extended keys, send
               the scancode in BH, with 0 in BL.

               No return.

   AL = 19H: Hangup (NO CARRIER).

               This will disengage any popped-up windows and enable the
               text cursor, if it's not already on.  Call here when
               carrier is lost.  QRIP may sometimes generate a few
               pop-up 'flashes' to get itself unraveled while
               doing this.

               No return.

   AL = 1AH: return RIP_ENTER_BLOCK_MODE information.

               RIPscrip has the ability to auto-start any kind of
               standard block transfer.  When the host terminal
               receives special code 102H, it should call this
               function (when it's ready to do so) to get
               the transfer information, then it should start
               transferring immediately.

             returns: AH = protocol number requested, from chart:

               Value   Protocol            Filename Required?
               ----------------------------------------------

              For DOWNLOADING:

                 0     Xmodem (checksum)          Yes
                 1     Xmodem (CRC)               Yes
                 2     Xmodem-1K                  Yes
                 3     Xmodem-1K (G)              Yes
                 4     Kermit                     Yes
                 5     Ymodem (batch)             No
                 6     Ymodem-G                   No
                 7     Zmodem (crash recovery)    No

              For UPLOADING:

              8-15     The same as #0-7, but for uploading instead.

             AL returns the file type being transferred.
               Modified from the RIPscrip 1.54 doc:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The <file_type> parameter determines what type of files are to be
received during the block transfer.  These are the valid parameters:


    Value   Description of Block Transfer Contents
    ---------------------------------------------------------------
      0     RIP file sequence (display it, don't store)
      1     RIP file sequence (store them in ICONS subdirectory)
      2     ICN file sequence (store them in ICONS subdirectory)
      3     HLP file sequence (store it, and auto-load if needed)
      4     COMPOSITE DYNAMIC file sequence (batch protocols only)
      5     ACTIVE DYNAMIC file sequence (batch protocols only)

The special <file_type> of 4 & 5 (COMPOSITE DYNAMIC file sequences)
is somewhat different than the non-batch transfer methods.  This
allows each file uploaded to be individually processed based on their
file extensions.  If you use extensions other than .RIP or .ICN, then
this mode is not available to you as the necessary files will not be
able to be processed.  Any RIP/ICN files that are "downloaded" from the
Host in DYNAMIC mode are placed into the ICONS sub-directory and
no further processing is performed.  .RIP files that are received are
"stored" and are not played back in COMPOSITE DYNAMIC mode.  In
ACTIVE DYNAMIC mode, they are stored and played back simultaneously.
ICN files are only stored.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

             So basically, block mode, when downloading, is like a
               normal transfer but .RIP, .ICN, .HIC, and .MSK files
               go into the icons directory when downloading.  Block
               mode can also automatically activate .RIP files when
               they are received.  QRIP won't take care of the
               automatic playback.

             Most of the time, RIP auto-display isn't possible since
               most terminal programs use external protocols.
               In these cases, file types 0 and 5 should simply
               create temporary files, then ask QRIP to display
               them through function 17H.  The author recommends
               you don't use any temporary files that fit the wildcard
               QRIP$*.$AV.

             Mode 3 is probably for RIPterm only.  It should be treated
               as a standard non-batch transfer (but I may be wrong).

             DX:BX points to a string containing the filename.  CX
               contains the length of this nul-terminated string.
               (If no transfer has been requested by the BBS, DX and
               BX will both be zero.)



   AL = 1BH: Set system font size.
             This call is provided so the host terminal can change the
               font size manually.  Set BX to one of the following:

             Size   Font Size   X Range  Y Range
             ------------------------------------------
              0     8x8          0-79     0-42
              1     7x8          0-90     0-42
              2     8x14         0-79     0-24
              3     7x14         0-90     0-24
              4     16x14        0-39     0-24

             No return.
   
   AL = F0H: Detect the presence of QRIP.
             If QRIP is present, this call will return:

               AX = 9142H
               DX = flag indicating whether QRIP is able to takeover DOS.
                    (0 = no, nonzero = yes).

             If QRIP is able to takeover DOS, it will report in addition
             to the above:

               BX = version information.  BH = major version number in
                    hex, not BCD coding; BL = minor version in the same
                    format.  Example: if the version is 3.12, BX will be
                    030CH.

               CX = current flags.  See AH = 1, Change internal flags,
                    for the list of these flags.  They will appear in
                    exactly the same bit positions.

   AL = FFH: deinstall QRIP.  It will return:

             AX = 0: Can't deinstall.  Another TSR or program (possibly
                     the application calling QRIP) has taken over one of
                     QRIP's interrupts, and it can't deinstall without
                     crashing the system.

             AX = 1: Successful deinstallation.

             AX = 2: QRIP can't currently take over DOS.  The application
                     might try again a couple of times.  If it still
                     doesn't work, QRIP has probably been corrupted, and
                     the application should try to exit as gracefully
                     as possible.


--------------------
QRIP interrupt hooks
--------------------

QRIP hooks the following interrupts for its own maintenance:


Int 2F: The multiplex interrupt.  Perhaps this isn't the best way to go,
        but it is the fastest.  The problem is that if any other TSR's
        happen to use function AC also, they must be loaded before QRIP
        or QRIP won't get any calls from applications.  If they are
        loaded before QRIP, QRIP will be able to recognize based on
        the DI register whether the calls are intended for it or for
        another TSR.  Maybe I should've used Ralf Brown's AMIS (Alternate
        Multiplex Interrupt Specification) instead, but it's too late now.

Int 30 (hex): The graphics library takes this interrupt.  In some
        sources it's labeled as "Interface for CP/M calls".  As yet, I
        don't know why the library needs it, but it doesn't seem to mess up
        anything nonetheless.

Int 24 (hex): Critical error handler
Int 23 (hex): Ctrl-C handler
Int 1B      : Ctrl-Break handler
        These three are only trapped while QRIP has DOS control.  They
        simply return (with a fail code for the critical error handler).
        This is done for smooth operation of QRIP.  Their vectors are
        returned to their original values when QRIP is finished with
        DOS.


-----------
Bug Reports
-----------

If you're sure there's something wrong and you've checked everything else,
please don't hesitate to report the problem to me.  You can reach me
on ILink and RIME through the RIPscrip and ANSI conferences, or
by calling The Graphics Connection at (801)264-1191.  You will be able
to leave a (C)omment for the sysop after going through registration, and
the sysops will forward your comment to me.  If you prefer the 29-cent,
slower variety of communication, snail-mail me at:

   Shane Hathaway
   7771 W 3455 So
   Magna, UT 84044 (USA)

----------
THANK YOU!
----------

     Many thanks to those who have made this project possible!  It was
on ILink that I first discovered RIP.  Thanks to all the administrators for
creating an efficient, well-balanced, and well-moderated mail network.
Thanks to The Graphics Connection BBS (801)264-1191 for providing me access
to ILink, and thanks to Glenda, Michael, and Kay (the sysops) for running
TGC so well.  Thanks to Sparky, who provided me with a goal to attain: a
RIPscrip TSR!  Thanks to Glenda for her dedication to the project, for the
QRIP Pro file selection screen logo, and for a gigabillion other things.
Thanks to Michael Leavitt for tips on a few things and for the assembly-code
optimization of the bezier curve routine.  Thanks to John Friel for posting
a bezier curve routine on ILink that made my lightning-speed bezier possible.
Thanks to the RIP artists around the world, especially Michael Arnett,
Annie Mendetta, John Kwasnik, Wayne Thomas, and a whole lotta others who
helped me debug QRIP without them even knowing it (grin).  Thanks to the
1stReader beta team, especially Matthew Waldron, Joe Malacria
(the Ansi_Phreak), John "OS/2 forever" Phillips, and Sparky, for reporting
bugs I couldn't possibly have guessed would exist.  Thanks to TeleGrafix for
inventing this wonderful protocol!  Thanks again to Joe Malacria, who came
up with the idea for the strip-resistant protocol.  Last but not least,
thanks to my family which lets me use the computer all day. <g>

-------------------------
Copyrights and Trademarks
-------------------------

QRIP and WWIVRIP are Copyright (c)1994 by Shane Hathaway.
  All Rights Reserved.
RIPscrip is a trademark of TeleGrafix Communications, inc.
QMail 1stReader is a trademark of Sparkware.
WWIV is a trademark of Wayne Bell.

************/
