QuickBasic 4.5 & Serial Port under Win9x 
Author Message
 QuickBasic 4.5 & Serial Port under Win9x

Hi!

I have an old progam written in QuickBasic 4.5 which receives and
sends data over the serial Port COM2.
This program runs in a DOS-Box under Win95.
With sending data there are no problems, but with receiving.

Sometimes the command xxx$ = INPUT$(4,#1) and the like reads all 4
characters and sometimes don't.
Then only 3 characters are read.
This phenomenom is really random.

When I run this program completly under DOS, no such errors are
raising.

Does anybody know this problem and has a solution for it?

I would be very thankful for that.



Mon, 02 Feb 2004 21:24:04 GMT  
 QuickBasic 4.5 & Serial Port under Win9x


[...]

Quote:
> Sometimes the command xxx$ = INPUT$(4,#1) and the like reads all 4
> characters and sometimes don't.
> Then only 3 characters are read.
> This phenomenom is really random.

> When I run this program completly under DOS, no such errors are
> raising.

I suppose that you probably use an *obsolete* I/O card in your PC, someone
which still has 8250 UARTs instead today's usual 16550 UART.

Please start your computer in pure DOS and run MSD.EXE, show the COM
interface details. MSD.EXE was automatically installed with MS-DOS 6.22, on
Windows 95/98, you shold find it on your Windows installation CD-ROM in the
\TOOLS\OLDMSDOS directory. => This tools shows you what kind of UART chip
you are using on your RS-232 interfaces.

Probably, I would upgrade the I/O interface card. Some books and magazines
write that it's possible to exchange the UART chip with a soldering iron.

Related links from my BASIC knowhow corner:

Article about RS-232 general:
http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/SerielleKommunikati...

Article about 32 bit OS compatibility of QB:
http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/BASICunterWindows95....
html

Note: Use http://babelfish.altavista.com/ to translate the German text.

                   Andreas



Tue, 03 Feb 2004 01:54:48 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

Quote:

> Please start your computer in pure DOS and run MSD.EXE, show the COM
> interface details. MSD.EXE was automatically installed with MS-DOS 6.22, on
> Windows 95/98, you shold find it on your Windows installation CD-ROM in the
> \TOOLS\OLDMSDOS directory. => This tools shows you what kind of UART chip
> you are using on your RS-232 interfaces.

> Probably, I would upgrade the I/O interface card. Some books and magazines
> write that it's possible to exchange the UART chip with a soldering iron.

> Related links from my BASIC knowhow corner:

> Article about RS-232 general:
> http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/SerielleKommunikati...

> Article about 32 bit OS compatibility of QB:
> http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/BASICunterWindows95....
> html

> Note: Use http://babelfish.altavista.com/ to translate the German text.

>                    Andreas

But I have still a 16550 UART build in.
So this might not be the problem.

I really don't know any solution for this problem... :-(

Bernd



Tue, 03 Feb 2004 14:00:26 GMT  
 QuickBasic 4.5 & Serial Port under Win9x
First problem that you are having is that windoz is inserting itself into
the loop of instructions that you are doing with your program.  Windoz takes
the I/O request and "translates" it into the true values (same really as the
requested ones but there is the difference) and then processes that info in
it's messaging system.  You don't get the real direct access to ports in
windoz and as a result, you can indeed lose data as you go along if you try
reading several bytes at a time.
Remember that windoz gives you a "virtual machine" with each rendering of a
DOS window and as such, you aren't seeing what you think you are seeing.

--
Bob May
Remember that computers do exactly what you tell them to do, not what you
think you told them to do.



Tue, 10 Feb 2004 13:32:34 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

: Remember that windoz gives you a "virtual machine" with each rendering of a
: DOS window and as such, you aren't seeing what you think you are seeing.

That does sound like the problem. Windows has no file locking mechanism like
UNIX does. In UNIX, if a modem is being used by a terminal proggie the device
file is "locked" and other software cannot access that device. NT is sure to
have a file locking and device locking mechanism, being a server OS like UNIX.

That brings up a good question. QBASIC and QuickBASIC needs DOS underneath the
windows to be used. What are people going to do when they are forced to
abandon 95 and 98? 95 and 98 are cool becuse you can run your homebrew
software in the background like a daemon. With that, if you are used to shell
scripts, you make an infinite loop proggie that every few seconds run a shell
script and you have the ultimate cookie manager.

--
FOOD FOR THOUGHT: 100 calories are used up in the course of a mile run.
The USDA guidelines for dietary fibre is equal to one ounce of sawdust.
The liver makes the vast majority of the cholesterol in your {*filter*}stream.
http://www.*-*-*.com/ ~nospam/

           CUIDADO: Las Puertas Estan Listas Para Cerrar.



Sat, 14 Feb 2004 07:13:52 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

Quote:

> That brings up a good question. QBASIC and QuickBASIC needs DOS underneath the
> windows to be used. What are people going to do when they are forced to
> abandon 95 and 98?

Forced to abandon 95 and 98?  How will Microsoft do that?  I've still
got a working CP/M system at home.  Did I miss out when Microsoft
'forced' us to abandon CP/M and start using MS-DOS?

People who do stop using 95/98/ME will probably start using Windows
2000 or Windows XP which have DOS emulators built in.  Their QB
programs will work as before for the most part.  In those cases where
timing issues or hardware access issues prevent the programs working,
they can still use their MS-DOS boot floppy disc to start the PC.

Cheers

Derek



Sat, 14 Feb 2004 22:58:06 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

: Forced to abandon 95 and 98?  How will Microsoft do that?  I've still
: got a working CP/M system at home.  Did I miss out when Microsoft
: 'forced' us to abandon CP/M and start using MS-DOS?

As people buy new computers they end up with the NT derivative OS, like W2K or
ME. If the QuickBASIC programme doesn't work, there is another solution
besides dual-booting with DOS. There is a QBASIC to C converter out there, and
all you need then is a C compiler. Check out this link:

http://www.*-*-*.com/ ~stipy/qb2c/qb2c.html

I once found that bloke and downloaded what is now an old version (1.0) and
this gem of a converter does work. It's a good way to learn C, while you're at
it. If one has a C compiler that is NT and 95 compatible, the QBASIC proggie,
once converted, will work. The converter is cool in that the output is quite
readable and you can edit it to taste as you learn C. Like any such converter,
it's not perfect, but is plenty useful. I already used my old version to port
my Cookie Jarhead(tm) to C.

--
FOOD FOR THOUGHT: 100 calories are used up in the course of a mile run.
The USDA guidelines for dietary fibre is equal to one ounce of sawdust.
The liver makes the vast majority of the cholesterol in your {*filter*}stream.
http://www.*-*-*.com/ ~nospam/

           CUIDADO: Las Puertas Estan Listas Para Cerrar.



Mon, 16 Feb 2004 00:07:59 GMT  
 QuickBasic 4.5 & Serial Port under Win9x


: : Forced to abandon 95 and 98?  How will Microsoft do that?  I've still
: : got a working CP/M system at home.  Did I miss out when Microsoft
: : 'forced' us to abandon CP/M and start using MS-DOS?

: As people buy new computers they end up with the NT derivative OS, like W2K or
: ME. If the QuickBASIC programme doesn't work, there is another solution
: besides dual-booting with DOS. There is a QBASIC to C converter out there, and
: all you need then is a C compiler.

You CAN go that route, but it isn't necessary.  There are other versions
of BASIC (C compiler not required), including my own product Liberty
BASIC.  C is not a replacement for BASIC.

-Carl

--
------------------------------------------------------------------

 author of Liberty BASIC, twice a PC Magazine Awards Finalist!
 http://www.libertybasic.com
------------------------------------------------------------------



Mon, 16 Feb 2004 02:47:45 GMT  
 QuickBasic 4.5 & Serial Port under Win9x


: You CAN go that route, but it isn't necessary.  There are other versions
: of BASIC (C compiler not required), including my own product Liberty
: BASIC.  C is not a replacement for BASIC.

A QBASIC to C converter has another advantage. I use Linux most of the time,
and with that converter compiled on Linux, I get to use BASIC on Linux.

There are interpreted BASIC for Linux like Bywater BASIC and Chipmunk BASIC
but no compiler for BASIC on Linux. The converter alleviates the problem.

As you can imagine, I do C too, becuse of Linux, but I can mix the two, by
editing the converter's output and you get to learn C in the process.

The way I see it, there is nothing wrong with BASIC.

--
FOOD FOR THOUGHT: 100 calories are used up in the course of a mile run.
The USDA guidelines for dietary fibre is equal to one ounce of sawdust.
The liver makes the vast majority of the cholesterol in your {*filter*}stream.
http://www.*-*-*.com/ ~nospam/

           CUIDADO: Las Puertas Estan Listas Para Cerrar.



Mon, 16 Feb 2004 05:05:00 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

Quote:


>There are interpreted BASIC for Linux like Bywater BASIC and Chipmunk BASIC
>but no compiler for BASIC on Linux. The converter alleviates the problem.

XBasic is open - source freeware and comes in Windows 9x and Linux
flavors.  Not the easiest implementation to learn, but it comes with
graphics and GUI tools written in XBasic, as is the compiler.


Mon, 16 Feb 2004 14:01:56 GMT  
 QuickBasic 4.5 & Serial Port under Win9x

Quote:



> : : Forced to abandon 95 and 98?  How will Microsoft do that?  I've still
> : : got a working CP/M system at home.  Did I miss out when Microsoft
> : : 'forced' us to abandon CP/M and start using MS-DOS?

> : As people buy new computers they end up with the NT derivative OS, like W2K or
> : ME. If the QuickBASIC programme doesn't work, there is another solution
> : besides dual-booting with DOS. There is a QBASIC to C converter out there, and
> : all you need then is a C compiler.

Lookie, lookie a Basic to C compiler! Well you always get stuff when
you're not asking for it. Tanx. I need something just like this.

Quote:
> You CAN go that route, but it isn't necessary.  There are other versions
> of BASIC (C compiler not required), including my own product Liberty
> BASIC.  C is not a replacement for BASIC.

But it is a great way of keeping BASIC alive. If you're making
traditional QBasic software and living today, you might want to make
those programs work on every computer, servers included and since C is
the only common point with most computers, programing in QBasic and then
translating to C is a very good option.

Stay out of this and devolopment will leave QBasic far behind.

P.S.: I have argued about this before and yes, I am the fella that
claims that BASIC deserves it's place next to C --> It is absolutely
legendary.

--

Don't feel bad about asking/telling me anything, I will always gladly
reply.

The PIC Project: Tell us how does it feel to be you!

GTSC4 -- If nobody else wants to do it, why shouldn't we?(TM)
Meson & GTSC4 are now merged:
Http://WWW.MesonAI.Com



Mon, 16 Feb 2004 15:32:58 GMT  
 QuickBasic 4.5 & Serial Port under Win9x
I thought this was a good time to chime in.  For anyone who doesn't
already know, there are two popular BASIC to C Translators -- one
for Linux (QB2C) which is an older, quirky but free version.  This
version requires that your keywords are all in upper case, does not
support parameterized SUBS or FUNCTIONS, and has not been
updated in years.  An improved payware version can be purchased.

The second option is BCX for Windows.  I have been developing BCX
and making it available for over two years now.  It is 100% free and
now open source.  Originally written in powerbasic for DOS, I recently
ported BCX to itself ( BCX written in BCX , making it a self-translating
translator)

There is an active discussion group on Yahoo, and updates occur
regularly.  If I wasn't the one writing BCX, I'd still use it because it
is so cool.  Many of the users are professional C programmers who use
BCX to quickly prototype their programs.  The "C" code that BCX
emits is pretty good quality.

BCX gives you complete access to the Win32 API.  It includes user
defined SUBS, FUNCTIONS, and TYPES, SELECT CASE,
IF-THEN-ELSE-ELSEIF-END IF, WHILE-WEND, DO-LOOPS,
DO-UNTIL, CONST, UCASE$, LCASE$, MCASE$, LTRIM$,
RTRIM$, TRIM$, and a host of other BASIC string and math functions,
including some useful PowerBasic(tm) knock-offs.

BCX does not need line numbers ( but tolerates thems ).  BCX also
allows you to create overloaded SUBs and FUNCTIONS.  Here's an example
that demonstrates what this is all about:

Dim a$
Dim b
Dim c as double

a$  = test$ ("hello"," there") : Print a$
b   = test  (123)               : Print b
c   = test  ( 7.01 )            : Print C#

overloaded function test (b) as integer
function = b
end function

overloaded function test$ (a$,b$)
function = mcase$(join$(a$,b$))
end function

overloaded function test# (b#)
function = b# * b#
end function

*************************************************************
The main site was last updated 7/1/2001.  The complete distribution with
all the tools and source code includes the last DOS version of the translator.
A new distribution is forthcoming which will include the now stable Win32
version of BCX, as well as still more sample projects ( over 200 in all! )

That's all the pitch for now .. visit the following sites if you're interested:

http://www.users.qwest.net/~sdiggins/bcx.htm
http://groups.yahoo.com/group/BCX



Mon, 16 Feb 2004 19:01:31 GMT  
 
 [ 42 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. Difference between QuickBasic 4.0 & 4.5

2. Please help - convert quickbasic 2.0 &4.5 to Powerbasic under windows

3. Handshaking With Serial Ports In Mac QuickBASIC

4. Handskahing With Serial Ports In Mac QuickBASIC

5. Serial (COM) Ports In Macintosh QuickBASIC 1.0

6. QuickBasic 4.5 app need to convert to VB.net

7. Arrays with a TYPE in quickbasic 4.5

8. Including a parameter with the RUN statement in QuickBasic 4.5

9. QuickBASIC 4.5 under Windows XP

10. Running QuickBASIC 4.5 on Windows XP

11. Freeing up memory in QuickBasic 4.5

12. QuickBasic 4.5 Available

 

 
Powered by phpBB® Forum Software