Installing SB-Assembler Version 3

Installing on Linux/Unix/MAC

Most computers running Linux, Unix and MAC have the Python interpreter language already installed, including the Raspberry Pi. You can simply check if this is true by typing the command python3 in a terminal. If it is installed you'll see the Python version printed followed by the Python prompt >>>.
You may exit the Python interpreter again by typing Ctrl-D.
If it is not installed you need to install the Python programming language first, before you continue installing the SB-Assembler version 3. The SB-Assembler needs at least Python version 3.2 in order to run. If yours is older than 3.2, try to upgrade first.

You may choose to install the SB-Assembler for the current user only (easiest), or system wide for all users. Usually it will be sufficient to install it for the current user only. Simply start by unpacking all files from the download package into a temporary directory.

Don't worry about the amount of text on this page. It's not difficult, as long as you follow the instructions. I'll direct you through the installation process, step by step.

Single user installation

For an installation for the current user only, copy the file sbasm and the entire directory sbapack into the directory ~/bin . For the less experienced Linux users, the ~/bin directory is the directory /home/you/bin, where you is the user name you used during login. If the directory ~/bin doesn't exist, create it before copying the files into it. Ubuntu will automatically add the directory ~/bin to your PATH, the next time you start a new bash shell. If your Linux/Unix version doesn't do that, include ~/bin yourself to the PATH variable in your ~/.profile file. Different shells have different ways to add a directory to the PATH, Google is your friend if you use another shell than bash.
All remaining directories from the unpacked zip file can be copied into your projects directory. If you don't have one, create one in a convenient place, wherever you like.
You can throw away the one remaining file, which is only used by Microsoft users.

System wide installation

System wide installation of the SB-Assembler requires you to be able to become the super user, or root. The process is much the same as for single user installations. The main difference is the destination of the file sbasm and the directory sbapack. They can be copied to the directory /usr/bin, which requires root privileges. Make sure everyone has the right to execute the file sbasm and has read access to all the files in the directory sbapack.
All other directories from the distribution package go, like before into your project directory, wherever you like that to be. There's no need to do that as super user, or root. If all users are interested in having these files at hand you could copy these directories to a shared directory.
In order to speed up startup times, and hence execution times, it is also recommended to pre-compile all the files inside in the directory sbapack. Normally this process is done whenever you run a program for the first time. However this will fail on a system wide installation because a simple mortal doesn't have the rights to write the .pyc files to a system directory.
The following instructions will do that for you:

cd /usr/bin/sbapack
sudo ./

Final note: On most systems the python interpreter can be found in the directory /usr/bin/. However, on some systems (e.g. FreeBSD) the python interpreter is located in /usr/local/bin/. In that case you will have to change the first line of the sbasm file so that it points to the proper directory. The same is true for the first line of the script, if you need that for system wide installation.
If you don't know where the python interpreter is located on your system, simply type which python3 in a shell and the system will tell you where it is located.

Installing newer releases

Installing newer releases of the SB-Assembler requires you to overwrite existing files with the newer versions. And don't forget to run the pre-compile script if you've installed your copy to the /usr/bin directory.

Installing Version 3 on Windows

Windows doesn't come standard with a Python interpreter. You can simply download it from There you can download version 3.2 or higher for your Windows version, which is usually the first link you can click on on the download page.
After downloading the file you can start it. Simply accept all default settings the installer proposes, especially you'll want the "Install launcher for all users" option.

Python laucher

That way running the SB-Assembler will automatically invoke the proper Python version, just in case you have more than one version installed.

Now it's time to download the SB-Assembler package, if you haven't done so already. After that you can unpack it all into a temporary directory of your choice.
Then you can move the file and the entire directories sbapack, headers and opcodes into a newly created directory placed wherever you prefer (e.g. C:\sbasm3). The remaining directories can be copied into your projects directory, wherever you like.

If you are upgrading from a previous install, simply overwrite all old files with the new ones by repeating the process above.

Remember where you've put the file Now add the directory containing the file to your system's path. A step by step guide on how to do this for Windows 7, 8 and 10 can be found by following this link.

Installing SB-Assembler Version 2

The SB-Assembler doesn't really require an installation process. All you need to do is copy some files into the right locations. But I can give you some tips to make life as comfortable as possible while working with the SB-Assembler.

  • Create a directory with the name SBASM somewhere on any of your hard disks.
  • Unpack all files from the download package into this directory. The most important files are the program SBASM.COM and all *.SBA Cross-Overlay files.
    It is important that all *.SBA files remain in the same directory as the SBASM.COM program. Otherwise the program could fail to locate them.
  • The directory OPCODE.TST contains files that were used to test all possible opcodes known to the different cross overlays. They are not really necessary but can be used as a reference because all specific SB-Assembler features are highlighted in these files.
  • Edit the PATH parameter in your AUTOEXEC.BAT file and add the path ;.. at the end of it. This will allow MS-DOS to find the SBASM.COM program in the directory directly above your current directory, one step back towards the root directory.
    You'll have to restart the computer to activate this new path. If you don't want to restart the computer now you can start the assembler by typing ..\SBASM filename.
  • Create a separate directory for each one of your projects inside the SBASM directory.
    Make one of the project directories your current directory.
    Edit your source files as needed. Then start the SB-Assembler by typing the command SBASM filename at the MS-DOS prompt. Because of the path ;.. you've added in your AUTOEXEC.BAT the program SBASM.COM will be found in the parent directory of your current directory.

    This way you don't have to worry about paths during your assembly work. All your project files are grouped together per project and the SBASM directory won't grow full of garbage leftovers from old projects.

Don't worry about your projects when updating the assembler after a previous installation. Only the original files from the download package will be overwritten by a new version or the same version. Your own work will be unaffected.

Please note that I am not suggesting that you don't have to make backup copies of your work!