===============================================================================
                          RGFOSSIL v1.00 for Windows
              Revision 5 FOSSIL driver and WinSock engine for DOS BBSes
                         (c) 2026 NewWave Software
===============================================================================

 CONTENTS
   1.  What RGFOSSIL is
   2.  The files
   3.  How it works (the big picture)
   4.  Installing
   5.  Setting up RGTEL (or Net2BBS)
   6.  RGFOSSIL.COM   - the FOSSIL driver
   7.  RGFOSSIL.DLL   - the FOSSIL engine
   8.  RGCOM.EXE      - the WinSock engine
   9.  RGFL.EXE       - dropfiles and Win32 doors (the NFU replacement)
  10.  Dropfile layouts written by RGFL
  11.  Complete examples
  12.  Moving from NetFoss
  13.  Troubleshooting
  14.  Technical reference (FOSSIL functions)


===============================================================================
 1. WHAT RGFOSSIL IS
===============================================================================

 DOS BBS software and DOS door games talk to the caller through a FOSSIL
 driver (INT 14h). On a real 1990s BBS the FOSSIL drove a modem. On Windows
 there is no modem - callers arrive by telnet - so something has to pretend
 to be a serial port and pass the bytes to a TCP socket.

 RGFOSSIL does exactly that. It is a switch-for-switch replacement for the
 NetFoss 1.26 package: the same design, the same command lines, the same
 batch file flow, so an existing NetFoss setup moves over by changing paths.

 Requirements
   * 32-bit Windows (XP / Vista / 7 / 8 / 10 32-bit) with NTVDM
   * A telnet server that passes the node number and the socket handle
     (RGTEL or Net2BBS)


===============================================================================
 2. THE FILES
===============================================================================

   RGFOSSIL.COM   DOS TSR, the FOSSIL driver itself
   RGFOSSIL.DLL   The FOSSIL engine, loaded into NTVDM
   RGCOM.EXE      WinSock engine - owns the socket
   RGCOM.INI      RGCOM settings (same keys as NETCOM.INI)
   RGFL.EXE       Dropfile converter / Win32 door launcher
   RGFOSSIL.BAT   Node batch file
   RGTEL.INI      Sample RGTEL configuration for RGFOSSIL


            Comparison

   NetFoss file     RGFOSSIL file
   ------------     -------------
   NETFOSS.COM      RGFOSSIL.COM
   NETFOSS.DLL      RGFOSSIL.DLL
   NETCOM.EXE       RGCOM.EXE
   NETCOM.INI       RGCOM.INI
   NFU.EXE          RGFL.EXE
   NF.BAT           RGFOSSIL.BAT


===============================================================================
 3. HOW IT WORKS
===============================================================================

   caller --telnet--> RGTEL --starts--> RGFOSSIL.BAT <node> <socket> ...
                                           
         1. RGFOSSIL.COM /N<node>            loads the FOSSIL into this
            (loads RGFOSSIL.DLL into NTVDM)  console's NTVDM
                                           
         2. RGCOM.EXE /N<node> /H<socket> TEL2RG.BAT ...
            - telnet setup with the caller
            - runs your BBS batch in the SAME console
            - socket  <--pipes-->  RGFOSSIL.DLL  <--INT 14h-->  BBS / doors
                                           
         3. RGFOSSIL.COM /U                  Unload when the BBS is done

 * The DOS side (the BBS, DOS doors) only ever sees an ordinary FOSSIL.
 * RGCOM owns the telnet socket. It passes bytes to and from RGFOSSIL.DLL
   through two named pipes, and handles the telnet protocol (IAC codes).
 * When a Win32 (DOOR32) door must run, RGFL asks RGCOM to start it. RGCOM
   owns the socket, so the door can use it directly; the pipes pause until
   the door exits, then everything carries on.
 * Everything is per node, so any number of nodes run side by side.


===============================================================================
 4. INSTALLING
