Zen of Assembly language :: Can-Pop Assembly

Zen of Assembly language

Assembly Language Zen

My answer is generally...write a disassembler. You have touched on ARM, perhaps you know all of the ARM instructions, perhaps not, what about thumb? ARM is a good one to learn with this method, both popular and fixed instruction length, so you can disassemble linearly from beginning to end.

I dont mean write a polished sourceforge worthy disassembler, maybe write 5 or 10 lines of assembler at a time, max, maybe the same instruction with different registers, just enough to parse the binary with a bit if-then-else tree or switches.

add r0, r0, #1 add r0, r1, #1 add r0, r2, #2

Your goal is to examine each bit in the opcode, understand why you can only have 8 bit immediates, understand why some processors only let you jump 127 or 128 bytes for a local conditional branch. You dont have to write a disassembler to do this, but for me it works to embed the information into my brain.

In order to create all the possible opcodes/instructions to test the disassembler, you end up learning all the syntax nuances for the assembler you are using. The assembly language in the chip companies book is not necessarily the exact syntax used by every assembler for that processor family. The mrc/mcr instructions (ARM) are a good example of this. gas in particular is known for the horrible job it does changing the syntax, making it more painful than the chip companies syntax and tools. It depends on what you are trying to do, if you just want to code a few lines or modify something, you dont need to know every corner case or assembler feature, but if you really want to learn the instruction set then I recommend this approach.

You might also like

Assembly Language Programming Tutorial - 51 - Creating a
Assembly Language Programming Tutorial - 51 - Creating a ...
Assembly Language Programming Tutorial - 34 - AND Instruction
Assembly Language Programming Tutorial - 34 - AND Instruction
Hasbro Furby (Teal)
Toy (Hasbro)
  • Furby responds to your voice and to music
  • Pet Furby s head, tickle its tummy, or pull its tail and see what happens
  • Get the free Furby app that lets you virtually feed your Furby and translate its Furbish language
  • App is optional and works with iPad, iPod touch and iPhone with iOS 4.2 or later
  • Includes Furby and instructions
Video-Tutorials.Net Inventor Essentials - A Comprehensive Introduction
Software (Video-Tutorials.Net)
  • Inventor 2013 Video Tutorials DVD. Includes disc, download and online access. See from any computer and no delay in starting your studies. Please allow 12 hours...
  • 24:46 hours, 311 videos, English language, part files included.
  • For dozens of sample videos that help you gauge the pacing and quality of our work, please visit our Amazon Author Page or our YouTube channel at videotutorials2.
  • VTN is an Authorized AutoDesk Publisher and is a leading provider of high quality, affordable CAD self-study video training.
  • Courses included in this bundle: Essentials (Interface, Data Management, Sketching, Part Modeling, Drawing, Assembly, What s New), Intermediate Assembly, Surface...
Thames & Kosmos Thames & Kosmos Electricity and Magnetism
Toy (Thames & Kosmos)
  • Investigate the relationship between electricity and magnetism
  • Explore electricity with easy snap-together blocks
  • Experiment with a motor and electromagnet
  • Ages 8 and up can safely and easily experiment with electric currents and magnetic fields
  • New 2012 Item - includes 64-page full-color manual
Melissa & Doug Melissa & Doug Traffic Signs and Vehicles
Toy (Melissa & Doug)
  • 15-piece wooden set of vehicles and signs
  • Scaled to fit popular wooden train tracks
  • Play-and-learn activities recommend skill-building play ideas
  • All pieces store in a compartmentalized wooden box
  • Great for motor skills, color and shape recognition, and imaginative play
Hasbro Furby (Pink)
Toy (Hasbro)
  • The beloved, bilingual Furby is back
  • Who your Furby becomes might surprise you
  • Pet Furby s head, tickle its tummy, or pull its tail and see what happens
  • Get the free Furby app that lets you virtually feed your FURBY and translate its Furbish language
  • App is optional and works with iPad, iPod touch and iPhone with iOS 4.2 or later

Copyright © . All Rights Reserved