64-bit ARM is here

January 23, 2017

 

Last year I updated my Raspbian ARM Assembly Language book to cover the Raspberry Pi 3 release.  The major addition was to update some of the program examples to reflect address changes in the operating system, especially which access the GPIO port. No great shakes.

However, the release of the Raspberry PI 3 includes a major internal change in that the system was moved onto an ARMv8 architecture with the introduction of the ARM-Cortex A53 microprocessor as the CPU of choice. The ARMv8 architecture had introduced with its release a 64-bit system, as well as the traditional 32-bit system. Both brought with them two new instruction sets. Well, the 32-bit system, now called AArch32, was largely backward compatible with the original ARM instruction set, whilst AArch64 was an entirely new instruction set altogether.

At the time, there were no new operating systems for the Raspberry Pi to take advantage of the 64-bit infrastructure. So, the A53 chip was operated in AARch32 mode and was effectively running as an ARMv7 architecture. Raspbian – the ‘official’ operating system, remains a 32-bit based system and is likely to remain so for the foreseeable future.  It would need to be re-written to utilise AArch64.

Recently several 64-bit systems have been developed, Arch Linux now has a 64-bit flavour for the RPi and others are becoming available, so for coders anxious to learn more the tools are there.

The current Raspbian Assembly Language book will not be updated to include 64-bit programming. Mainly because the two are like chalk and cheese. Although there are some similarities, there is also a lot of change and also redundancy. The option remains, of course, to write a 64-bit Assembly Language book and that is what I am investigating at the moment.

You cannot switch between AArch32 and AArch64 modes within programs in the same way you can with ‘old’ ARM and Thumb instruction – called interworking – it is one or the other. So how you boot your system determines what mode you operate at the processor level. AArch32 should ensure that the fantastic backward capability that is so inherently part of the ARM design remaining. But AArch64 is a totally different beast!

As for an AArch64 Assembly Language book? Watch this space…

 
 

Happy Halloween Update

October 31, 2016

 

halloween1I CANT believe it’s over a a year since I last posted – as I say this is an occasional blog! However the next item will explain part of the reason…

31 October 2016
Contact Responses
My apologies to anyone who has contacted me via the website or Facebook over the past few months. Due to illness I have been ‘offline’ for quite a while and have not in a position to reply to questions or comments. I will slowly work my way through all outstanding queries over the next few months. There is a fair backlog so it may take a while. Thanks for your understanding.

31 October 2016
Raspbian Assembly Language Beginners
Edition 3 of the book has been on sale for a few months now. This covers Raspberry Pi 3, 2, 1 and Zero. Amazon does not allow the date of publication to be updated, thus the current date on the site of publication is 19 Aug 2013. I control the files that are utilised for the book and I keep these all current. So what you order should always be the latest edition of the book. Please download the program files to ensure you have the latest version if you are having issues with functionality. Download Program Files

31 October 2016
Raspberry Pi Insider Guide
The current edition of this title covers the all models including models A, B, A+, B+,2. It was written before the release of the Raspberry Pi 3. That said the look of the initial start-up screen has changed. The functionality largely remains the same so the descriptions therein remain applicable. Another area of change is in the start-up process where latest releases of the Raspbian software boot to the Desktop and by-pass the original configuration process. However, the configuration coverage remains relevant as users may wish to alter their Raspberry Pi seatings at some point.

 
 

Free Book PDFs

September 24, 2015

 

 

ScannedBooksOver the past months I have managed to organise myself to do something that has been in my head for a couple of years. No not a sanity check, although that might still be on the cards – but getting the text and substance of some of my pre-Print-On-Demand books into an electronic format.

These are books that were published prior to 2004 before the whole eBook and self-publishing era got full on. Whilst I did author many of them (all but two in fact) using a wordprocessor the original text has long since washed away (the first two were written long-hand – blue ink on A4 ruled pages!).

I found a local company here in Sydney to do the first ten books of my choice and I now have these as both PDF and text files. I had hoped to use the text files to create eBook versions however, the technology (and also some of the fonts used in those original books) does not allow for a perfectly clean and accurate file to be produced. There is no regular consistency to the ‘errors’ so all the files require a lot of editing. I am not sure they will appear as eBooks anytime soon. However, the PDFs are very usable so I have started to make these available via my website, free of charge. Currently there are four BBC Micro and Amiga related titles available.

Titles currently available are:

  • BBC Micro Assembly Language
  • Interfacing Projects for the BBC Micro
  • Advanced Sideways RAM User Guide
  • Total Amiga Workbench

 

Some of the others coming soon can be seen in the attached photo.

