README 10.2 KB
Newer Older
kollo committed
1 2 3 4 5 6 7 8 9 10 11 12


    X     X    1   1        BBBB
    X     X   11  11        B   B                   i
      X X      1   1        B   B            sss
       X       1   1 -----  BBBB    aaaa    s   s   i   cccc
      X X      1   1        B   B  a   a      s     i  c
    X     X    1   1        B   B  a   a    s   s   i  c   
    X     X    1   1        BBBB    aaa a    sss    i   cccc
    
    
    
13
                       VERSION 1.25
kollo committed
14

kollo committed
15
            (C) 1997-2017 by Markus Hoffmann
kollo committed
16
              (kollo@users.sourceforge.net)
kollo committed
17

kollo committed
18
Name        : X11Basic                    
19
Version     : 1.25                              Vendor: Markus Hoffmann
kollo committed
20
Group       : Development/Languages             License: GPL
kollo committed
21
Packager    : Markus Hoffmann <kollo@users.sourceforge.net>
kollo committed
22
URL         : http://x11-basic.sourceforge.net/
kollo committed
23
Summary     : A Basic interpreter and compiler with graphics capabilities
kollo committed
24 25
Description :

kollo committed
26
  X11-Basic is a dialect of the BASIC programming language with graphics
27
  capability. 
kollo committed
28

kollo committed
29
  The structure of the language is similar to the ATARI-ST GFA-BASIC.
kollo committed
30 31
 
  This package includes the basic interpreter named xbasic and a set of
kollo committed
32
  different compilers. 
33 34 35
  A compiler manager (xbc) is included which makes stand alone binaries out of 
  the BASIC programs, which run more than 10 times faster than the interpreted 
  code. 
kollo committed
36

kollo committed
37
  X11-Basic programs can also be compiled into a bytecode (see xbbc). This
38
  bytecode can be interpreted by a virtual machine (see xbvm). Finally, the
39
  bytecode can be converted to C sourcefiles (see xb2c) which can be compiled
kollo committed
40
  with the gnu C compiler (or the tiny C compiler) to native excecutables.
kollo committed
41

kollo committed
42 43
  Ancient ANSI-Basic programs (with line numbers) can be converted to X11-Basic
  with the bas2x11basic program (see the man page bas2x11basic(1) ).
kollo committed
44

kollo committed
45
  You will find the compiler sourcecode and some other sample programs in 
