This is a guideline for a course of this semester, for which I am serving as a teaching assistant. I publish it here in hope that it can also help someone else who want to use BACI.

Install BACI

  1. Go to and download BACI executables:

  2. For windows user, after download and unzip the BACI DOS executables, please put the folder called badosxe directly under the C:\ drive so it’s easy to find it. You can do all your BACI work inside this directory.

    • If your badosxe folder is C:\badosxe, then in your command prompt (cmd) your path should be C:\badosxe> bacc <file_name> .

  3. For Linux user, after download and gunzip the BACI executables, please make sure to add balnxxe into your PATH: export PATH=$PATH:/path/to/your/balnxxe (You also can add this line into $HOME/.profile, so that this command will be executed every time you login).

  4. If you want to use jBACI(BACI with a graphical IDE), please go to, and choose the Unfortunately, currently jBACI is only available for Windows.

  5. If you want to use BACI on the Eustis server, please download Linux version BACI first, gunzip it and then upload them into your home folder of Eustis server. Please remember to add BACI executables into your PATH(as step 3).

  6. NetBeans + BACI plugin is the best choice for people who prefer a modern IDE or MAC users. You need to install NetBeans first, and then follow the guide of setting up BaciBeans. NetBeans is a cross-platform IDE, so it can work on all operating systems that have Java JDK installed.

Compile and run BACI program

  1. Make sure that bacc is in your PATH, or put your BACI program in the same folder of bacc. Note the .cm extension. This is the extension that identifies BACI source files to the BACI compiler.

  2. Invoke the compile command bacc This creates an object file called your_prog.pco and also a listing file called your_prog.lst.

  3. Invoke the interpreter through the command bainterp your_prog (please note, there is no suffix here) to execute your code. bainterp has an option -t that will display the order in which processes terminate within the program.

Verify the installation of BACI

  1. Download

  2. Run command  bacc If you see following outputs, then the is successfully compiled:

bo@HEC-2GQFTK1:~/Documents/BACI$ bacc

Pcode and tables are stored in example.pco

Compilation listing is stored in example.lst

  1. Execute command  bainterp -t example. If you get following message, then bainterp runs correctly.

bo@HEC-2GQFTK1:~/Documents/BACI$ bainterp -t example

Source file:  Wed Jan 22 15:16:12 2014

Executing PCODE ...

before v(count) value of count is 0

process 2 increment,  procedure increment ended

before p(count) value of count is 1

process 1 decrement,  procedure decrement ended

More Options of BACI Compiler

A BACI source file using the C-- compiler should use a .cm suffix. To execute a program in BACI, there are two steps:

1. Compile a ".cm" file to obtain a PCODE file (.pco)

Usage: bacc [optional_flags] source_filename


-h show this help

-c make a .pob object file for subsequent linkingInterpret a PCODE file (.pco) to execute the program

2. Usage bainterp [optional_flags] pcode_filename


-d enter the debugger, single step, set breakpoints

-e show the activation record (AR) on entry to each process

-x show the AR on exit from each process

-t announce process termination

-h show this help

-p show PCODE instructions as they are executed

There is a shell script, baccint, that will call the compiler and then call the interpreter for you. It passes the options that you give it along to the interpreter. If you are using the Pascal compiler syntax, then the source file should be with a .pm suffix, and you compile the program with the bapas compiler.