A QB SUB for OPEN COM 1,2,3,4 
Author Message
 A QB SUB for OPEN COM 1,2,3,4

But again I need you to find what's wrong.

1- I declare the SUB at the begining and it said the declare sub characters
does not match the SUB or something like that. But I put the same
name:SwapCom2And4

2- If I keep the Com1:40:00 2 bytes it stop at :40

As I said before I just start programming so I'am learning.

So here is the program that can Open COM 3 & 4 or 1,2,3,4.

I left the BBS intro:

I'm making my own BBS from VBDOS and I just want to know
'if any of y know how to answer the phone on COMM4
'without using a library??

'You just swap the port address's for COM2 and COM4,
'then reference COM2 and you will really be referencing COM4:

'Just call this routine every time you want to swap COM2 and COM4, you
'can have up to four ports open at a time.  Swap COM1 and COM3 to gain
'access to COM3.

DECLARE SUB SwapCom2And4

Com1: 40:00  2 bytes
Com2: 40:02
Com3: 40:04
Com4: 40:06

SUB SwapCom2And4
   DEF SEG = &H40
   Com2.1 = PEEK(2): Com2.2 = PEEK(3)
   Com4.1 = PEEK(6): Com4.2 = PEEK(7)
   POKE 2, Com4.1: POKE 3, Com4.2
   POKE 6, Com2.1: POKE 7, Com2.2
   DEF SEG
END SUB

Everything is there !
Good luck !

Jean



Tue, 05 Feb 2002 03:00:00 GMT  
 A QB SUB for OPEN COM 1,2,3,4


Quote:
> But again I need you to find what's wrong.

> 1- I declare the SUB at the begining and it said the declare sub
characters
> does not match the SUB or something like that. But I put the same
> name:SwapCom2And4

Put () at the end.

DECLARE SUB SwapCom2And4()

I don't know for the rest.

--
Jonathan McDougall
Montral, Qubec

http://www.multimania.com/jmcdougall - Programmation BASIC



Tue, 05 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DECLARE SUB and AS problems (QB 2.01)

2. Fond a QB prog. for COM 115200

3. QB com port followup

4. QB com port modes & commmands

5. Com port speed and QB

6. USE COM 1-4 up to 115200bps in qb 4.5, qbpsd, and vbdos

7. How to make COM files from QB$%

8. How to make COM files from QB$%

9. com in qb vs comm module in vb3

10. http://www1.askme.com/MyXpertise.asp?cid=1044&method=qb

11. menus and sub-menus and sub-sub-menus

12. count elements in root, sub root sub-sub root treeview

 

 
Powered by phpBB® Forum Software