===============================================================================

 1. Create D:\RGFOSSIL (any folder works; the batch file below assumes it)
    and copy all the RGFOSSIL files into it.

 2. Copy RGFOSSIL.DLL into C:\Windows\System32 as well.
    Use an administrator command prompt:

        copy /y D:\RGFOSSIL\RGFOSSIL.DLL C:\Windows\System32\

    NTVDM finds the DLL by its plain name (System32 first), exactly the way
    it finds NETFOSS.DLL. Keep both copies identical - when you update,
    copy the new DLL to BOTH places. A stale System32 copy is what
    actually runs.

 3. Edit D:\RGFOSSIL\RGFOSSIL.BAT if your folder is not D:\RGFOSSIL.

 4. Point your telnet server at RGFOSSIL.BAT (section 5).

 5. In your BBS setup, use a FOSSIL COM port (COM1 is fine) and any locked
    baud rate. The port number does not matter; each node is kept apart by
    the node number.

 Optional check (plain command prompt, no nodes running):

        cd /d D:\RGFOSSIL
        RGFOSSIL /N9          (prints nothing = loaded OK)
        RGFOSSIL /U           (prints nothing = unloaded OK)


===============================================================================
 5. SETTING UP RGTEL (OR NET2BBS)
===============================================================================

 RGTEL.INI - the lines that matter:

   Command=D:\RGFOSSIL\RGFOSSIL.BAT /N*N /H*H D:\BATCH\TEL2RG.BAT *N *H *I
   StartPath=D:\RGFOSSIL

   *N = node number     *H = socket handle     *I = caller IP

 The Command line is: launcher batch, then /N and /H for RGFOSSIL and
 RGCOM, then YOUR BBS batch and its parameters. Your BBS batch receives
 %1 = node, %2 = socket handle, %3 = IP.

 RGTEL also sets two environment variables for every node:
   SOCKET = the socket handle      NFNODE = the node number
 RGFL needs both. (Your batch may set them again - that is fine.)

 Node numbers are chosen by RGTEL, not by RGFOSSIL: normally the lowest
 free node. HighNodeIPs lists callers (for example the fTelnet web proxies)
 that are given the HIGHEST free node instead, so ordinary callers keep
 getting node 1, 2, 3 from the bottom up.

 Net2BBS works the same way; use its Command setting with *N and *H.


===============================================================================
 6. RGFOSSIL.COM - THE FOSSIL DRIVER
