home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
utilities
/
utilsa
/
asm
/
Docs
/
Manual
< prev
Wrap
Text File
|
1996-06-15
|
10KB
|
244 lines
!ASM v1.00
----------
Welcome to !ASM! !ASM is a very advanced assembler, with none of the
limitations imposed on you by BASIC or most of the other ARM assemblers
available. Features include:
- Auto expansion of commands with constants that do not assemble into one
instruction (no need for an ADRL!)
- Local labels, structs and macros
- RISC PC compatability
- full preprocessor including repeated sections of code, conditional
assembly, multiple source files and more
- support for floating point instructions (registered version only)
It takes no great mental strain to realise that !ASM was inspired by the
excellent !extASM, which, while having most of the features !ASM does, it
produces larger code and is not RISC PC compatable owing to a funny method
of encryption...
!ASM is SHAREWARE! That means that you need to register it if you find it
useful, or want to release any of your creations into the world. I impose
no evaluation period, merely the fact that if you register, development will
continue apace, and I'll fulfil my promises for the next few versions.
Other reasons for registering
-----------------------------
It's cheap! It comes with a colour !Zap mode designed specifically for !ASM,
a more comprehensive macro library. The shareware version is also slightly
disabled in that you cannot have more than 10 macros, or 4000 lines of
assembled code.
The registered version also supports the floating point instructions, and
I'm more likely to provide support to registered users.
Using !ASM
----------
!ASM takes in text files and regurgitates ARM code files. It can be used to
create modules, utilities, absolute files, etc, etc.
For those of you who haven't used !extASM before, its syntax is very similar
to BASIC's - labels begin with a '.', and the instructions all take the same
format. However, it sports some features that, once you've used, you'll be
unable to do without. It can auto-expand instructions that it would
otherwise be unable to assemble meaningfully, using a temporary register
where required. This makes instructions such as 'MOV R0,#257' finally
possible, as well as removing the need for a 'ADRL' macro.
It supports throwback, so you can remove those irritating errors much
quicker if you have a copy of 'DDEUtils'. It supports local labels, allowing
neater and more meaningful code, and has a comprehensive pre-processor. It
also has the benefit of not needing all that extra code that BASIC requires
to start itself up.
Auto-expansion
--------------
Some commands (MOV, for example) can be auto-expanded without the need for
a temporary register, and some (CMP, for example), need a temporary register
to store intermediate values. You can assign a temporary register with the
pseudo command 'TEMP Rn', where Rn is the register you wish to use as
temporary. I generally use R12 or R11, but any will do.
The ADR/LDR/STR auto-expansion may change the size of the code produced -
this will result in extra passes being used to compensate for any inaccuracy
incurred.
Local labels
------------
These are an immensely useful part of !ASM. Not only does use of these speed
up assembly, it also allows much more sensible names for labels in large
pieces of code. These are defined in the same way as global labels, but with
the first letter of the label as an underscore ('_'). The next 'main' label
(ie one without an underscore) will make all the previous local labels
invalid (they go 'out of scope'). While 'in scope' they perform just like
any ordinary label.
The parser
----------
!ASM contains an advanced expression parser, similar in capability and
operation to BASIC's. You can, therefore, have a constant like
'#45+(1<<3)-(2*3)' if you really want to. Note that these do compile
slightly slower than if you just used a single number. Binary numbers
may be prefixed with '%' and hexidecimal numbers with '&'.
The preprocessor
----------------
This supports several commands - see the reference file for full details.
#base <number> - this sets the 'code base' to <number>. By default, this is
at &8000, so for a module, you may want to reset it to 0.
#if/#else/#endif - these allow conditional assembly - their use should be
obvious. Note that the conditions are in the same style
as C condtions. This essentially means that '==' is now
the equivilence operator rather than BASIC's '='.
#rept <n>/#endr - in speed critical applications, sometimes repeating code
several times is needed to achieve the necessary speed.
These two commands allow you to repeat the enclosed code
<n> times.
#include <filename> - this command allows you to include another source file
at this point. It is useful to know that <tmp$path> is
set to the directory in which the original source file
is located.
#smile - produces a grin when things work well.
Pseudo-instructions
-------------------
Aside from the macros, which create new pseudo-instructions, several are
built in. Once again, the reference file contains full details, but some
of the more useful are:
INCBIN <filename> - this includes a binary file into the final object code.
Handy for including pre-calculated sine tables and
suchlike.
ALIGN - well, we should all know what this does by now. Unlike BASIC, it
pads with 0's to ensure that no garbage is left in the code.
DIV Rd,Rn,Rs - Actually a macro... The code for this originates on World of
Kryten BBS and was originally written by Hugo Fiennes
(I think...). As there was no licencing information with the
code, I presume it is PD, so here it is. This requires a temp
register to assemble correctly.
Defining macros is fully documented in the reference file.
The licence
-----------
By running !ASM or any companion program, you indicate that you agree to be
bound by these conditions. If you cannot agree, you must delete the software
from your system.
The software (!ASM and all associated files, including this one) is
SHAREWARE. This means that if you intend to use it for an extended period,
or to produce work for public release, you should register it. Registration
costs £10, and can be achieved by sending a cheque or postal order to:
Andrew Hunter,
18 Warren Close,
Elmswell,
Bury St. Edmunds,
Suffolk,
IP30 9DS
For your money, you will get the latest version, and will be informed of
any major updates when they become available (to which you can upgrade
by sending your orignal disc and and SAE). The registered version has
numerous extensions and is well worth while.
YOU MAY NOT DISTRIBUTE ANY WORK ASSEMBLED ON THE SHAREWARE VERSION OF !ASM.
THIS INCLUDES PUBLIC DOMAIN DISTRIBUTION AS WELL AS COMMERCIAL
DISTRIBUTION. You may, however, freely distribute work created on the
registered version of !ASM by any means you please.
The author (of !ASM) cannot accept responsibility for the mis-function of
any software created using it. This is obviously the concern of the author
of that software.
!ASM is Copyright © Andrew Hunter, 1996. However, you may distribute this
ShareWare version so long as you ensure that all files remain intact and
unaltered. If you suspect that your version has been tampered with, you
can obtain a genuine copy by sending a blank disc with SAE to the address
above. Any distributed version MUST have this file.
You may not disassemble, reverse engineer or alter any of the programs
contained within the !ASM directory at any time.
This ShareWare version may not be sold as part of any commercial package,
although PD libraries MAY distribute it so long as they comply with these
conditions, and do not charge above a reasonable price for their
distribution (say, 3 pounds sterling).
The registered version MUST NOT be distributed. You are permitted to make
backup copies for your personal use, but it MAY NOT be installed on more
than one machine at any one time.
The author (Andrew Hunter) CANNOT accept res