46 47 48
  /usr/share/doc/packages/X11Basic/examples. However, a much bigger variety of 
  other sample programs can be found in an X11-Basic examples repository on
  gitlab (https://gitlab.com/kollo/X11-Basic_examples/tree/master) or in a
49
  package X11-Basic-examples-1.25.zip, which you can download from the homepage
50
  (http://x11-basic.sourceforge.net/). Also an up-to-date pdf-version of the
51
  manual can be found there.
kollo committed
52

kollo committed
53 54
  Please read the file X11-Basic-manual.txt (or the .pdf manual) 
  for further information.
kollo committed
55

kollo committed
56
  X11-BASIC is free software and comes with NO WARRANTY - read the file
kollo committed
57 58
  COPYING for details
 
kollo committed
59 60 61
  (Basically that means, free, open source, use and modify as you like, don't
  incorporate it into non-free software, no warranty of any sort, don't blame me
  if it doesn't work.)
kollo committed
62

63
  Please read the file INSTALL for compiling instructions.
kollo committed
64

65 66
  Standard Installation
  =====================
kollo committed
67

68 69 70 71 72
  Starting from the src/ directory you should do a
  ./configure
  make
  
  And for a system wide installation
kollo committed
73

74
  sudo make install
kollo committed
75 76


77
  To remove the installation a
kollo committed
78

79
  sudo make uninstall
kollo committed
80

81 82 83 84
  will do.
  
  For further details of the installation process and different install options
  please read the file INSTALL.
kollo committed
85

kollo committed
86

87 88
  ADDITIONAL CONFIGURATION OPTIONS
  ================================
kollo committed
89

90 91
  (only if you have special needs or if the standard installation fails)

kollo committed
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
A)  The configure script takes additional arguments.
  
`configure' configures X11-Basic 1.25 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/x11-basic]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-cryptography   enable cryptographic features [default=no]
  --enable-static         only produce static libraries [default=no]
  --enable-smallram       make version siutable for systems with small RAM
                          [default=no]
  --enable-german         make german version [default=no]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-bluetooth        support blutooth [default=yes]
  --with-usb              support USB [default=yes]
  --with-readline         support readline library [default=yes]
  --with-framebuffer      support framebuffer [default=no]
  --with-sdl              support SDL library [default=no]
  --with-x                use the X Window System [default=yes]
  --with-x                use the X Window System

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  XMKMF       Path to xmkmf, Makefile generator for X Window System

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

B) Different make methods:

  standalone excecutables (statically linked)
191 192 193 194 195 196 197
  ----------------------------------------------
  
  a) the interpreter
  
  To compile the X11-Basic interpreter (called xbasic), simply type 
	
	make static
kollo committed
198

199 200
  at the shell prompt. The produced file is independant of the x11basic 
  library and does not need the x11basic framework to be installed.
kollo committed
201

202 203
  After X11Basic has been compiled and linked successfully, you can start it
  by typing
kollo committed
204

205
	./xbasic.static
kollo committed
206

207
  The command-line options can be listed with the `-h' option (`./xbasic -h').
kollo committed
208

209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
  INSTALLING the standalone excecutable:
 
  Put the executable wherever you like. I have mine in ${HOME}/bin/.


  b) compiler and libraries

  If you want to use the compilers, you have to make both the static and dynamic
  libraries.

  cd ./src
  make lib              will generate libx11basic.so
  make x11basic.a       will generate x11basic.a

  -- now you have to be root to install the libraries at a place where the 
     compiler can use them --

  mv libx11basic.so /usr/lib/
  mv x11basic.a /usr/lib/
  -- please also check the permissions of the files:
  chmod 755 	/usr/lib/x11basic.a		
  chmod 755       /usr/lib/libx11basic.so 
  rehash

  make xbbc.static xbvm.static xb2c.static xbc
  
  will produce the statically linkd versions of the compilers.

kollo committed
237
C) The framebuffer version
238 239 240 241 242 243 244 245 246 247 248
  
  It is possible to compile a version of X11-Basic and its libraries, which 
  does not need the X.org framework, but instead uses the systems framebuffer
  and direct mouse device for graphics in and output. This might be useful on
  e.g. the Raspberry Pi or for other handheld devices with low resources.
  
  make clean fb
  
  will produce the framebuffer version of the interpreter called 
  xbasic.framebuffer
  
kollo committed
249 250 251 252 253
D) 64bit operating systems

X11-Basic will compile on 64bit systems but it will not be 100% functional.
X11-Basic internally uses 32bit pointers (--> VARPTR()). These are not compatible 
with 64bit. Some tricks have been implemented to make it work anyways, but 
kollo committed
254
do not expext 100% compatibility. 
kollo committed
255 256 257


E) Crosscompiling for other platforms
258 259 260 261
     
  a) ATARI ST (with m68k-atari-mint)
     
     make tos
kollo committed
262

263 264 265
  b) TomTom (with the ARM linux toolchain)
  
     make TomTom
kollo committed
266

267 268 269 270
  c) MS WINDOWS (with i586-mingw32msvc-gcc)
  
     make windows
     
kollo committed
271 272 273 274
  d) 32bit version on 64bit system
  
     make bit3264
  
275
  For details you may want to look into the Makefile. Improvements are welcome.
kollo committed
276 277


278
best regards and have fun
kollo committed
279 280
     Markus Hoffmann