User Tools

Site Tools


ugbasic:user
Translations of this page:


ugBASIC User Manual

This manual contains all the information to install and use the ugbc compiler, as well as a guide to the syntax of the ugBASIC language.

How to build

On the page dedicated to the latest version, there are already built compilers, ready to be used to compile programs in ugBASIC. Of course, compilers can be built from source. This software makes use of a series of tools, implicitly called by the makefile, to generate the compiler's executables. On this page you will find a short guide to downloading and installing the necessary software. In the absence of these software, the compiler cannot be compiled.

How to program

On this page you will find an analytical list of ugBASIC's recognized keywords, and their syntax. Below you will find a series of short guides that explore the various capabilities of the language.

How to compile

Linux

Compiling a BASIC program is very easy. It is sufficient to build or pick-up the executable for the specific target, and to issue a simple command:

 # Atari 400/800 family 
 ugbc.atari program.bas -o program.xex 
 # Atari 600XL/800XL/1200XL/XE(GS) family 
 ugbc.atarixl program.bas -o program.xex 
 # Commodore 64 
 ugbc.c64 program.bas -o program.prg 
 # Commodore PLUS/4 
 ugbc.plus4 program.bas -o program.prg 
 # Dragon 32 
 ugbc.d32 program.bas -o program.bin 
 # Commodore VIC-20 
 ugbc.vic20 program.bas -o program.prg 
 # ZX Spectrum 
 ugbc.zx program.bas -o program.tap 

If you receive an error message like this:

 sh: 1: cl65: not found
 The compilation of assembly program failed.
 Please use option '-I' to install chain tool.

then you should follow the advice and install the relative assembler by using the -I line command option.

Windows

Compiling a BASIC program is very easy. It is sufficient to pick-up the executable for the specific target, and to issue a simple command:

 # Atari 400/800 family 
 ugbc.atari.exe program.bas -o program.xex 
 # Atari 600XL/800XL/1200XL/XE(GS) family 
 ugbc.atarixl.exe program.bas -o program.xex 
 # Commodore 64 
 ugbc.c64.exe program.bas -o program.prg 
 # Commodore PLUS/4 
 ugbc.plus4.exe program.bas -o program.prg 
 # Commodore VIC-20 
 ugbc.vic20.exe program.bas -o program.prg 
 # ZX Spectrum 
 ugbc.zx.exe program.bas -o program.tap 

If you receive an error message like this:

 "cl65" is not recognized as an internal or external command,
 an executable program or a batch file.
 The compilation of assembly program failed.
 Please use option '-I' to install chain tool.

then you should follow the advice and install the relative assembler by using the -I line command option.

Examples

On this page you will find a set of programs, written in ugBASIC, which demonstrate the capabilities of the language.

How to debug

On this page you will find a guide in order to debug the compiled programs.

Issues and suggestions

If you have encountered a problem using this compiler, if you think there is a bug or the explanation is unclear, please open an issue on GitHub. Thank you!

POWERED BY