You will be given some version information and finally be presented with a prompt:
1 ->You can just type:
load name-of-your-source-file.cat this prompt, and the file will be loaded. Saber can also read and understand object (.o) files, but it will not be able to give you as much debugging information as if you use the source (.c) files. If you are fairly certain that one of your object files is bug-free, however, you may choose to load it instead of the source file, as it will run faster than the interpreted C code.
If you need to load more than one source file or object file, you can specify them all on the same line, if you wish. If you link your program against any libraries, they should also be specified with -l as you would do when compiling with cc. For example:
load file1.c file2.c file3.o file4.o -lmwould load the source files file1.c and file2.c and the object files file3.o and file4.o, and link them against the math library (-lm).
If there are no errors in your source code, the prompt will return immediately. If there are errors, they will appear in this form:
1 -> load flites.c Loading: flites.c ---------------- "flites.c":29, main(), Used before set (Warning #290) 28: { * 29: bos_passengers = bos_left + how_many_passengers ( bos_dep[i], 'B', number_of_data); 30: nyc_passengers = nyc_left + how_many_passengers ( bos_dep[i], 'N', number_of_data); Automatic variable 'number_of_data' may be used before set. General options: break/continue/quit/edit/reload Suppress options: Everywhere/File/Line/Procedure/Name [b] ?The * appears next to the line where Saber thinks the error is, and you now have options on what to do. Normally, you will want to fix the error (by changing the file in emacs and saving the file (with Ctrl-x Ctrl-s)), and type r in the window where you're running Saber, to re-load the file (and hopefully get past the previous error).
For instance, in this case, the variable number_of_data has been used as a function argument before it has been given a value.
When the prompt is returned to you with no errors, you can just type run at the prompt. If your program takes arguments from the command line, include them on the line with run. If you want to use an input file, you can specify that as well:
run < name-of-input-fileUsing run allows you to catch run-time errors.
Note that Saber is fairly picky, and will generate a lot of warnings that cc might not, since it assumes that strange constructions in your program might be an error on your part rather than assume that you know exactly what you're doing and that you intend to put strange things in your program.
To get a list of topics Saber has help on, type help within the program. To get help on a particular command, type help followed by the command name. For more in-depth information, Saber has internal man pages. Type man within Saber to get a list of internal man pages that Saber has, or man followed by the name of the command for its man page.
In addition, Saber has a Unix manual page. To read it, at your athena% prompt, type:
man saber