home *** CD-ROM | disk | FTP | other *** search
-
- January 14, 1989
-
-
- 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
-
-
- Any questions may be addressed to :
-
- Kenny Gardner
- The Crow's Nest BBS
- (714)493-3819
-
- CIS : 76054,210
- Genie : K.L.Gardner
-
-