Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Misc > Re: Interpreter...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 54 of 63 Topic 1431 of 1467
Post > Topic >>

Re: Interpreter for old basic programs from the line number era

by thomas.mertes@[EMAIL PROTECTED] Mar 14, 2008 at 08:41 AM

On 13 Mrz., 16:36, Warren Gay <sn...@[EMAIL PROTECTED]
> wrote:
>  expounded in news:f06a7182-2808-4e4d-8bb0-59f2ababeaf4
> @[EMAIL PROTECTED]
>
> > On 12 Mrz., 19:06, "Auric__" <not.my.r...@[EMAIL PROTECTED]
> wrote:
> > I will look how curses/terminfo supports color. I fear that there
> > might be implementation dependencies or just a fixed color table.
> > When a fixed color table exists I have to do some mapping since
> > the Seed7 colors are RGB colors with red, green and blue values
> > between 0 and 65535.
>
> If you go through curses (rather than through terminfo), you'll need to
> work with "colour pairs". Each pair consists of a background and
> foreground pair of colour selections (1 of 8 predetermined colours).
> Managing pairs is a pain.
>
> For BDB-BASIC, I chose to use a simpler approach. At initialization, you
> can find out from curses how many colour pairs you have to work with
(all
> implementations that I have run across so far support a minimum of 64).
> If the implementation should provide less than 64 colour pairs, I
> fallback to monochrome mode.
>
> As long as you have 64 (or more) pairs, you can matrix the pairs for
> every combination of bg/fg colour (assuming 8 colours for 8x8 => 64).
> This allows the basic program to set the FG(x) or BG(x) colour without
> being bothered about "pairs" (or some other terminal context object).
The
> interpreter just maps the request to the right colour pair that gives
the
> user what he asked for.
>
> Terminfo probably avoids the pair issue (I haven't checked).

I think that some support for colours must be in terminfo since
curses is based on terminfo. I will look for that.

> But I think
> that curses provides so many advantages over using terminfo directly
> (like panels for example), that I wouldn't work at the terminfo level
> except as a last resort. Curses can simplify your work as well, and yet
> be efficient with the traffic sent to the terminal/window. This allows
> you to "redraw" a windowed field completely, but curses will only send
> the parts that have changed for example.

I have a reason to use terminfo instead of curses. I have also
a screen/console driver which is based on curses (scr_cur.c).
But years ago I found some bugs which came from the curses
library.

Function keys were sometimes not recognized correctly. This
leaded to garbage in a file edited with an editor based on
the curses driver. The cause of the error was as follows:
When the terminal is connected with a slow line it can happen
that the escape sequence sended by function keys are not sended
in one transmission. The function key recognition may get the
escape character first. The function key recognition tries to
take this into account be using a timeout. When no other
character comes over the line in the timeout time the escape
character is deliverd. If that happens the rest of the escape
sequence is read as normal characters which lead to garbage in
a file. My function recognition works in a smarter way when the
timeout runs out.

> If you're worried about availability of curses on native Windows builds,
> I have successfully used PDCurses (on SF) in MINGW builds. I don't know
> how well it works for BeOS, but I am sure the current maintainer of
> PDCurses would be glad to take patches/input if it needs it (I don't
> recall if it does support BeOS-- perhaps you're already using that).
>
> PDCurses does now support "panels" as well, but does not implement the
> standard "menu" library. I have chosen to write my own "menu" library
> replacement for this reason.
>
> Anyway, just some food for thought on the colour support issue.

Thank you very much.

I have some other problem where you could help me.

I want to support the SOUND statements of GW-BASIC in the Bas7
interpreter. For that reason I need a driver for a simple sound
interface which comes near to the BASIC SOUND statements. I
have some C function like:

void doSound (int frequency);

in my mind (frequency 0 should stop the sound).
Since you mentioned the implementation of BDB-BASIC, various
linux distributions and windows you have probably already a
solution for my problem. Hos does your sound driver look like?

Thanks in advance.

Greetings Thomas Mertes

Seed7 Homepage:  http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.




 63 Posts in Topic:
Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-03 11:12:00 
Re: Interpreter for old basic programs from the line number era
Paul Bartlett <bartlet  2008-03-03 20:07:01 
Re: Interpreter for old basic programs from the line number era
rebel <me@[EMAIL PROTE  2008-03-04 10:16:31 
Re: Interpreter for old basic programs from the line number era
"R.Nicholson" &  2008-03-03 18:23:10 
Re: Interpreter for old basic programs from the line number era
rebel <me@[EMAIL PROTE  2008-03-05 10:44:45 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-08 01:56:45 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-08 15:47:56 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-04 00:05:17 
Re: Interpreter for old basic programs from the line number era
"R.Nicholson" &  2008-03-04 19:09:26 
Re: Interpreter for old basic programs from the line number era
Happy Trails <nomail@[  2008-03-04 22:46:12 
Re: Interpreter for old basic programs from the line number era
"R.Nicholson" &  2008-03-04 21:06:46 
Re: Interpreter for old basic programs from the line number era
Happy Trails <nomail@[  2008-03-05 11:07:24 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-05 00:04:10 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-06 17:12:03 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-06 12:05:46 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-07 17:12:49 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-07 13:38:51 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-07 23:58:56 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-07 18:53:19 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-10 17:46:12 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-10 18:17:41 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-11 17:01:43 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-11 17:43:05 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-12 17:35:00 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-12 14:22:49 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-13 15:10:08 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-13 19:36:55 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-14 17:26:15 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-14 18:01:00 
Re: Interpreter for old basic programs from the line number era
Guy Macon <http://www.  2008-03-06 20:58:28 
Re: Interpreter for old basic programs from the line number era
"Tom Lake" <  2008-03-06 16:02:16 
Re: Interpreter for old basic programs from the line number era
Guy Macon <http://www.  2008-03-06 21:26:33 
Re: Interpreter for old basic programs from the line number era
"Judson McClendon&qu  2008-03-06 15:25:02 
Re: Interpreter for old basic programs from the line number era
ArarghMail803NOSPAM@[EMAI  2008-03-06 16:58:58 
Re: Interpreter for old basic programs from the line number era
Vic Drastik <user@[EMA  2008-03-08 23:33:53 
Re: Interpreter for old basic programs from the line number era
Vic Drastik <user@[EMA  2008-03-08 23:51:54 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-06 15:16:17 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-08 01:20:26 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-10 17:51:46 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-11 17:21:41 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-11 17:23:33 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-08 01:38:33 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-11 12:57:35 
Re: Interpreter for old basic programs from the line number era
"Auric__" <n  2008-03-12 18:06:43 
Re: Interpreter for old basic programs from the line number era
Warren Gay <snark@[EMA  2008-03-13 15:19:22 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-13 03:41:59 
Re: Interpreter for old basic programs from the line number era
Warren Gay <snark@[EMA  2008-03-13 15:36:05 
Re: Interpreter for old basic programs from the line number era
Thomas Dickey <dickey@  2008-03-14 11:11:41 
Re: Interpreter for old basic programs from the line number era
Charmed Snark <snark@[  2008-03-14 15:28:29 
Re: Interpreter for old basic programs from the line number era
Thomas Dickey <dickey@  2008-03-14 22:37:27 
Re: Interpreter for old basic programs from the line number era
Charmed Snark <snark@[  2008-03-15 04:15:36 
Re: Interpreter for old basic programs from the line number era
Thomas Dickey <dickey@  2008-03-16 13:10:27 
Re: Interpreter for old basic programs from the line number era
Thomas Dickey <dickey@  2008-03-14 16:03:56 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-14 08:41:36 
Re: Interpreter for old basic programs from the line number era
Charmed Snark <snark@[  2008-03-14 15:57:50 
Re: Interpreter for old basic programs from the line number era
Eric <englere_geo@[EMA  2008-03-18 09:11:26 
Re: Interpreter for old basic programs from the line number era
Charmed Snark <snark@[  2008-03-18 19:52:03 
Re: Interpreter for old basic programs from the line number era
winston19842005 <bjjly  2008-03-18 18:18:44 
Re: Interpreter for old basic programs from the line number era
Eric <englere_geo@[EMA  2008-03-18 20:41:12 
Re: Interpreter for old basic programs from the line number era
"winston19842005@[EM  2008-03-18 22:13:40 
Re: Interpreter for old basic programs from the line number era
Charmed Snark <snark@[  2008-03-19 15:32:27 
Re: Interpreter for old basic programs from the line number era
thomas.mertes@[EMAIL PROT  2008-03-19 12:35:28 
Re: Interpreter for old basic programs from the line number era
Derek <derekrss@[EMAIL  2008-03-19 22:37:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 22 14:13:02 CDT 2008.