Arduino Assembly language :: Assembly

Arduino Assembly language

Screen Print

I am having fun with an Arduino Uno. I am old school; I started with a TRS-80 in the late 1970's, did a lot of Z80 assembly language. My computer had a massive memory (for the time) of 16KB, so in order to wring out a bit more, assembler was the way to go.

Gotta say, this Arduino brings back a lot of memories.

I bought a few tutorial kits (e.g. an Arduino Uno), and by the looks of it, the Arduino has a lot of similarities with my first computer, but it's a bit more powerful.

Its clock is 16MHz (my TRS-80 was 1.7MHz).
Its memory is 32KB Flash + 2KB SRAM + 1KB EEPROM (my TRS-80 had 16KB SRAM + 12KB ROM. And cassette tapes for storage)
It uses an 8-bit CPU (so did my TRS-80, which used a Z80).
Turns out that the Arduino IDE uses C++ as its 'main language' (that was Level 2 Basic on my TRS-80).

(And yes, these are KB - Kilobytes. Not Tera, not Giga, not Mega. Kilo. 1KB being 1024 Bytes. I still find it strange how, in 1978, I thought 16KB was unimaginably large, whereas nowadays 16KB in unimaginably small. My MacBook Pro has 8GB SRAM, more than 500, 000 times what my TRS-80 had. Wow. That still flabbergasts me.)

The Arduino IDE is cool and all that, but feels kind of wasteful, so I set out on a quest to do some assembler programming on the Arduino.

Turns out that a lot of effort seems to have gone into discouraging doing this. There is a lot of 'magic' going on, and the Arduino IDE hides a lot of complexity from view. With good reason; there is often no need to look beyond the magic. One can opt to just accept it, and it works perfectly fine.

But I like to understand how it all works; dig into the magic, take it apart, and figure out how it works. I've always found that if you understand the magic, you can make better use of it.

I am pretty sure that most of my future Arduino (or Pinguino or Uno32; I bought one each of those too!) exploits will be using mostly, if not exclusively C/C++, but my first experiments are aimed at understanding how to do assembler programming.

I had to do a lot of fishing around to get enough info: lots and lots of little tidbits here and there, but no real 'how to get started' cookbook. So I decided to put the tidbits together in a wee dokuwiki page, and make it as complete as possible, in the hopes that someone else finds it useful.

While searching, often all I am looking for are a few good, complete examples, and that gets me going.

The dokuwiki page below is an attempt to help other people get going, by offering complete, working examples.

I tried to cover all the necessary steps, from patching up your IDE to accept assembly source code down to some increasingly advanced sample assembler programs.

You might also like

EEVblog #45 - Arduino, PICAXE, and idiot assembler programmers
EEVblog #45 - Arduino, PICAXE, and idiot assembler programmers
Arduino Experiment: Playing with Inline Assembler
Arduino Experiment: Playing with Inline Assembler
LWW Computers LWW ipazzport KP-810-19 Germany + English Language Mini Wireless 2.4GHz 84-Keys Keyboard - Black
PC Accessory (LWW Computers)
  • Expedited Shipping Time 6-9 Days .
  • Standard Shipping Time 15-25 days.
  • Ships from HongKong .
  • Ship By Airmail With Online Tracking Information .
  • If you have any questions, please feel free to contact me .
Your Inner Geek, LLC C Programming with The Programmable Box (Orange-Kit)
Software (Your Inner Geek, LLC)
  • This is the first in a series of educational products that teach C Programming using The Programmable Box
  • Ages 10+, home schooling, classroom instruction, self paced instruction, computer clubs, science projects
  • A fun step-by-step approach where students write interesting programs using The Programmable Box which contains LED s, buzzer, range detector, and other input/output...
  • Extensive step-by-step manual (.pdf), Arduna Nano compatible processor, ultra-sonic range detector, buzzer, 6 colored LED s, potentiometer, momentary contact switch...
  • This is the kit version (also available fully assembled). Visit .your-inner-geek.com for complete curriculum included in instruction manual. 100% Satisfaction guaranteed...

Copyright © . All Rights Reserved