Posts: 3
Joined: Fri Dec 26, 2014 11:07 pm

assembly language programming

Sat Dec 27, 2014 2:05 am

I have the Raspberry Pi B+ and I would like to obtain software so that I can program in assembly language. I will use 26 GIO ports and need to read and store information to transfer Paper Carillon rolls to electronic media to eliminate the paper rolls. I need an editor and an assembler. Where do I obtain this software?

User avatar
Posts: 13530
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: assembly language programming

Sat Dec 27, 2014 7:40 am

If you want to get started in assembler you could look at the Baking Pi - build a simple OS course.
It is aimed at the model A and B, so needs slight changes for the A+/B+ (as mentioned in this thread http://www.raspberrypi.org/forums/viewt ... 72&t=82871).

You don't need to use assembler to access the GPIOs though, you can do it in almost any language running under Linux. The usual recommendation is to use Python.

Software that you can use to write, build and execute programs is already included in the standard Raspbian build, although for bare metal (no OS) code I prefer to build it on a PC and copy it to the SD card to run on the Pi. The course mentioned above gives details of how to set up a suitable assembler for that.

Posts: 7838
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: assembly language programming

Sat Dec 27, 2014 10:50 am

Note that you still can write Assembler programs under
Linux like in the days of MS-DOS (but Linux should have much
more features). It might not be necessary to completely
reimplement USB and Networking support on baremetal then.

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
Posts: 236
Joined: Sun Dec 01, 2013 2:24 pm
Location: Leiderdorp, NL

Re: assembly language programming

Sat Dec 27, 2014 12:06 pm

I use Midnight Commander and it contains an editor.

Why do you use an assembler for? If you are an assembler goeroe then go for it, otherwise coding is very hard.

For (complex) functions you can better use c/c++.
Its is better to maintain and it is part of the raspian wheezy image.
If speed is not really an issue than Python is a good choice.

Succes with your project.
Success with your project!

User avatar
Posts: 3790
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: assembly language programming

Mon Feb 16, 2015 1:50 am

Once you get booted into the wimp, click on the apps icon on the icon bar, you will find two editors there, !StrongED is a programmers editor, and !Edit is a standard editor (with some programming features). As for an assembler, you can use the BBC BASIC V assembler that is built into the OS, or you can download !ASM, or !extASM, these are both quite good assemblers, you will need to track down a linker if you do any multi module stuff, as you likely will.

We are lucky in that on the Raspberry Pi coding for bare metal is made so simple, as we can do the coding and assembling in RISC OS with out any cavets at all, save the new kernel to an SD CARD in a USB Card reader, power down, and switch cards for testing. It is difficult to get a simpler setup for bare metal programming (unless you have two RPi, then do the coding in RISC OS on one, save it to an SD card in a USB card reader, and pop the card in the other, and go).

I hope this helps.
The Raspberry Pi is an ARM computer, that runs many Operating Systems, including Linux, RISC OS, BSD, Pi64, CP/M as well as many more.
Soon to add AROS to the list of operating systems.

Posts: 3
Joined: Tue Mar 10, 2015 9:46 pm

Re: assembly language programming

Tue Mar 10, 2015 9:53 pm


I found this thread via a search and wanted to inquire with the original poster as I am also looking to archive paper carillon rolls! I actually have a spare, functional roll player to use for this purpose as well.

My goal is to eventually be able to create a playback device for this music as well. I'd love to find out more about your project and if you've made any progress.

Posts: 3
Joined: Tue Mar 10, 2015 9:46 pm

Re: assembly language programming

Mon Jan 29, 2018 10:54 pm

Just curious if anything ever happened with this - my own project has been on the back burner and I'd like to make some progress on it. If you've been successful I'd love to collaborate.

Posts: 67
Joined: Sun Jul 01, 2012 2:38 am

Re: assembly language programming

Fri Feb 02, 2018 4:03 am

I have a chapter in my online book that provides an introduction to programming the GPIO in assembly language: http://bob.cs.sonoma.edu/IntroCompOrg-RPi/chp-gpio.html.

The rest of the book is an introduction to assembly language programming on the RPi using the GNU development tools. I make extensive use of C/C++ to introduce the programming concept, then show how it could be implemented in assembly language.

Return to “Bare metal, Assembly language”