BBS: Inland Empire Archive Date: 05-17-92 (13:19) Number: 195 From: SCOTT DRYSDALE Refer#: NONE To: CHRIS FRANKFORTHER Recvd: NO Subj: COM3 & COM4 WITH V3.0 Conf: (2) Quik_Bas
Hi, There's one quicky method but it NEVER worked with me, the only thing that ever worked was... SUB opencom3 (baud%, par$, dat%, sto%) DEF SEG = 0 COM1.1 = PEEK(&H400): COM1.2 = PEEK(&H401) COM2.1 = PEEK(&H402): COM2.2 = PEEK(&H403) COM3.1 = PEEK(&H404): COM3.2 = PEEK(&H405) COM4.1 = PEEK(&H406): COM4.2 = PEEK(&H407) DEF SEG DEF SEG = 0 POKE &H400, COM3.1: POKE &H401, COM3.2 POKE &H404, COM1.1: POKE &H405, COM1.2 DEF SEG OPEN "COM1:" + STR$(baud%) + "," + par$ + "," + STR$(dat%) + "," + STR$(sto%) FOR RANDOM AS #1 END SUB SUB opencom4 (baud%, par$, dat%, sto%) DEF SEG = 0 COM1.1 = PEEK(&H400): COM1.2 = PEEK(&H401) COM2.1 = PEEK(&H402): COM2.2 = PEEK(&H403) COM3.1 = PEEK(&H404): COM3.2 = PEEK(&H405) COM4.1 = PEEK(&H406): COM4.2 = PEEK(&H407) DEF SEG DEF SEG = 0 POKE &H402, COM4.1: POKE &H403, COM4.2 POKE &H406, COM2.1: POKE &H407, COM2.2 DEF SEG OPEN "COM2:" + STR$(baud%) + "," + par$ + "," + STR$(dat%) + "," + STR$(sto%) FOR RANDOM AS #1 END SUB I know it says COM1 and COM2, but believe it or not it swiches the addresses, and actually opens COM3 or 4 instead. --- Maximus 2.01wb * Origin: The BULLpen BBS * Intel 14.4EX (613)549-5168 (1:249/140)
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