===============================================================================

 RGFOSSIL /N{value} [switches]
 Same switches as NETFOSS.COM. Letters may be upper or lower case, and "-"
 works in place of "/".

   /N{value}  Node number. Must match RGCOM's /N. Without /N, the NFNODE
              environment variable is used, then node 1.
   /C{value}  COM mode: talk to real serial port COM{value} instead of RGCOM
              (for a modem or a null-modem line).
   /L{value}  Locked baud rate, e.g. /L38400 or /L115200. Reported to
              programs by FOSSIL function 1Bh; in COM mode it also sets the
              real port speed.
   /S{value}  Slow output: pause 1 ms after every {value} characters.
              /S alone = every 64. Also makes idle status calls yield more
              often.
   /T{value}  I/O timeout: hang up if the caller types nothing for {value}
              minutes.
   /Z{value}  PDZmodem tweak (accepted for compatibility; reserved).
   /D{value}  DESQview time-slicing: emulate the DESQview API so programs
              that "give up time slices" the DESQview way release the CPU
              for {value} ms each time.
   /R         Allow COM release: FOSSIL de-init (05h) closes the real COM
              port so another program can open it (COM mode).
   /X         X00 kluge: X1 = on, X0 = off. When on, an empty receive (02h)
              returns the line status with the timeout bit (X00 style);
              when off it returns 8000h (NetFoss style).
   /I         DOS I/O: I1 = on, I0 = off. When on, plain DOS screen output
              (INT 29h) is also sent to the caller, and the caller's keys
              arrive through the BIOS keyboard (INT 16h). This lets
              non-FOSSIL DOS doors work.
   /F         Fake RIP reply: answer the RIP query (ESC[!) with
              RIPSCRIP015400 so programs believe the caller has RIP.
   /M         Modify: change the settings of the driver already loaded.
   /MR        Modify + reset: like /M, but first return the locked baud
              and slow/PDZ settings to their defaults.
   /U         Uninstall (unload). Refuses if another TSR has hooked the same
              interrupts since.
   /?         Show the switch list.

 Loading is silent. RGFOSSIL.COM prints nothing on success; it only prints
 on an error (or /?). Errorlevel: 0 = OK, 1 = error, 2 = not NTVDM,
 3 = usage shown.

 Error messages
   Can't load RGFOSSIL.DLL (error n) or D:\...\RGFOSSIL.DLL (error n)
        NTVDM would not load the DLL. See section 13.
        n: 1 = load failed, 2 = VDDDispatch missing, 3 = VDDInit missing,
           4 = out of memory / VDD table full
   Node in use            this node number is already loaded somewhere
   Can't open COM port    /C port missing or used by another program
   Can't create node pipes  another copy of this node is still running
   Not NT - ...           not running under Windows NTVDM
   RGFOSSIL is not installed   /U or /M with nothing loaded

 Examples
   RGFOSSIL /N1                    node 1, telnet mode
   RGFOSSIL /N2 /L115200           node 2, report 115200 baud
   RGFOSSIL /N3 /I1                node 3, DOS I/O for non-FOSSIL doors
   RGFOSSIL /N1 /T10               hang up after 10 idle minutes
   RGFOSSIL /N1 /D5                DESQview time-slicing, 5 ms per slice
   RGFOSSIL /N4 /C2 /L38400 /R     real COM2 at 38400, release on de-init
   RGFOSSIL /M /S32                change the loaded driver: slow output
   RGFOSSIL /MR                    back to default settings
   RGFOSSIL /U                     unload


===============================================================================
 7. RGFOSSIL.DLL - THE FOSSIL ENGINE
===============================================================================

 RGFOSSIL.DLL is an NTVDM "virtual device driver". RGFOSSIL.COM loads it
 into NTVDM; every FOSSIL call a DOS program makes is handed to it.

 * Keep it in C:\Windows\System32 AND next to RGFOSSIL.COM. RGFOSSIL.COM
   loads it by plain name first (System32) and uses its own folder only as
   a fallback.
 * It needs nothing unusual: only kernel32, user32 and oleaut32.
 * Idle behaviour copies NetFoss: reads and peeks never sleep, and the
   status call sleeps 10 ms once every 4000 idle calls (400 with /S). DOS
   programs that poll in a loop therefore run at full speed - RIP and ANSI
   detection finish instantly - at the cost of CPU while they poll.


===============================================================================
 8. RGCOM.EXE - THE WINSOCK ENGINE
===============================================================================

 RGCOM [/N<node>] [/H<handle>] [/C] [/D<n>] [/B<n>] <command line>
 Same switches as NETCOM.EXE.

   /N<node>     node number (must match RGFOSSIL.COM /N)
   /H<handle>   the telnet socket handle from the server (*H)
   /H-          no socket: local mode, just run the command
   /C           no socket: COM port mode, just run the command
   /D<n>        write delay (same as writedelay= in RGCOM.INI)
   /B<n>        largest block sent at once (same as BufferMax=)
   /S /W        accepted for NETCOM compatibility, ignored

 <command line> is the program or batch to run - normally your BBS batch
 and its parameters. A .BAT or .CMD is run through the command interpreter
 (COMSPEC), so the DOS programs in it share this console and the NTVDM
 where RGFOSSIL is loaded.

 With neither /N nor /H, the node and handle are read from DOOR32.SYS in
 the current directory (line 1 = type, 2 = handle, 11 = node).

 What RGCOM does
   1. Sends the telnet setup NetCom sends: WILL ECHO, DONT ECHO,
      WILL/DO BINARY, WILL/DO SGA. No banner - the caller sees nothing.
   2. Connects to RGFOSSIL.DLL's pipes for the node.
   3. Starts <command line>.
   4. Passes data both ways. From the caller, telnet commands are removed
      and IAC IAC becomes FFh; every other byte (CR, LF, NUL ...) passes
      untouched, so Zmodem and other binary transfers work. To the caller,
      FFh is doubled.
   5. Stops when the BBS exits, the caller disconnects, the BBS drops DTR
      (hang up), or a file STOPNODE.<node> appears in RGCOM's folder
      (e.g. STOPNODE.2 hangs up node 2).
   6. After a hang-up it waits for the BBS to finish its logoff (or kills
      it after ForceClose= seconds), then exits.
   It also runs Win32 doors for RGFL (section 9).

 RGCOM.INI (next to RGCOM.EXE)
   [Settings]
   non-blocking=1   1 = non-blocking socket (default), 0 = blocking,
                    2 = leave the socket as the server gave it
   writedelay=0     ms to pause after each block sent to the caller
   writedelay2=0    ms to pause when a send had to be split (BufferMax)
   BufferMax=2048   largest block sent at once (bytes, up to 8192)
   ForceClose=0     after the caller drops, kill the BBS if it is still
                    running after this many seconds (0 = wait forever)

 Error messages
   Invalid Socket Handle     /H value is not a live socket
   Node already in use       another RGCOM is running this node
   RGCOM can not communicate with RGFOSSIL (load RGFOSSIL.COM /N<n> first)
                             RGFOSSIL.COM for this node was not loaded
   Can't find RGFOSSIL       the DLL's pipes did not answer
   Error executing external application   <command line> could not start
   No Command Line.          nothing to run


===============================================================================
 9. RGFL.EXE - DROPFILES AND WIN32 DOORS (THE NFU REPLACEMENT)
===============================================================================

 RGFL does three jobs for a DOS BBS:
   * Creates DOOR32.SYS from the BBS's DOOR.SYS, so Win32 doors can run.
   * Launches a Win32 (DOOR32) door and waits for it to finish.
   * Converts DOOR.SYS to DORINFO1.DEF or CHAIN.TXT, or rewrites DOOR.SYS
     for local mode.
 Same parameters as NFU.EXE, so door menu entries only change NFU -> RGFL.

 SYNTAX

   RGFL <path to DOOR.SYS> ["door command line"] [options]

   <path to DOOR.SYS>   the FOLDER holding DOOR.SYS (not the file name).
                        "." = current folder.
                        NULL = don't read or write any dropfile, just launch.
   "door command line"  the Win32 door and its parameters, IN QUOTES.
                        Leave it out to only create the dropfile.

   Shortcuts inside the door command line:
     $   is replaced by the dropfile folder, with a trailing backslash
     ^   is replaced by the full path of DOOR32.SYS

 OPTIONS

   /C      Create CHAIN.TXT only (WWIV format) instead of DOOR32.SYS
   /D      Create DORINFO1.DEF only instead of DOOR32.SYS
   /M      Only modify DOOR.SYS (rewrite it for local mode - see below)
   /L      Local mode: COM0: and 0 baud in the DOS dropfile. With nothing
           else, rewrites DOOR.SYS. Also works with /C and /D.
   /H      Use the user's handle (alias) instead of the real name
   /Q      Quiet: only error messages
   /R      RIP enable: if DOOR.SYS says RIP, pass RIP on (emulation 3).
           Without /R, a RIP caller is treated as ANSI.
   /YN     Answer a Win32 door's "use ANSI?" question automatically:
           sends Y, or N for a non-ANSI caller
   /K="x"  Type keys into the door when it starts. Macros:
             |   Enter
             !N  user's real name   (!R also works)
             !A  user's alias
             !P  user's password
           Macros are case sensitive.

 ENVIRONMENT (set by RGTEL/Net2BBS, or in your batch)
   SOCKET   Socket handle - written into DOOR32.SYS line 2. Required when
            creating DOOR32.SYS.
   NFNODE   Node number - tells RGFL which node's RGCOM to ask to launch
            the door. Required when launching.

 WHAT HAPPENS WHEN A WIN32 DOOR IS LAUNCHED
   1. RGFL writes DOOR32.SYS (unless NULL).
   2. It replaces $ and ^ in the command line.
   3. It sends the command line and the current folder to the RGCOM of
      node %NFNODE%.
   4. RGCOM pauses the FOSSIL pipes and starts the door in the same console
      window, with the socket available to it.
   5. /YN and /K keys are typed into that console.
   6. RGFL waits. When the door exits, RGCOM resumes the pipes and RGFL
      returns to the BBS.

 MESSAGES
   <file> created.            Dropfile written
   <file> altered.            DOOR.SYS rewritten (/M or /L)
   Attempting to launch: ...  Door being started
   RGFL has completed.        Door finished

 Errors (RGFL beeps 3 times, waits, and exits with errorlevel 1):
   RGFL Error: File Not Found: <path>DOOR.SYS
   RGFL Error: Environment Variable %SOCKET% not found!
   Warning:RGFL failed to find %NFNODE% environment variable.
   Door32 command line is aborted.     (no NFNODE, so no launch)
   Invalid Node Number                 NFNODE missing or not 1-3 digits
   RGFL Error: Can't find RGCOM        RGCOM for that node isn't running
   RGFL Error: File Not Found!         the door program couldn't be started
   RGFL Error: Failed to create / Can't write to <file>

 EXAMPLES

   Create DOOR32.SYS in the node folder and run a Win32 door:
     RGFL C:\RG\NODE1 "D:\DOORS\GAME32\GAME32.EXE /N1"

   Current folder, and hand the door the DOOR32.SYS path with ^:
     RGFL . "D:\DOORS\WORDLE\WORDLE.EXE -D^"
     -> WORDLE.EXE -DC:\RG\NODE1\DOOR32.SYS

   Door that wants the dropfile FOLDER, using $:
     RGFL C:\RG\NODE1 "D:\DOORS\LORD32\LORD32.EXE -P$"
     -> LORD32.EXE -PC:\RG\NODE1\

   Only create DOOR32.SYS (a door that finds it by itself):
     RGFL C:\RG\NODE1

   Door that asks "Use ANSI? (Y/N)" - answer it automatically:
     RGFL . "D:\DOORS\BAT32\BAT32.EXE" /YN

   Type the user's name and Enter at the door's login prompt:
     RGFL . "D:\DOORS\GAME32\GAME32.EXE" /K="!N|"

   Name, Enter, password, Enter:
     RGFL . "D:\DOORS\GAME32\GAME32.EXE" /K="!N|!P|"

   Use the handle instead of the real name:
     RGFL . "D:\DOORS\GAME32\GAME32.EXE" /H

   Pass RIP through for RIP callers:
     RGFL . "D:\DOORS\RIPGAME\RIPGAME.EXE" /R

   Quiet (no messages on the caller's local screen):
     RGFL . "D:\DOORS\DARK32\DARK32.EXE" /Q

   Launch without touching any dropfile (the door makes its own):
     RGFL NULL "D:\DOSBOX\DOSBOXDOOR.BAT"

   Convert for a DOS door that wants DORINFO1.DEF:
     RGFL C:\RG\NODE1 /D
     D:\DOORS\OLDGAME\OLDGAME.EXE C:\RG\NODE1\DORINFO1.DEF

   Convert for a WWIV-style door that wants CHAIN.TXT:
     RGFL C:\RG\NODE1 /C

   Local (sysop) play - rewrite DOOR.SYS to COM0:/0 baud:
     RGFL C:\RG\NODE1 /L
   Local DORINFO1.DEF / CHAIN.TXT:
     RGFL C:\RG\NODE1 /D /L
     RGFL C:\RG\NODE1 /C /L

   As a door menu command line (DOOR.SYS written to the node folder by the
   BBS), the whole entry is simply:
     D:\RGFOSSIL\RGFL C:\RG\NODE%1 "D:\DOORS\DARK32\DARK32.EXE /N%1"


===============================================================================
 10. DROPFILE LAYOUTS WRITTEN BY RGFL
===============================================================================

 "DS n" means line n of the BBS's DOOR.SYS.
 Name = DS 10 (real name), or DS 36 (handle) with /H.

 DOOR32.SYS                         DORINFO1.DEF
  1  2  (telnet)                     1  RGFossil (BBS name)
  2  %SOCKET%                        2  sysop first name (DS 35)
  3  baud (DS 2)                     3  sysop last name  (DS 35)
  4  RGFossil (BBS ID)               4  COM port (DS 1, no ':'), or COM0
  5  user record # (DS 26)           5  "<DS 5> BAUD-R,N,8,1",
  6  Name                               or "0 BAUD-R,N,8,1" with /L
  7  handle (DS 36)                  6  0
  8  security level (DS 15)          7  user first name (Name)
  9  minutes left (DS 19)            8  user last name  (Name)
 10  emulation: 0 ASCII, 1 ANSI,     9  location (DS 11)
     3 RIP (only with /R)           10  emulation (0/1/3)
 11  node (DS 4)                    11  security level (DS 15)
                                    12  minutes left (DS 19)

 CHAIN.TXT (WWIV, 32 lines)
  1 user # (DS 26)    2 alias (DS 36)      3 Name        4 Tango
  5 18                6 M                  7 DS 42       8 last on (DS 17)
  9 80               10 lines (DS 21)     11 SL (DS 15) 12 0
 13 0                14 emulation         15 1 (0 with /L)
 16 seconds left (DS 18)  17 C:\WWIV\GFILES\  18 C:\WWIV\DATA\
 19 bbs.log          20 baud (DS 2, 0 with /L)
 21 COM port number (0 with /L)            22 RGFossil
 23 sysop (DS 35)    24 0                 25 0
 26 upload K (DS 48) 27 uploads (DS 28)   28 download K (DS 49)
 29 downloads (DS 29)          30 8N1     31 COM speed (DS 5)
 32 node (DS 4)

 DOOR.SYS with /M or /L: line 1 COM0:, line 2 0, line 10 Name, every other
 line unchanged.

 Differences from NFU 1.26 (deliberate):
   * "RGFossil" where NFU writes "NetFoss".
   * CHAIN.TXT: NFU leaves out line 21, shifting every later field by one.
     RGFL writes all 32 lines.
   * DORINFO1.DEF with /H and a one-word handle: NFU writes a garbage line.
     RGFL writes an empty last name.
   * /K really types the keys (NFU 1.26 accepts /K but never sends them).


===============================================================================
 11. COMPLETE EXAMPLES
===============================================================================

 --- RGFOSSIL.BAT (the node launcher, included) ---------------------------

   @echo off
   d:\rgfossil\rgfossil.com %1
   if errorlevel 1 goto loadfail
   d:\rgfossil\rgcom.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
   d:\rgfossil\rgfossil.com /u
   goto end
   :loadfail
   echo.
   echo RGFOSSIL did not load for node %1 - see the message above.
   timeout /t 15
   :end

   RGTEL runs it as:
     RGFOSSIL.BAT /N1 /H228 D:\BATCH\TEL2RG.BAT 1 228 73.174.148.143
   so %1 = /N1 and %2 = /H228 go to RGFOSSIL.COM and RGCOM, and RGCOM runs
   "D:\BATCH\TEL2RG.BAT 1 228 73.174.148.143".

 --- A BBS batch (TEL2RG.BAT style) -----------------------------------------

   @ECHO OFF
   SET SOCKET=%2
   SET NFNODE=%1
   CD\RENEGADE
   RENEGADE -B57600 -Q -N%1 -IP%3 -T
   IF ERRORLEVEL 2 GOTO NEW_MAIL
   GOTO END
   
   :NEW_MAIL
   RENEMAIL -S -A
   GOTO END   

   :END

 --- A local test without a caller ------------------------------------------

   From a plain command prompt:
     D:\RGFOSSIL\RGFOSSIL.BAT /N1 /H- D:\BATCH\TEL2RG.BAT 1 0 127.0.0.1
   /H- runs the batch in local mode, so any error stays on screen.

 --- A real COM port / modem node ------------------------------------------

   d:\rgfossil\rgfossil.com /N5 /C1 /L38400 /R
   d:\rgfossil\rgcom.exe /N5 /C C:\RG\RENEGADE.EXE -N5
   d:\rgfossil\rgfossil.com /u

 --- Hanging up a node from outside ---------------------------------------

   echo x > D:\RGFOSSIL\STOPNODE.2        (hangs up node 2)


===============================================================================
 12. MOVING FROM NETFOSS
===============================================================================

 1. Install as in section 4.
 2. In RGTEL.INI / Net2BBS change
      D:\NETFOSS\NF.BAT        ->  D:\RGFOSSIL\RGFOSSIL.BAT
      StartPath=D:\NETFOSS     ->  StartPath=D:\RGFOSSIL
    Keep the rest of the Command line (/N*N /H*H yourbatch *N *H *I).
 3. In door menus and batches change NFU -> D:\RGFOSSIL\RGFL.
    Parameters stay the same.
 4. If you used NETCOM.INI, copy its [Settings] into RGCOM.INI.
 5. NETFOSS.DLL can stay in System32; it doesn't interfere.

 Behaviour kept from NetFoss on purpose, even where it differs from the
 FOSSIL specification:
   * Receive (02h) returns 8000h at once when nothing is waiting, instead
     of waiting. Doors written for NetFoss rely on this.
   * Idle pacing (section 7).
   * Unknown function numbers return 1954h.
   * Port number DX=00FFh ("no port") is ignored except by init.

 Differences:
   * The pipes, events and mailslots use rgfossil_* names, so an RG node and
     a NetFoss node can run side by side - but RG and NetFoss parts cannot
     be mixed on one node (e.g. NETFOSS.COM + RGCOM).
   * NetSpy / Net2Mon (NetFoss sysop tools) do not see RG nodes.
   * No green banner line is sent to the caller.
   * RGFL dropfile differences are listed in section 10.


===============================================================================
 13. TROUBLESHOOTING
===============================================================================

 The node window flashes and closes / the caller is dropped at once
   RGFOSSIL.BAT keeps the window open 15 seconds when RGFOSSIL.COM fails.
   Read the message there, or run the local test in section 11.

 "Can't load RGFOSSIL.DLL (error 1) ..."
   * Copy RGFOSSIL.DLL into C:\Windows\System32 (administrator prompt).
   * Make sure no ntvdm.exe from an old node is still running (Task
     Manager); a running NTVDM keeps the old DLL locked, so the copy fails.
   * Run RGDIAG and RGVDDT (section 14).

 "Node in use" / "Node already in use"
   An earlier session of that node is still running. Close its window, or
   end the leftover ntvdm.exe / RGCOM.EXE in Task Manager.

 RGTEL log says "Spawn FAILED"
   The first path in Command= is wrong - it must be RGFOSSIL.BAT, followed
   by your BBS batch (section 5).

 A door pauses for seconds at "Checking for RIP" / ANSI detection
   Make sure RGFOSSIL.COM and the System32 RGFOSSIL.DLL are current - early
   versions slept on every poll. /F makes the driver answer RIP queries
   itself if a door still waits.

 The node window does not close after logoff
   Press Ctrl+C in it. "Terminate batch job?" means the batch was still
   running something; otherwise RGCOM or /U is waiting. Report which.

 Callers get node 2 while node 1 looks free
   RGTEL chooses node numbers. An fTelnet caller holding RGTEL node 1 makes
   the next caller node 2. Use HighNodeIPs= in RGTEL.INI (section 5).

 A Win32 door says "RGFL Error: Can't find RGCOM"
   NFNODE is not set, or is set to a different node than the one RGCOM is
   running. Echo it in your batch:  ECHO NFNODE=%NFNODE%

 A non-FOSSIL DOS door shows output only locally
   Load RGFOSSIL with /I1 (DOS I/O).



===============================================================================
 14. TECHNICAL REFERENCE
===============================================================================

 FOSSIL functions (INT 14h, AH = function)
   00h  set baud rate (ignored if locked; returns status)
   01h  send character, wait
   02h  receive character: AL = char, or AX = 8000h if none waiting
   03h  status: AH bit0 data waiting, bit5/6 output empty;
                AL bit7 carrier detect
   04h  initialise: returns AX = 1954h, BX = 051Bh
   05h  de-initialise
   06h  DTR: AL = 0 drops DTR (hangs up the caller)
   07h  timer info: AL = 08h, AH = 18 ticks/s, DX = 55 ms
   08h  flush output        09h  purge output      0Ah  purge input
   0Bh  send character, no wait (AX = 1)
   0Ch  peek: AL = next char, or AX = FFFFh
   0Dh  keyboard peek       0Eh  keyboard read
   0Fh  flow control (accepted)
   10h  ^C/^K checking: AX = 1 if ^C/^K arrived since last call
   11h  set cursor          12h  get cursor
   13h  write char (DOS)    14h  watchdog (ignored)
   15h  write char (BIOS)   16h  timer chain (not supported, FFFFh)
   17h  reboot (ignored)
   18h  read block: ES:DI buffer, CX max -> AX bytes read
   19h  write block: ES:DI buffer, CX count -> AX bytes written
   1Ah  break on/off
   1Bh  driver info: 19-byte structure to ES:DI
   1Ch-1Fh  X00 extensions (same as 04h, 05h, 00h, 03h)
   20h  read character, no wait (NetFoss)
   21h  put character into the input buffer (NetFoss)
   23h  sleep AL ms (NetFoss)
   other  AX = 1954h
 The INT 14h entry carries the standard FOSSIL signature 1954h at offset 6
 and the highest function (1Bh) at offset 8.

 Other interrupts
   INT 2Fh AX=1680h   Windows/DPMI idle -> releases the time slice (always)
   INT 15h, INT 21h 2B01h, INT 10h FEh   DESQview API (with /D)
   INT 29h, INT 16h   DOS I/O (with /I1)

===============================================================================
