BBS: Inland Empire Archive Date: 04-10-92 (22:04) Number: 13 From: TRENT SHIRLEY Refer#: NONE To: JIM TANNER Recvd: NO Subj: Re: Exiting a door Conf: (2) Quik_Bas
Here is the patch as it was posted on this base before. You should be able to follow the directions and patch the files yourself. Alternatively, you can get a copy of the BASWIZ library and use those com routines. They are allready set to NOT drop carrier unless you say to. They work very well. ************************************************************ ****************** SUBJECT: 4.5 DTR patch 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. BCOM45.LIB DTR Patch -------------------- With Debug in a DOS path, type : debug bcom45.lib Type : s cs:0 ffff b0 00 e3 01 Debug should show : xxxx:1529 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 OUT DX,AL 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 [Enter] a 152d nop [Enter] 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 NOP ADD DX,+04 OUT DX,AL To save the corrections Type : w Debug should show : Writing 35EF7 bytes Now type Q and you are finished patching BCOM45.LIB BRUN45.EXE DTR Patch -------------------- 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 : xxxx:9E78 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 9e78 Debug should show : MOV AL,00 JCXZ 9E7D INC AX ADD DX,+04 OUT DX,AL This is where QB graciously resets the comm port to parameters it thinks the comm port should have. To fix the problem, Type : a 9e78 mov al,01 [Enter] a 9e7c nop [Enter] where [Enter] is the Enter key (do not type the characters)! To verify that you typed everything correctly, Type u 9e78 Debug should show : MOV AL,01 JCXZ 9E7D NOP ADD DX,+04 OUT DX,AL To save the corrections Type : w Debug should show : Writing 12E80 bytes Now type Q and you are finished patching BRUN45.X Rename BRUN45.X back to BRUN45.EXE The ever powerful Code View debugger was used to to find these addresses by tracing a QB program which had but two statments : OPEN com port CLOSE com port ************************************************************************ Hope that helps. Later. Trent --- * Origin: The Owl's Domain (413) 582-1844 (1:321/118)
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