Re: Calculate Baud rate

 BBS: Inland Empire Archive
Date: 09-17-93 (02:49)             Number: 44
From: ARNIE SOSSNER                Refer#: NONE
  To: NINO FAGAN                    Recvd: NO  
Subj: Re: Calculate Baud rate        Conf: (2) Quik_Bas
 NF> Roel Sarceno wrote
 NF> 嬪様様様様様様様様様様様様様様様
 >Can somebody teach me how to calculate the amount of time required to
 >download a file using PDS or Quick Basic.  I know the file size and
 >the current baud rate. I need it in the format of HH:MM:SS.
 NF> 塒様様様様様様様様様様様様様様様

 NF> Roel,
 NF> This is a bat file that call Basic that I use:

Wow! I've been DOSing and BASICing since DOS 3.1.  Same for reading PC Mag
and other PC magazines.  This is the first time I've seen a BAT file with
BASIC code and a call to BASIC.  I don't see a whole lot of reason to do
it but it's nice to see that it can be done.  I mean, why not write the
whole thing in BASIC.  The current BASICs can handle command line parms.
[not sure about the old BASICs.]

I couldn't help twiddling with your code.  I added SYSTEM so BASIC ends
automatically.  I swapped the two output results so both the command line
and the result line ends with money.  I changed the English in the help
information; I've been a technical writer for most of my life and I can't
stand output that doesn't have all the capital letters and spelling correct.
(Not that I'm purfect. :-) )   And I erase the BAS file when done.

Here is my version of your ESTIME.BAT file:

  @echo off
  if .%1==. goto syntax
  set pr=%3
  if .%3==. set pr=6
  ECHO x=(((%1/%2)/60)):y=(x/60*%pr%):PRINT USING " ###.#";x;:_
    PRINT " Min; ";:PRINT USING "$##.## ";y > c:\temp\estime.bas
  QBASIC /RUN c:\temp\estime.bas
  ERASE c:\temp\estime.bas
  goto end
  echo Purpose: EStimate TIME to send a file to or receive a file from a BBS.
  echo Syntax:  ESTIME nnnnnn cps [cost]
  echo    where nnnnnn is the number of bytes in the file to be up/downloaded.
  echo          cps    is the usual cps for the BBS.
  echo          cost   is the cost per hour.  The default
cost is $6.00 per hour.
  echo Example: ESTIME 543210 238 6.60
  echo Result:  The number of minutes required and their cost.

... Do you put your BAT files in the C:\CAVE directory?
--- Blue Wave/Max v2.10 [NR]
 * Origin: PDN HQ (914)344-0350 HST/DS 343-7540 V32bis (1:272/38.0)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET