home *** CD-ROM | disk | FTP | other *** search
- // BGFTDXTL.SLT: Telix script for BGFT Xmodem-CRC or 1K download.
- // Support Package for Registered Users of BGFT (TM).
- // Copyright 1990-1991 Dirac Systems.
- // Telix is a trademark of Exis Inc.
-
- // MANUAL INSTALLATION:
- // The following outlines how to install the script for use as an
- // external protocol in Telix:
- // Be sure that the resident part (BGFT360K.COM or BGFT720K.COM) of
- // BGFT is loaded before the communications program. Add /B if
- // you want Drive B:. The BGFT status window does not need to be
- // active; it need only be resident.
- // The batch file BGFTINIT.BAT is used to initialize BGFT prior to
- // running Telix. This file must be edited to contain information
- // about your modem's port number and baud rate prior to use
- // (default is 1200 baud, port 1). You must run the batch file
- // BGFTINIT.BAT to make sure that BGFT is set up properly. THIS
- // MUST BE DONE before using BGFT as an external protocol under
- // Telix. This is true even though the baud and port are set here.
- // Put the right sized floppy (.720, 1.2, or 1.44 Megabyte DOS
- // formatted, no errors for BGFT720K.COM ; the above or 360K DOS
- // formatted, no errors for BGFT360K.COM) into the desired floppy
- // drive. The floppy size must correspond to the drive type.
- // Compile the BGFTDXTL.SLT by using the Telix compiler, CS, viz.
- // CS BGFTDXTL
- // This will produce BGFTDXTL.SLC for use in Telix.
- // From terminal mode do 'Alt_O' for 'Configure Telix'.
- // Choose 'Protocol Options'.
- // 'Change which setting?': Choose one of the four external protocol
- // options: A, B, C, or D.
- // Key: When in the download operation, pressing this key will choose
- // the protocol. The key should not be used elsewhere, eg. X (Xmodem).
- // Choose 'B', for example. It will be highlighted for the Telix
- // download operation.
- // Protocol name: This is what will show up in the list of protocols when
- // you choose the download operation. Call it, 'BGFTXmdm'.
- // Upload file name: For this example, leave it blank.
- // Download file name: Enter, BGFTDXTL. This will be the compiled script.
- // BAT or Script: Choose 'Script' since BGFTDXTL.SLT is a script.
- // DL name: Choose 'Y' for yes since you want Telix to pass the name of the
- // file to the script. The script will get rid of Telix's download
- // directory since BGFT only wants to put the filename on the floppy.
- // ESC out of the screen and save the set up to disk by hitting 'W'. This
- // get you back into Telix terminal mode.
- // Download as you normally would (PgDn); tell the host to send via Xmodem-CRC.
- // If being used for Xmodem-1K, BGFT will determine the correct packet.
- // Choose the BGFTXmdm protocol using arrows plus an ENTER or by the Key
- // defined above.
- // The script will give some messages, start the background transfer, and
- // exit Telix. You will be at the DOS prompt.
- // You should see the BGFT window indicate normal transmission.
- // Now you can do your work in foreground as the file is downloaded in
- // background.
- // After completion you can use BGFT.EXE to move your files to some DOS
- // directory. The files are ready to use.
- // Use BGFTOPT /3<Pathname> to dump downloaded files from the file buffer
- // to a specified directory.
- //
-
-
- str command[80]; // Command string for BGFTOPT.
- str temp[80]; // Temporary concatenation string.
- int downdirlen; // Telix download drive:directory str length.
- int extfilelen; // Telix external file maximum str length.
-
- // The command we will issue to DOS is:
- // BGFTOPT /q /a /r# /b# /~1 /dFn /s
- // where:
- // /q - quiet mode (don't printout results)
- // /a - acknowledge any error that may be present
- // /r# - select port # (eg. /r1)
- // /b# - select baud # (eg. /b2400)
- // /~1 - select protocol 1 (Xmodem-CRC and Xmodem-1K download)
- // /dFn - set download filename Fn (eg. test.tst)
- // /s - start the transfer
-
- main()
- {
- command = "/q"; // Start command line.
- strcat(command," /a"); // Acknowledge any error.
- strcat(command," /r");
- itos(get_port(),temp); // Find out where we are connected.
- strcat(command,temp); // Reconnect existing comm port.
- strcat(command," /b");
- itos(get_baud(),temp); // Find out what is the baud rate.
- strcat(command,temp); // Set baud rate for resident.
- //
- // BGFT requires a filename from Telix.
- //
- strcat(command," /d"); // Set up download.
- downdirlen = strlen(_down_dir); // Get unwanted Telix dnld directory.
- extfilelen = strmaxlen(_ext_filespec); // Get maximum length of Telix file.
- substr(_ext_filespec,downdirlen,extfilelen,temp); // Shave off dnld dir.
- strcat(command,temp); // Put BGFT filename in '/e' command.
- //
- // Xmodem-CRC or Xmodem-1K Download
- //
- strcat(command," /~1"); // This protocol is Xmodem-CRC.
- // // Good for Xmodem-1K too.
- strcat(command," /s"); // Start to send file.
- prints(command); // Tell user the command string.
- run("bgftopt.exe",command,2);
- exittelix(0,0); // Leave Telix; don't hangup line.
- } // Now enjoy background Xmodem dnld.
-