Back Home

Navigation

Home

SB-Assembler
News
Download
Quick Start
Source Files
Running SBASM
Expressions
Labels
Directives
Macros
Error Messages
How To?
History
Known Bugs

Cross-Overlays


Running The SB-Assembler

You must first write your source file(s) before you even need to start the SB-Assembler. So I assume that you have saved your source file now.
The SB-Assembler is started by typing the following command at the MS-DOS prompt:

SBASM sourcefile

The sourcefile is the name of your main source file and it should obey to the normal MS-DOS file name rules. It may be preceded by drive letter and path name. An extension is optional for sourcefile. If it is omitted the default extension .ASM is used.

The assembly process can be halted at any time by pressing almost any key, e.g. for taking a closer look at the listing that is sent to the screen. The message "Press almost any key to continue" is displayed to indicate that the assembly process is halted. Pressing almost any key will continue the assembly process again.

Pressing the ESC key at any time will abort the assembly process completely.

The SB-Assembler doesn't need obscure switches on the command line, like most other assemblers do. This makes it a lot easier to start the SB-Assembler. All options are selected by using directives.

You don't even have to enter sourcefile every time you start the SB-Assembler. This is particularly useful if you're working on a project. Type the following command at the MS-DOS prompt to pre-set the default sourcefile:

SET SBASM=sourcefile

Now you don't have to enter the sourcefile every time you start the SB-Assembler any more. But you still can supply the sourcefile parameter, e.g. if you want to assemble a different source file once. You may change the default sourcefile as often as you want using the MS-DOS command SET.

TIP: Usually you're not interested in the listing that is sent to the screen every time you start the SB-Assembler. You can switch it off by placing the directive .LI OFF on the first line in your source file.

If you don't supply the sourcefile (and didn't use the SET command to set up a default one) you are prompted by the SB-Assembler to enter a source file name.

The SB-Assembler does understand one switch, even though I said it didn't. The /? switch directly following the SBASM command will display a small help screen informing you how to use the sbasm command.

Installation

The SB-Assembler doesn't really require an installation process. 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!


Here's the procedure to add the ;..\ path to machines running Windows XP:

Right-click on "My Computer" and select "Properties" to open the System Properties window.
Select the "Advanced" tab and click on the "Environment Variables" button.

System Properties

This will open the next screen.
Now select (highlight) the PATH variable in the bottom list and press the "Edit" button.

Environment Variables

Now you can add the string ;..\ at the end of the Path.

Edit System Variable

 

© 2002, San Bergmans, Oisterwijk, The Netherlands
http://www.sbprojects.com