Brun 45 2/2

 BBS: Inland Empire Archive
Date: 02-23-93 (21:26)             Number: 392
From: TOM HAMMOND                  Refer#: NONE
  To: RON HAMMER                    Recvd: NO  
Subj: Brun 45               2/2      Conf: (2) Quik_Bas
>>> Continued from previous message

  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

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

  a 9e7c


  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
  ADD   DX,+04

To save the corrections Type :


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

'Date: 10-09-92 (11:55)             Number: 6526
'From: JERRY HUNTER                 Refer#: NONE
'  To: ALL DTR PATCH FOLKS           Recvd: NO
'Subj: Why PATCH DTR?                 Conf: (5) Quickbasic
'I've seen more queries on how to patch versions of QB2, QB3, QB4 and 'QB45 here than I can believe. 'Question is, WHY BOTHER patching ANYTHING in QB, the compiler, or the 'Lib when a couple lines of code are enough to resolve the problem. 'Y'see, when QB issues a RUN command to go run another program, she 'handles closing all OPENED ports for you in her effort to do general 'housekeeping. So CLOSE the port. Make her happy. But within a 'heartbeat, you need to take YOUR OWN precautions to make sure YOU don't 'kill the DTR... As follows : DEF SEG = 0 PortAddr% = &H3F8 ' the base port address of COMx: to preserve CLOSE #1 ' go ahead and close the port OUT PortAddr% + 4, 3 ' within a heartbeat, Slam the DTR High RUN "MYPROG.EXE" go on about your business... 'In this manner, the port may be reopened in subsequent applications 'without error and with CD still active. 'On some (slow) systems, the S25 register may need to be set as high as '20 to buy you enough time to catch the MSR quickly enough. An 8088 just 'doesn't get around to it as quick as we'd like. 'This method is used internally to DarkStar BBS, as well as DarkStar 'CommLink. Works for me, and haven't seen a problem one with using this 'method... and it SURE beats worrying about what version of QB you're 'using, or installing a patch... 'Hope it helps... '-- Jerry Hunter --- * Origin: Night Shift BBS (314)635-7588 HST 14.4 (1:289/15)
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