Category : BASIC Source Code
Archive   : QB45DTR.ZIP
Filename : QB45DTR.PAT
----------------------------
QuickBasic 4.5 is the first version QuickBasic not to drop DTR after
terminating. Unfortunately, it does still drop DTR on some computers and
some modems. The following patch was provided by Kenny Gardner, The Crow's
Nest BBS, (714) 493-3819.
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 :
RBBS-PC CPC17-2A Page 274
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
RBBS-PC CPC17-2A Page 275
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
RBBS-PC CPC17-2A Page 276
Debug should show :
Writing 12E80 bytes
Now type Q and you are finished patching BRUN45.X
Rename BRUN45.X back to BRUN45.EXE
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/