Content-type: text/html Manpage of XB2C

XB2C

Section: X11-Basic (1)
Updated: 04-Jan-2022
Index Return to Main Contents
 

NAME

xb2c - translate X11-Basic bytecode to C  

SYNOPSIS

xb2c [ option ] [-o outfile] <filename>

 

DESCRIPTION

X11-Basic is a dialect of the BASIC programming langage with graphics.

xb2c can be used to convert X11-Basic *.b bytecode binary files (produced with xbbc(1)) into C sourcecode, which can be compiled with the gnu C compiler gcc or any other ANSI C compiler, e.g. tcc, the tiny c compiler.

The sources depend on the x11basic.a or libx11basic.so libraries and on the header file xb2csol.h, which therefore should be installed and linked. The compiled programs will be faster than the interpreted ones and even a bit faster than the bytecode processed ones (see xbbc(1) and xbvm(1)).

For a desciption of the X11-Basic language and usage of the interpreter see xbasic(1).

 

Filenames

Xb2c processes one input file. The suffix of the input file is usually .b (a bytecode file produced by xbbc(1) ). The default output file name is 11.c but you can specify alternate names with the -o option.

 

OPTIONS

-o file
Place output in file file. This applies regardless to whatever sort of output xb2c is producing. If you do not specify `-o', the default is to put the output into the file `11.c .
--version
shows version, program and other information and exits.
-h, --help
print a short help.

For detailed help and description of the implemented basic commands take a look at the README file and the X11-Basic manual.

 

EXAMPLES

xbbc testme.bas -o testme.b
 produces a bytecode file testme.b
xb2c testme.b -o testme.c
 produces a file testme.c
gcc testme.c -o testme -lx11basic -ldl -lm -lasound -lreadline -lX11
 produces an excecutable file testme. However the same result can be optained by
xbc -virtualm testme.bas -o testme
 which does all the above steps.

You can find additional sample programs in /usr/share/doc/packages/X11Basic/examples.

 

The basic to C translator

There is no way to recreate the .bas source code from the c file.. But still the c file is platform independant.

 

VERSION

This Page was created for V.1.19

 

BUG REPORTS

If you find a bug in the X11-Basic to C translator, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the X11-Basic package that you have.

Once you have determined that a bug actually exists, mail a bug report to kollo@users.sourceforge.net. If you have a fix, you are welcome to mail that as well! Suggestions may be mailed to the x11-basic bug tracking system.

Comments and bug reports concerning this manual page should be directed to kollo@users.sourceforge.net.

 

AUTHOR

Markus Hoffmann <kollo@users.sourceforge.net>

 

COPYRIGHT

Copyright (C) 1997-2022 Markus Hoffmann <kollo@users.sourceforge.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

 

SEE ALSO

xbasic(1), xbvm(1), xbc(1), xbbc(1), gcc(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
Filenames
OPTIONS
EXAMPLES
The basic to C translator
VERSION
BUG REPORTS
AUTHOR
COPYRIGHT
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 06:49:06 GMT, August 17, 2022