On Sat, 22 Nov 2014 07:33:47 -0500, Tom Ehlert <t...@drivesnapshot.de> wrote:
> >> FreeBasic doesn't support FIFO, and most likely no IRQ. > >> try > >> Open Com "COM1:600,n,8,1,cs0,ds0,cd0,rs" For Random As #CP > >> and see if that changes your problem. > > sorry, not true. > FreeBasic seems to use IRQ, but not FIFO. > > anyway, try > Open Com "COM1:600,n,8,1,cs0,ds0,cd0,rs" For Random As #CP > > Tom > I have done a bit with serial ports in FreeBASIC on Windows. I had an issue with dropping bytes when reading one character at a time. Reading a string with the length according to LOC() function seemed to solve the problem. This is what my routine looks like: ff1=freefile open com "COM3:230400,n,8,1,cs0,cd0,ds0,rs" as #ff1 a102: sleep 20 while loc(ff1)>0 k=input$(loc(ff1),ff1) print k; wend goto a102 There is an argument that can be passed in the Open Com statement to specify a buffer size. Is it supported in DOS? Maybe I will have to whip out FB DOS compiler and experiment. BTW, I'm not sure why you are adding For Random, or what that would even mean in this context. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user