BBS: Inland Empire Archive Date: 11-13-92 (08:07) Number: 352 From: BOB SEWELL Refer#: NONE To: OLIVIER MASSE Recvd: NO Subj: Leaving the Com open Conf: (2) Quik_Bas
Hi, Olivier Masse,
In discussing Leaving the Com open with All, you said:
OM> Is there anybody out there who could tell me how I could leave a
OM> compiled basic program whitout the Communications port being closed?
OM> I'm writing a BBS utility and this gives me problems :)..
The easiest way is to forget about QB's built-in comm routines and program
straight to the FOSSIL driver via CALL INTERRUPT (&H14, inreg, outreg). This
way you don't have to worry about port numbers, addresses, baud rates, and
the hang-up problem QB has when closing the comm file. To learn about fossil
routines, download the X00 fossil driver from a BBS. It contains a doc file
listing all the functions.
On the other hand, if you insist on sticking with QB's OPEN COM: routines,
you'll need to patch it using DEBUG. Here's the scoop:
Make sure you have back-up copies of BCOM45.LIB and BRUN45.EXE, and that
DEBUG.COM is in your DOS path. Change into your QB45 subdirectory and
perform the following steps.
First, let me explain my notation. The "-" is the command prompt displayed
by debug. Anything following the prompt is what you should type at this
prompt, and should be followed by a carriage-return, signified by <Enter>.
Also, anything in lower-case is typed by you; anything shown in upper-case
will be what debug puts on your screen. Explanations are in parenthesis.
BCOM45.LIB DTR Patch:
C:\QB45> debug bcom45.lib
-s cs:0 ffff b0 00 e3 01 <Enter>
XXXX:1529 (the XXXX is an insignificant number)
-u 1529 <Enter>
MOV AL,00
JCXZ 152E
INC AX
ADD DX,+04
OUT DX,AL (This is where DTR is dropped)
-a 1529 <Enter>
mov al,01 <Enter>
<Enter>
-a 152d <Enter>
nop <Enter> (changes this to a no-operation instruction)
<Enter>
-u 1529 <Enter> (redisplays code to verify your change)
MOV AL,01
JCXZ 152E
NOP
ADD DX,+04
OUT DX,AL (now the OUT command will not drop carrier)
-w <Enter> (save your changes)
Writing 35EF7 bytes
-q <Enter> (quits debug)
----
BRUN45.EXE DTR Patch:
C:\QB45> ren brun45.exe brun45.x (rename file. debug won't work on .exe's)
C:\QB45> debug brun45.x
-s cs:0 ffff b0 00 e3 01 <Enter>
XXXX:9E78 (the XXXX is an insignificant number)
-u 9e78 <Enter>
MOV AL,00
JCXZ 9E7D
INC AX
ADD DX,+04
OUT DX,AL (This is where DTR is dropped)
-a 9e78 <Enter>
mov al,01 <Enter>
<Enter>
-a 9e7c <Enter>
nop <Enter> (changes this to a no-operation instruction)
<Enter>
-u 9e78 <Enter> (redisplays code to verify your change)
MOV AL,01
JCXZ 152E
NOP
ADD DX,+04
OUT DX,AL (now the OUT command will not drop carrier)
-w <Enter> (save your changes)
Writing 12E80 bytes
-q <Enter> (quits debug)
C:\QB45> ren brun45.x brun45.exe
That's all folks!
Source is from a file called FIXDTR45.TXT, found inside the QUICKDOR.LZH
QB door-writing library. It all originates from info from Kenny Gardner of
GAP Developement Co.
... Tag line thievery ... On the next Geraldo!
--- Blue Wave/Opus v2.10 [NR]
* Origin: Strawberry Fields (1:116/5.0)

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