Search found 104 matches

by skystrick
Nov 21, 2014 18:53
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

I still had to manually go get a library from ncurses to get FB 1.0 to work on my version of 64 bit Linux. It was something like libtinfo.so.5 That's interesting! I'm using 32-but Linux (Ubuntu 14.04, previously Ubuntu 12.04), and the solutions given in this thread worked for me. I have no clue why...
by skystrick
Oct 17, 2014 1:59
Forum: Linux
Topic: Why is CPU usage near 100%?
Replies: 18
Views: 6600

Re: Why is CPU usage near 100%?

Maybe we could add a feature to Inkey that prevents it hogging the CPU by limiting the number of times it can be called per second. It could keep an internal counter, and if it exceeds a certain value it could sleep a short while if the counter was started within the last second, and then reset the...
by skystrick
Oct 17, 2014 0:44
Forum: Linux
Topic: Why is CPU usage near 100%?
Replies: 18
Views: 6600

Re: Why is CPU usage near 100%?

dkl wrote:Write "__getkey" (two underscores prefix) instead of "getkey":

Code: Select all

#lang "qb"
print __getkey

Thanks so much. It worked perfectly! No CPU usage wasted while waiting in input loops!

:-)
by skystrick
Oct 16, 2014 23:33
Forum: Linux
Topic: Why is CPU usage near 100%?
Replies: 18
Views: 6600

Re: Why is CPU usage near 100%?

Okay, then I will switch to Getkey.

The man page on it says that it's only available in -lang qb (which I'm using) if it's "referenced with the alias __Getkey".

I've never referenced anything with an alias before - what is the code to do this?

Thanks!
by skystrick
Oct 16, 2014 21:55
Forum: Linux
Topic: Why is CPU usage near 100%?
Replies: 18
Views: 6600

Why is CPU usage near 100%?

Hi all, I'm running the current version of FBC (1.01.0) on a x32 Linux system under Ubuntu. Pentium 4 processor, 2.8 GHz. When my FB programs are waiting for user input (i.e. DO: LOOP UNTIL INKEY$ = ...), the CPU usage is near 100%. This causes my processor to heat up and the fan to speed up in resp...
by skystrick
Sep 28, 2014 3:57
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

Adapting it for #lang "qb", I think it would have to be: #lang "qb" __extern __fb_enable_vt100_escapes alias "__fb_enable_vt100_escapes" as long dim shared __fb_enable_vt100_escapes as long __fb_enable_vt100_escapes = 0 That's it!! :-) I put that at the beginning of my...
by skystrick
Sep 27, 2014 6:45
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

Okay, so I downloaded and installed the new build that incorporates the changes you made. I added the line "__fb_enable_vt100_escapes = 0" at the beginning of my program, and compiled it using the regular "fbc -lang qb foo.bas" command line. The program is still sending across th...
by skystrick
Sep 26, 2014 16:53
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

dkl wrote: ... you can also ... use one of the daily builds provided by St_W.
Okay, excellent. Thank you so much, dkl! This is true community support!
by skystrick
Sep 26, 2014 16:28
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

Okay, thank you for making this work for me! :-)

How do I use that take that hinit.c code and apply it to the copy of FreeBASIC on my computer? Or will it be included in the next release?
by skystrick
Sep 25, 2014 22:14
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

dkl wrote:On the other hand, for *BSD systems, FB does assume a start position of 1,1 already (and does not query the cursor position in any way).
Okay, so is that a functionality you can add - either via a command-line switch or "lazy initialization" - to the Linux form of FB?
by skystrick
Sep 22, 2014 6:53
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

"\e(U" INIT_CHARSET inits PC 437 characters set "\e(B" EXIT_CHARSET exits PC 437 characters set Those are afaik not vt100, but only for emulations of it by PCs. Thus not standarized Correct. Let's note, though, that the *ACTUAL* VT100 standard as published in 1978 doesn't includ...
by skystrick
Sep 21, 2014 4:13
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

However, the real issue for now are the hard-coded sequences. Does the termcap/terminfo data base contain these sequences? I could not find anything related to querying cursor position on termcap/terminfo manpages. (notice also the "(not in termcap)" comments from FB source code) Wow, I n...
by skystrick
Sep 20, 2014 3:47
Forum: Linux
Topic: curses/ncurses
Replies: 50
Views: 20931

Re: curses/ncurses

Bump. Using debug-monitor mode on my terminal, this is what I figured out: FB is not properly using Curses or Ncurses. Evidently, FB has some hard-coded VT100 escape sequences in it, because it's sending those ALONG WITH actual Wyse 60 escape sequences. My terminal is a Wyse 60, and Linux recognizes...
by skystrick
Jul 31, 2014 23:39
Forum: Hardware Interfaces / Communication
Topic: Constant serial communication in background?
Replies: 3
Views: 2754

Re: Constant serial communication in background?

TJF wrote:It shouldn't be a problem to handle serial communication in a thread. Have a look at function family KeyPgThreadcreate.
It says threading isn't allowed in -lang qb dialect, which is what I'm using in my program.

Any other options for this?

Thanks!
by skystrick
Jul 30, 2014 19:09
Forum: Hardware Interfaces / Communication
Topic: Constant serial communication in background?
Replies: 3
Views: 2754

Constant serial communication in background?

I'm writing a POS (cash register) program for a friend of mine who runs a small convenience store. I want the POS to be able to control the gas pumps. The interface for the gas pumps hooks to the computer via a serial port, and constantly sends and receives data (pump authorization request, pre-pay ...