Get to know your ARM processor: Next instalment to Richard Murray’s Assembly guide
By Chris Williams. Published: 9th Apr 21:32:16 | Permalink | PrintableProgramming your RISC OS computer can be achieved using various programming languages and Assembly is one of them. It is black art often refered to as machine code, it directly instructs your microprocessor on what to do and even some university computer science departments avoid it, preferring sanitised languages like C++. Despite the mystery and complexities shrouding assembly coding, Richard Murray has decided to open the lid on the language and write a detailed guide on machine code programming.
“The ARM assembler site is your place for learning how to write code in
assembler under RISC OS”, announced Richard this week. “While there are examples for C/APCS, to get started you need absolutely nothing. Both !Edit and BASIC are built into your machine already, that’s all you need to learn assembler.”
Richard’s guide tackles assembly programming in an amicable and straightforward manner; every aspect is described in a step by step structure without any horrendous verbiage you might encounter on a certain comp.sys.acorn newsgroup. New topics and updates to the guide include:
- Converted archives to Zip. Now non-RISC OS users should be able to read them, SparkFS/SparkPlug can read them (the latter available via a link), and they’re smaller. Richard’s main aim for doing this is to attract non-RISC OS ARM developers and maybe woo them to programming for everybody’s favourite exclusively ARM based OS…
- Index amended, new section “32 bit operation” so all the 32bit stuff can be collected together.
- Added document outlining rules for writing 32bit code.
- Unsqueezing.
- Newsflash for C/C++/asm development from RISC OS Ltd.
- And a page outlining where ARM might crop up. :-)
drobe.co.uk contacted Richard and he explained to us why he started writing the ever-growing guide.
“Well, I didn’t know much assembler and when I looked around on the ‘net, there was precious little. So I figured I should learn, and write up my findings so that it might help others.”
Richard also revealed that it wasn’t all a smooth drive- there were some bits that he got stuck on first time round, something that will reassure any budding programmer. Official documentation was also something difficult to get hold of as it was generally in PDF format and Richard believed his RISC OS machine wasn’t upto rendering and printing off large PDF datasheets.
“I’m working on a few things in the background”, continues Richard. “The current two are a table listing all the opcodes, brief details, and links. Save you thinking ‘What’s ACS categorised under?’ I’m also attempting to break into the co-processor ASIC. I think it is kinda silly to have a lump of silicon in the machine and not have it doing much when the machine [PC Card software] isn’t running.”
Richard is quite intrigued by the Aleph One co-processor boards and after working out how to program the Intel-based processor, he would like to document his efforts in the Assembler guide. However, the PC card design is owned by Aleph One and they are willing, according to Richard, to provide information on programming the co-processor provided you sign a non-disclosure agreement to protect their product design, which is fair enough. This would unfortunately prevent Richard from publishing anything he has learnt about the co-processor. Despite his confidence in his ability to manually investigate the workings of the co-processor he admits it might be a demonstration in futility.
“Actually, to be honest I can’t see much point in running code on the 486, but I don’t feel the site would be complete without an example of how to do it.”
Finally, in a future update of the guide, Richard hopes to document the ARM processor vectors, a vector being the microprocessor’s SOS call when it hits something it didn’t expect. Just before we uploaded this article, Richard emailed us with details on what he is currently in the process of writing for the next update of his assembler guide (in his own words):
- Document SMULL/UMULL…
- Document LDRH etc…
- Write details on the software and hardware vectors, with examples.
- Provide source for a basic module what will reverse the L/R mouse buttons. It’ll provide a SWI to set state, and a *command to set the state. Basically, an example.
- Expand details of the FP instructions, and provide example code.
- See if I can’t find some processor pictures to accompany the text. Could probably make my own ARM2, ARM3, ARM610, and ARM710… Just gotta whip out the SP_Dual (no biggie, phone line being what it is!) and fit the HCCS Vision. Use Canon video camera, it’s resolution is better than the Sony.
- Pre-emption? Will need full explanations and a source. I’m thinking a module to load code into (?) RMA and run it under callback. [not really a priority at this time, but could be an interesting bit on setting up customised environment handlers!]
- Expand the processor detection code to include ARM6/7 (CP15?), and possibly StrongARM (Castle Kinetic?).
- Update the “All instructions” page, and all those called, so that each instruction takes you directly to it, not to a page containing several… Amend the all list to include common stuff you are likely to come across in assembler – the OPT thing is a good example.
- Write up ExtBASasm, detail it’s use, and provide links to it both in the page and on the main index.
- Send 16million colour demo to CodeCraft, and document it on the website.
- Finish that text (half written) on pre-emption types and caching methods [www.heyrick.co.uk/assembler/memmult.html]
- Try to locate any on-line reference to ARM2-ARM3 hardware/IOC etc.
Contacts
Heyrick ARM Assembler guide: www.heyrick.co.uk/assembler/
Guide Editor: armcode@heyrick.co.uk
Previous: Photodesk Ltd. slash digital camera prices
Next: AcornICQ to go open source
Discussion
Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end
No comments posted – yet. Post one yourself or come back soon.
Please login before posting a comment. Use the form on the right to do so or create a free account.
Read messages or start a new thread
–>
Search the archives
Today’s featured article
Didn’t make to the South East 2008 show in Guildford this year? Not to worry, because on top of the usual Drobe coverage, you can now watch videos of the presentations made by RISC OS Open and RISC OS Ltd staff at the event. Recorded live at the show, the videos, in which products and projects are talked up by developers to punters, also include question and answer sessions from the floor.

Random article
Paul Stewart sounds off on the platform’s electronic pollution

Useful links
News and media:
Iconbar • MyRISCOS • ArcSite • RISCOScode • ANS • C.S.A.Announce • Archive • Qercus • RiscWorld • Drag’n’Drop • GAG-News
Top developers:
RISCOS Ltd • RISC OS Open • MW Software • R-Comp • Advantage Six • VirtualAcorn
Dealers:
CJE Micros • APDL • Castle • a4 • X-Ample • Liquid Silicon • Webmonster
Usergroups:
WROCC • RONE • NKACC • IRUG • SASAUG • ROUGOL • RONWUG • MUG • WAUG • GAG • RISCOS.be
Useful:
RISCOS.org.uk • RISCOS.org • RISCOS.info • Filebase • Chris Why’s Acorn/RISC OS collection • NetSurf
Non-RISC OS:
The Register • The Inquirer • Apple Insider • BBC News • Sky News • Google News • xkcd • diodesign
RankTribe™ Black Business Directory News – Arts & Entertainment