I know that many who have downloaded these already have found them of use applying their contents to the keyboards of aging BBC Micro’s and Amiga’s they still own. But anyone who is interested in the world of 8-bit computing might find them interesting and can experiment with them by running corresponding emulator software on their current flavour of computer – PC or Mac for example. Alternatively you may just have a nagging curiosity to learn about the hardware and software that charged the biggest take-up in home technology history has seen.

From my point of view I just like to think that these files will be of interest to future generations and I keen to get them out there in the interweb and beyond the cloud.

 

Why do I need a book when it’s all on the web?

December 31, 2014

 

Raspberry Pi Insider Guide

Do I really need a book where all the information is in one place, and always readily available?

People often ask me why they should purchase one of my books when they can get all the information and learning they need from the web? It’s a fair question, and over time it is one I have thought hard about, so much so that my response nowadays is simply: ‘Can you?’

We all know there is a vast amount of information on the web, but a lot of it’s repetitive, and without structure or depth. Some of it is also of dubious quality and, on occasions, just plain wrong. Of course, there is the exception to the rule and I can think of several websites that are amazing works and both comprehensive and accurate in their coverage. But they are few and far between. If your intention is only to occasionally dabble in a particular subject then there are sites that will provide you with exactly what you need. If you are serious about leaning and mastering a subject then a book wins hands down.

I received an email from an interesting character a few months back who was asking me some questions about various aspects of programming in Raspbian. I answered briefly and also suggested that he would find exactly what he need in one of my books (I am a salesman at heart!). His response was that he didn’t need a book and could get everything he needed off the web. I could only assume he meant from me, as the information he was after wasn’t presented by any search engine I tried afterwards.

Most of my books come in at around 80,000 words; some like Raspberry Pi Insider Guide exceed that by more than 30,000 words. That’s a lot of work and I have yet to see that sort of textual commitment on any website. Books are therefore often more comprehensive in their overall coverage of a topic. And once you have the book, printed or electronic, it remains with you, and that cannot be said of a website which can disappear without trace overnight.

 
 

The Digital Human

December 01, 2014

 

Cast me away on a desert island and the one thing I would ask to take with me would be podcasts. Being able to listen to my favourite radio shows when and where I want is amazing. Often it is on the drive from here to there and back again, or going for a stroll and loosing myself in my earphones. Every morning my iPhone is primed ready to go as subscriptions are downloaded seamlessly to memory while I slumber. Often the biggest issue is how to fit them all into the listening day – but I find some really relaxing when writing, especially the sport phone ins! BBC s Drama of the Week is perfect for the car and it’s not unusual for me to drive the long way around to ensure I get the full 60 minutes I need!

AleksKrotoski

Science and Technology also feature well on my subs list, but if there is one standout production I would recommend then it’s the Digital Human. Presenter Aleks Krotoski (pictured) examines what it means to live in a digital world. Now it its sixth series each week’s show tackles a particular subject. In the latest series topics have covered Risk (how we expose our self on social media sites such as Facebook), Nostalgia (how the Internet takes advantage of our weakness for the past) and Ethics (can we embed ethics into our technologies?). The subject matter deals with everyday living and the impact technology has on us – seen and unseen. You can download the back editions of the Digital Human podcast and get the latest releases at http://www.bbc.co.uk/programmes/b01n7094 . Check it out.

 
 

Which OS, Which Book?

March 04, 2014

 

Assembly Language RISC OS Beginners is a perfect place for novices to start learning fow to program ARM machine code on the Raspberry Pi.

Assembly Language RISC OS Beginners is a perfect place for novices to start learning how to program ARM machine code on the Raspberry Pi.

The ability of the Raspberry Pi to run different operating systems is very appealing. It means you can choose a working environment that best meets your computing needs. But it can also lead to issues when it comes to choosing an operating system when you do not necessarily have a lot of experience with any of them. This can be especially galling if the Raspberry Pi is your first foray into the use of computers.

I had a similar problem when I opted to write an introduction to assembly language – which OS? I selected RISC OS because I thought the benefits of using the assembler that is part of BBC BASIC made it an overwhelming choice. Simple, easy, tried, proven.

Although RISC OS has a great support base it doesn’t have the numbers that a more main stream OS such as Linux and Debian has, and in particular the Raspbian version of the OS that is available for the Raspberry Pi. As I was getting numerous enquires about a Raspbian version of the book I took the plunge and published Assembly Language Raspbian Beginners and then subsequently revised and updated the original Beginners tome and renamed it Assembly Language RISC OS Beginners.

