Qbasic & File Saving_First Post

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Jedanor
Newbie
Posts:1
Joined:Fri Mar 11, 2005 1:44 am
Qbasic & File Saving_First Post

Post by Jedanor » Fri Mar 11, 2005 1:54 am

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.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Sun Mar 13, 2005 11:10 am

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!

Guest

Post by Guest » Tue Mar 15, 2005 2:55 am

How do I determine the Port ID? Also, the data stream changes each time I poll the data so I am not sure what data I would tell the program to "wait" for. Thanks for your input.

Post Reply