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 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 '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)