The question I get asked now by those wishing to learn assembly language on the Raspberry Pi is ‘which book should I use?’ I would suggest in the first instance that anyone in this position should spend a few hours looking at both of the operating systems. They are available free and are readily downloaded. Dedicating an SD Card for each one will enable you to try both simply by changing the SD Card. On Amazon the first few chapters of each book of the books are available to view free of charge (more if you ‘join’ and sign-in). Thus you can read the beginning of each book book, try a few examples and start to analyse which one you prefer working with. After all this is going to be your experience.

Here are the appropriate links for the book previews:  RASPBIAN       RISC OS

Both books contain similar information but it is presented differently by necessity of the OS. Thus by the end of either book you will have covered largely the same information and have similar skills. The Raspbian book uses the GCC Compiler (supplied with the SD Card image) to run through all the examples. The RISC OS book starts by using the BBC BASIC Assembler (supplied with the SD card image) and then goes on to show the use of the GCC Compiler (a simple free download from the Desktop). The BBC BASIC Assembler has been around for several decades and is tried and tested. Personally I believe it is the best tool available on the Raspberry Pi to learn assembler. I stress the term ‘learn’. The BBC BASIC Assembler (currently) cannot do everything that the GCC Compiler can do, which is why I cover it later in the book by which stage you will be comfortable with using ARM assembler.

Programming using the GCC Compiler is coverd in both books.

Programming using the GCC Compiler is covered in both books.

Operating system access is also a key consideration. When you are writing assembly language you will want to access routines that will allow you to undertake tasks such as reading input from the keyboard and writing output to the screen. These basic tasks are available in both OS however the level of support for other tasks is infinitely superior in RISC OS.

