Darkstar!

 BBS: Inland Empire Archive
Date: 10-26-92 (09:21)             Number: 335
From: JERRY HUNTER                 Refer#: NONE
  To: BILL HENNING                  Recvd: NO  
Subj: Darkstar!                      Conf: (2) Quik_Bas
 > Ok, here's exactly what I do:

 > When it is ready to end, it comes to these lines...

I assume you've opened COM2 as #1 up here somewhere...
.
.
.
 > DEF SEG=&H40
 > PortAddr%=&H2F8
 > CLOSE #1
 > OUT PortAddr% + 4, 3
 > OPEN "COM2:" FOR INPUT AS #1    <--- here's your problem...
 > END
 > <End>

 > I made a typing mistake.. ProtAddr% up there is actually
 > PortAddr%. Whenever I do this, it hangs up.  I tried
 > setting S25 even as high as 200, but it didn't help any
 > other than delaying the time it takes to hang up.  Any
 > ideas?

Grin. Ok, Bill. When it's "ready to end", DTR has been
slammed high on &H2F8. Which is COM2. But you've reopened
COM2. So normal housekeeping is done by QB...

Y'see, when QB ends execution of a program, she closes all
open ports FOR you (and dumps DTR on 'em). So she CLOSEs
COM2 which was opened just before your END statement,
thereby dumping DTR.

Go ahead and CLOSE it as you have... but do NOT reopen it
before the END, lest QB spite you on program termination.
You MUST close the port and slam DTR high in order to
preserve CD so you can pick it up later in whatever code
you execute next...

Make sense?

Regards,
Jerry Hunter

--- GEcho 1.00/beta
 * Origin: DarkStar - Where OnLine MultiMedia begins! (1:391/2090)
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