Hi. It has been some time since I did any programming. To get to the point.
First, I have a program written in QuickBasic which controls a peripheral device hooked to the seriel port of my computer. The program is sophisticated yet primitive at the same time. It crashes when I try to save or retrieve a file. I looked at the code and it doesn't appear it has a way to create directories or have any flow control for saving and retrieving files. Does anyone have some simple code for this I can put into this program?
Second, I have been toying with Visual Basic. I'd love to rewrite this program to work in a windows type environment. The code to control the analyzer is simple ASCII commands so I figured it wouldn't matter what kind of driver program was written as long as the seriel connection can be established. Has anyone taken old QuickBasic code and used them in Visual Basic programs?
Third, there seems to be some timing issues when the peripheral dumps seriel data back to the RS232 port. Is there a way I can poll the port to ensure the entire data stream made it back to the computer before the computer sends any extra commands to the peripheral and causes conflicts?
I hope I don't sound like a n00b but I just want to modernize this software and make this peripheral device "usable" again. Any suggestions or comments are welcome. Thanks in advance.
Qbasic & File Saving_First Post
Moderators:Administrator, Global Moderator
-
- QBasic God
- Posts:166
- Joined:Tue Mar 25, 2003 12:45 am
- Location:U.S.A.
- Contact:
To get rid of the conflicts, you want to use the WAIT command. Where P is the port id and R is the return value to wait for, WAIT P,R.
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!