home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilss
/
sasm
/
SAsm
/
New
< prev
next >
Wrap
Text File
|
1993-09-15
|
7KB
|
174 lines
Version 1.4 of SAsm introduces several completely new feature. To
save you pouring through the manual from cover to cover looking for
them the most important ones are detailed here.
The changes which have been introduced are to allow all of the
parameters which previously had to be typed at the command line (and
more) to be inluded in the file as Directives. This should mean that
only the name of a single 'make' file needs to be typed and this file
can contain all other data needed to assemble the program. Once I am
sure that this works properly it will be possible to write a desktop
'front end' for SAsm which will enable programs to be assembled within
the desktop in a similar manner to Acorns (unbelievably expensive) DDE.
Even without the 'front end' you can now use SAsm within the desktop
very easily and assemble projects by clicking on a single 'Obey' file.
You will not now need to set the CSD as you will be able to use the
<Obey$Dir> OS variable to define the 'start point' of your project
directory structure.
The new directives
~~~~~~~~~~~~~~~~~~
# OBJ <filename> This is the name of the object file. If you also type
an object filename at the CLI the CLI filename will
override any internal OBJ filename.
# LIB <filename> The name of the Library file to be used. This will
override any library defined in the SAsm$Lib
variable. Using just '# LIB' without a filename will
force the assembler to ignore the SAsm$Lib variable
and is thus equivalent to the CLI 'L' switch.
# ERRFILE <filename> The name of the error file to be used. Again an
error filename typed at the CLI will override an
internal name.
# CLI The text following this is passed DIRECTLY to the
operating system. There is no error trapping. You
should not put comments on the same line as this
could confuse the OS.
# VERBOSE Equivalent to the CLI 'V' switch to force display of
macros inserted from a Library. The advantage of this
over the CLI switch is that it can be placed anywhere
in the source file(s) and only takes effect when it
is encountered.
# QUIET Switches off 'verbose'. Again can be introduced at
any point in the source so that macro info can be
turned on/off as required.
# XREF Switches label x-ref on
# NOXREF Switches label x-ref off. This and the previous
command can be used as often as needed to display
label info only where required.
As with all other directives there should be at least one space
following the directive.
Other improvements
~~~~~~~~~~~~~~~~~~
I have tried to make SAsm accept Tab characters (ascii 9) instead of
spaces wherever field separators are required in order to enable users
who wish to use editors such as Zap which can save files with Tab
characters instead of expanding them to spaces. I haven't tested this
feature extensively so if you have any problems with files using Tab
characters please send me a copy of the file that gives the trouble and
I'll try to fix it.
The 'line too long' error is now trapped by the pre-processor and will
generate a 'recoverable' error
There have been a couple of other minor 'internal' improvements which
result in a slight speed increase.
Using SAsm from the Desktop
~~~~~~~~~~~~~~~~~~~~~~~~~~~
As you can see from the new directives you can now include everything
needed to assemble an extensive project in a single short 'make' file.
This would normally be a text file and will contain all the preliminary
directives (org, size, type, etc) plus directives to define the object
and error filenames and the library to be used. Following these will
come a list of Include files to be assembled.
The main advantage of this system for desktop use is that it enables an
Obey file to run SAsm. For example, to assemble a desktop project you
should set up a directory structure as shown.
root
|
|
----------------------------
| |
source !app
The 'root' directory would contain your 'make' file and the Obey file
which will run it. It need not, of course, be the actual root
directory of a disc, it is just the root directory of your project. The
!App directory will be the RiscOS application directory for your
project. The 'Source' directory will contain all of your source files.
You could, of course, also have other directories to hold special
library files, error files, notes, etc. if required.
Assuming the Make file is simply called 'Make' the Obey file would
contain just two lines -
Set Project$Dir <Obey$Dir>
Sasm <Project$Dir>.Make
When you double-click on this file it will atomatically create an OS
variable 'Project$Dir (or whatever you want) and set it to 'Obey$Dir',
ie. to the 'root' directory of your project. It will then Run SAsm
(either from the RMA if you have loaded the Module version or from disc)
with the filename of the Make file.
The Make file should define the various parameters to assemble the
program using the <Project$Dir> variable. Alternatively you could set
the OS variable using the CLI directive from within the Make file. It
would also contain directives to define the error file, library and
object file, for example -
# errfile <Project$Dir>.err
# obj <Project$Dir>.!App.!Runimage
and the files to be assembled would be -
# include <Project$Dir>.source.first_*
# include <Project$Dir>.source.second_*
# include <Project$Dir>.source.third_*
or whatever they are called. Note that you can still use the
'descending trailing digits' wildcard to assemble the latest version.
Your Make file need not, of course, be in the 'root' directory, it could
be in the source directory if you prefer, (it is, technically, just
another source file).
If you don't have a hard disc you will probably prefer to have your
source files (and certainly the error file) on the RAM disc. As SAsm
doesn't create any temporary files you don't need much spare space.
To assemble a project in this way just double-click on the Obey file.
You will have to wait for the new 'front end' to have the messages
trapped in a desktop window, at present they'll just appear in a Command
window. You can, of course, use SAsm in a 'Task' window but this means
that you will need to define directories and type filenames again.
IMPORTANT
~~~~~~~~~
I'm continually trying to improve SAsm. PLEASE tell me if you have any
problems, even if you haven't registered. It's only by acting on your
bug reports and suggestions that I can continue to improve SAsm.
If possible send a copy of the source code that cause the problem,
preferably all the files, not just the one that caused the error, plus
any error files generated or any other information. Especially I need to
know exactly how the program failed, 'it wouldn't work with this' isn't
very helpful!
David Holden -- August 1993