Brun 45 1/2

 BBS: Inland Empire Archive
Date: 02-23-93 (21:26)             Number: 391
From: TOM HAMMOND                  Refer#: NONE
  To: RON HAMMER                    Recvd: NO  
Subj: Brun 45               1/2      Conf: (2) Quik_Bas
RH>When I write comm programs, I have to use Brun45 to prevent
   Basic from dropping carrier after it exits.  Is there a way I can
   make a stand alone Exe file. Is there a patch for BRUN45.EXE to solve
   the carrier problem?

Sorry, I don't seem to have the author of this article anymore. But it
should work.

I'll also include (at the end) another possible solution you might want
to consider...

Good luck - Tom Hammond

Microsoft's solution to 'fixing' the DTR drop problem with QB 4.5
when closing the communications port by outputing a 3 to the
modem status register, is not a sound or reliable solution.

Many modems simply respond too quickly to the loss of DTR.

The correct solution is to of course not turn DTR off in the
first place.  However, after many years and many versions of
Quick Basic, it is apparent that Microsoft either does not listen
to its customers or they simply do not care.

Sound programming practices dictate that when you directly manipulate
a hardware port, you restore that port to the exact same conditions
it had prior to your touching it.  In the case of DTR, this means
that if DTR were ON when the QB program loaded, then DTR should
remain ON when the QB program ends.  If DTR was OFF when the program
loaded, then fine, turn it OFF when the program ends.

To the end that it is an ongoing struggle to get Microsoft to listen
to the needs of the programmer, the following patches are provided
to enable you to patch your copies of BRUN45.EXE and BCOM45.LIB.

Before beginning, make sure you have backup copies of BRUN45.EXE
and BCOM45.LIB.

  |  NOTE:  It is assumed that each line which you will be          |
  |         instructed to enter manually will be terminated by      |
  |         pressing the [Enter] key.  In the instructions to       |
  |         follow, lines which are shown as "[Enter]" indicate     |
  |         that you are to press the [Enter] key with NO other     |
  |         entry on that line (e.g.  a blank line).                |
  |                                                                 |
  |         When you enter certain commands (e.g. "a 1529"), debug  |
  |         will display a 9-character address (e.g. 09E5:1529)     |
  |         and the cursor will be placed to the right of the       |
  |         address, ready for you to enter your changes to the     |
  |         code for that line.  Enter whatever changes are         |
  |         required and press [Enter] to terminate the command.    |


With Debug in a DOS path, type :

  debug bcom45.lib

Type :

  s cs:0 ffff b0 00 e3 01

Debug should show :


  where xxxx can be any number depending upon where Debug loaded the
  program into memory.  In any case, the number is not important.

Type :

  u 1529

Debug should show :

  MOV   AL,00
  JCXZ  152E
  INC   AX
  ADD   DX,+04

This is where QB graciously resets the comm port to parameters it thinks
the comm port should have.

To fix the problem, Type :

  a 1529

  mov   al,01

  a 152d


  where [Enter] is the Enter key (do not type the characters)!

To verify that you typed everything correctly, Type

  u 1529

Debug should show :

  MOV   AL,01
  JCXZ  152E
  ADD   DX,+04

To save the corrections Type :


Debug should show :

  Writing 35EF7 bytes

Now type Q and you are finished patching BCOM45.LIB


First, rename BRUN45.EXE to BRUN45.X

With Debug in a DOS path, type :

  debug BRUN45.X

Type :

  s cs:0 ffff b0 00 e3 01

Debug should show :
>>> Continued to next message
 * Origin: Night Shift BBS (314)635-7588 HST 14.4 (1:289/15)
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