Support from external sites should also be considered. RISC OS is managed by a single entity and has an excellent forum and documentation (https://www.riscosopen.org/content/). Raspbian is open source and community developed and so is probably less co-ordinated (http://www.raspbian.org/). That said Raspbian has by far the bigger take-up and usage when compared to RISC OS and there is a wealth of information related to Linux & Debian. A look at the posts on the Raspberry Pi Forums will confirm this.

It may seem like I am beating round the bush here, and I probably am. I am a firm believer that RISC OS should have been the default OS for the Raspberry Pi. It is safe, tried and tested, is small quick and easy to use. If you are totally new to using the Raspberry Pi then I would suggest that the RISC OS is the best place to start in relation to the two books. If you are a regular computer user and are familiar with a DOS style environment then I would probably say opt for the Raspbian version of the book, especially if you are planning to learn assembler for more than just educational purposes.

But for your own sanity I would strongly suggest taking the route outlined above – get both operating systems installed on SD cards and work through the early chapters of each book – and let that be a key factor in making your own mind up.

 

Manuscript Completed – long exhale…

October 23, 2013

 

ROSP RPiThe final daft of my manuscript for ROSP (81,000 words) surged through cyberspace to my editor and beta reader just a few hours ago. Just in time too as I was seriously wilting from the heat and smoke that has descended on Sydney in the past week. Can’t even begin to imagine what it’s like for the fire-fighters who’ve been working around the clock to ensure the safety of those affected – many are volunteers too. Incredible what they do – everyone of them a Hero.

I’ll get a full and hopefully final contents list up on the website shortly, but its pretty much as per the original spec although I have re-arranged some chapters, especially the ones dealing with sound. Over the next couple of posts I’ll go into a bit more detail about the contents of the book.  As I’ve mentioned sound already let me run you through what’s covered here.

Four of the 25 chapters are given over to sound and programming sound on the RPi. This is an area that has really developed in the past year or two. RISC OS was originally launched using an 8-bit system which was really very clever in the way it worked. By RISC OS 3, 16-bit sound was catered for but it still relied on heavily the original 8-bit software.

At home with Sonos - Raspberry Pi Surround Sound. The RISC OS sound system has got serious.

At home with Sonos – Raspberry Pi Surround Sound. The RISC OS sound system has got serious.

In recent years though this has changed, and the release of new software has by-passed the old 8-bit interface such that it is possible to achieve almost anything, including running and mixing several sound streams together or in parallel. The chapters in the book detail how the sound system is pieced together and includes a look at the various *commands and SWI calls that you can use for programming purposes. There are several demonstration programs listed as well.

The RPi has two audio outputs: HDMI – often through an attached HDMI monitor – and 3.5mm jack. These both work effectively and you may also have additional hardware attached. If you want to ensure that your sound system is working correctly then you could load one of the sound examples found in $.Documents.Music on the RISC OS Pi SD Card into the Mastero application (in the Apps folder) and try playing it. It may take a few seconds to buffer and filter through, but once it’s playing you are assured you have a working sound system. Don’t worry if you are not especially musical – it is amazing what you can do with a little knowledge.

Returning to the ROSP book production: the process now is to wait for my editor to return me his marked-up copy of the manuscript and I’ll merge this with comments from my beta reader to create a final file ready for formatting. Still on schedule for a late November publication.

(Not to early to be thinking about Christmas presents you know!)

 

The final weeks to a new book

October 11, 2013
The cover for RISC OS System Programming

RISC OS System Programming for the Raspberry Pi will be available from Amazon late November.

 

I don’t know about you but this week has been busy. The clocks changed here in Sydney last weekend –  forward an hour – and that always annoys me. I like to start my day early, and the ‘lost’ hour is causing a bit of havoc.

I’ve officially announced my next book – RISC OS System Programming  – which is due out late November, and it’s important that I meet my deadlines to ensure it happens. The feedback from RISC OS users has been great, with words of encouragement via Twitter and my website.  Thanks to everyone who has re-tweeted details as well. If you haven’t seen the announcement head over to www.brucesmith.info or my Facebook page at www.facebook.com/authorbrucesmith

I have one full chapter and about three half chapters left to write, then I will be at what I call the First Draft stage when all the chapters are written and in place. Come Monday, I’ll start going through each chapter reading and editing as I progress. I’m always looking to shorten the text as this normally makes definitions and explanations clearer and more concise.  As the chapters will now be in their final order, I’ll number figures and programs and make sure they are cross-referenced correctly in the body of the text.

I will find that I’ve left a few notes to myself in the text,  normally to remind me to check something I couldn’t at the time I was writing the item. I’ll do the checks and adapt the text accordingly if needed. With this all done I’m at the Second Draft stage. I plan to be at that point come next Tuesday.

I’ll let you know how it goes.

 

The age of the disposable computer has arrived

May 04, 2013

 

Is the Raspberry Pi a disposable computer?

Is the Raspberry Pi a disposable computer?

One million and counting. Sales of the Raspberry Pi continue to escalate.  With the availability of the Model A, I for one wouldn’t be at all surprised if the two million mark was hit before the end of this year. This is fantastic news for the Foundation and should ensure that the product remains strong in a market that looks as if it might become increasingly competitive.

What the market has lacked for a long, long time is an inexpensive – cheap – system that is readily accessible and has access to a wide variety of free software.  It would be unfair to bracket the Raspberry Pi as a disposable product but that is almost what it is, and that makes it affordable to everyday people that are intrigued and what to find out more.

Thirty years ago it was the BBC Micro. Although the Beeb wasn’t cheap, it was affordable. And with its user port and other interfaces it was connectable and extendable.  The likes of Amiga’s came and went but they were not designed for their connectivity. The ‘IBM’ and Mac arrived en masse to the market, but ‘office machines’ were not designed to connect-up and so the day of the ad hoc ‘computer hardware tinkerer’ passed, but not because of a lack on interest.

The dominant market now for the Raspberry Pi is interfacing projects.  When my local user group meet, the focus is on hardware projects of all shapes and sizes. There is plenty of expertise on hand and people can achieve some real results in a few hours on any given Sunday.  I have been approached by several publishers to re-invent my 1984 classic (which I am very proud to say is in the Computer Hall of Fame) “Interfacing projects for the BBC Micro” for the Raspberry Pi. A look on Amazon shows many other book projects in print.

A version of the BBC classic may be forthcoming for the Rasperbbry Pi.

A version of the BBC classic may be forthcoming for the Raspberry Pi.

Of the people I know who have Raspberry Pis’, most have three and many have five or six. That puts a slightly different perspective on the distribution of the one million sold. Penetration is perhaps not quite as good as you might think in terms of actual quantity of users. For those who have just the one Raspberry Pi , most intend to get a second or more in the near future.  For the record, I have four.  I use two for programming/interfacing (one running RISC OS the other Raspian) and the other two as media centres.

The Raspberry Pi has become the go-to-board for hardware projects, and I think we will see the Model A sales being snapped up in this sector of the market as an even-lower low-cost controller. Significantly, at the time of writing, demand is continuing to outstrip supplies.

Casual users of the Raspberry Pi  are turning to user groups or Raspberry Jams to get their own interfacing fix.  Recently the Ozberry Pi group in Sydney staged a three-hour meeting that was sponsored by Element 14 where some 40 enthusiasts gathered and worked step-by-step together to attach an LED to their Pis and use a small section of code to flash them on and off.  This simple project wasn’t without issues during the evening and also exposed the attendees to the hard truth that the most simple computer tasks can be very frustrating for even experienced users!

But the smiles on the faces from the attendees who ranged in age from 7 to 70 showed it was worthwhile. The Raspberry Pi is hitting the mark.