ARM ASSEMBLER
March 2004...,
This resource is being updated - primarily in an effort to make the code and
examples more relevant to the (newer) 32bit environment.
PLEASE NOTE:
The ARM processor has always been a true 32bit processor.
However, in the 'old days' when 64Mb was an unimaginable amount of memory, we had a 26bit
Program Counter; the other bits being mode bits and processor flags (PSR).
These days, 64Mb seems remarkably restrictive so the PC is now 32bit and the mode/PSR flags are
in a separate register - actually it had been so since the mid-nineties when the ARM6 was
introduced, only the ARM6/ARM7/StrongARM supported a 26bit option so older software would work
okay. Because of this, RISC OS was never made '32bit' - until November 2002 - when it became so
out of necessity as the latest ARM processors such as the XScale no longer support the older
26bit PC+PSR mode.
This is what we mean when we refer to '26bit' and '32bit'... the processor itself has
always been 32bit - the width of the Program Counter is what has changed.
|
If you don't want to read all of this on-line, you can download a Zip archive and read it
off-line! Scroll down to the archives heading...
In front, an ARM610 (33MHz) processor and support circuitry on a RiscPC
processor card.
The RiscPC can accept two processors, the card behind the ARM being an
Intel 486SXL-40
also clocked at 33MHz. Note the incredible size difference between the
two processors.
On the left, an ARM710 processor card with a British 10 pence coin to give you an
idea of size.
On the right, the original series 80486 co-processor.
It gets rather hot, but not hot enough to require a heatsink or fan.
The ARM, on the other hand, gets most of its heat simply by being near the 486!
The other big chip on the co-processor card is the ASIC, a device to munge the 80486 I/O into
something that can interface with the ARM processor bus.
80x86 assembler for Pentium™, Celeron™ etc processors...
If a search engine brought you here, and you are looking for x86 assembler, then you are VERY
much in the wrong place!
Instead, you may find this resource useful .....
http://webster.cs.ucr.edu/.
The documents here relate to the low-power high-performance ARM
processors used in PDAs, mobile phones, laser printers, Gameboy Advance, and of course the RISC
OS computer range (formerly made by Acorn Computers, Cambridge, UK).
A lot of the detail relates to programming the ARM within the RISC OS environment, but it should
also serve as a general resource for those programming the ARM under any system. Please note,
however, that the 'Thumb' instruction set is not (yet) described.
Introduction
- News
There are no 'new!' markers here,
so be sure to read this to see what's new.
The instruction set
The ARM processor
The BASIC assembler
Relocatable Modules
Useful hints
APCS
32-bit operation
Mathematics co-processor
Hardware
Hackery
Can't find what you're after?
Examples
- Example 8: Rebound
...A game!
Demonstrates a stand-alone program, and floating point maths.
- Example 9: lowercase()
...Rewriting a commonly-used C function.
More interworking assembler and C.
(requires objasm v2.00, link v4.00, and cc v4.00 (or later))
See also:
- Example 101: Webite
...what better example than a web browser!
(well, sources for RISC OS would be nice - but... I'm sure!)
Opinion
Newsflash!
- My new computer!
I bought a programmer's RiscPC from CJE Micro's RISC OS Programmer's Initiative.
This is what I thought (in January 2001).
Links
- The Bush Internet box IBX-100
As the Bush box information is in /assembler/resources/, this lead some people to
figure that this is part of my assembler section. It isn't actually... But here's a link in
case you came here looking for it.
The reason why the pages are in with the assembler stuff is long and tedious. Don't ask.
If the downloads don't work...
Archives
IMPORTANT The archives are now in Zip Deflate format. Early versions of Spark and
PKUnZip may have difficulty in extracting these files. However SparkFS, SparkPlug (see link
below) and WinZip should handle them without problem.
This change has been brought around by the fact that several non-RISC OS users wished to view the
documents, there were difficulties with viewing the HTML directly from the archive (this works
fine with SparkFS), and Zip deflate compresses better than the Spark format (429K rather than
538K).
- Download SparkPlug v2.25 (84K)
To use this software:
- Set the filetype of the downloaded file to BASIC (&FFB), if it is not already.
- Change the current directory to where you would like SparkPlug to be written to. You
can skip this step if it is fine to temporarily write to the root of the currently
chosen drive.
- Double-click on the file to begin extraction.
A suggested alternative is to copy the splug/basic application into RAMdisc, type
*RAM
(to select RAMdisc), then decompress to there, and finally to drag the
decompressed application to where you'd like it to be. You'll need a RAMdisc of at least
208K.
And finally...
Like the rest of heyrick.co.uk, this section was written entirely by hand with !Edit (a
fairly basic file editor); originally on a 4Mb A5000, latterly on a 32Mb RiscPC 710. No
specialised site development tools were used, and don't hold your breath waiting for fancy flash
introductions and whizzy Java front-ends. It ain't gonna happen. The content rules. Anything else
is only going to obscure the bigger picture. The top titles are in a purpley colour. That, and a
few pictures of sexy hardware, are about as fancy as it gets.
The HeyRick assembler site has had approximately
Warning: fopen(counter.dat): failed to open stream: Permission denied in /usr/htdocs/heyrick/assembler/index.html on line 825
Warning: fread(): supplied argument is not a valid stream resource in /usr/htdocs/heyrick/assembler/index.html on line 826
Warning: rewind(): supplied argument is not a valid stream resource in /usr/htdocs/heyrick/assembler/index.html on line 828
Warning: fwrite(): supplied argument is not a valid stream resource in /usr/htdocs/heyrick/assembler/index.html on line 829
Warning: fclose(): supplied argument is not a valid stream resource in /usr/htdocs/heyrick/assembler/index.html on line 830
1 'hits' since Wednesday, 2nd August 2000.
Last updated 28th April 2004.
http://www.heyrick.co.uk/assembler/ has a PICS rating to assure users, parents, and
educators that this is informational content on ARM programming, and not a haven for undesirable
content.
If you have any queries or comments regarding the rating of this area, please email me.
If you have any comments on the PICS system in general, please visit the ICRA.
|
|
Copyright © 1999-2004 Richard Murray - for more information, please read the
News page.
|
Return to main index
Copyright © 2004 Richard Murray