If you&#x27;re into any electronics tinkering at all, a good way to get up to speed with assembly is to take a look at some microcontrollers, such as PIC and make some simple hardware projects happen.  There are tons of project blueprints out there along with code.  The beauty of it is that you can account for pretty much every peripheral on the device with your eyeball.  There are many versions of microcontrollers, but a grandfather one with RISC assembly is the venerable PIC16F84A.  It has 1 kb of program memory, 68 bytes of ram, and 64 bytes of &#x27;eeprom&#x27; ram.  That last part is like hard drive storage you can store settings in, or temperatures, or whatever.<p>The great thing is that you can download the IDE for the chips, write a program, and simulate its running for free.  The debugger will light up pins as needed and let you simulate input.  But, back to the understanding part: today&#x27;s CPUs are very complicated and have tons of parts.  The microcontroller is a very simplified version of it, and even so it&#x27;s complicated.<p>Imagine a microchip in your hand with 18 pins on it.  2 of the pins are power supply (+5 v and ground), another 2 are supposed to be attached to a crystal oscillator (for its CPU clock), 1 pin is a reset button of sorts (or rather a permission to run connection).  That leaves you with 13 pins to understand.<p>The remaining 13 pins are separated into ports &quot;A&quot; and &quot;B&quot;, both of which you can address in software and either read or turn individually on or off.  Port A has 5 pins and port B has 8 pins you can use for anything you like.<p>5 of the pins from port B can be optionally used as interrupts, just like on your desktop&#x2F;laptop.  Signal going into them, when configured for it, will interrupt your program and let you respond.  Like an alarm sensor going off, needing immediate attention.<p>If I recall correctly, any of the pins can be configured to do either reading or writing, though I can&#x27;t remember if you can change that mid-program or just configure startup time.<p>Normally, you fire up the MicroChip (company name) IDE, write a program, put a blank microcontroller in a simple &quot;programmer&quot; device (USB, or old school serial) and tell it to copy the program over.  These microcontrollers are reprogrammable, so you have plenty of room for trial and error.<p>Anyhow, in your very beginning of the assembly program, you tell the IDE what device you&#x27;re about to program and how to configure it for the &#x27;burn&#x27; and running:<p><pre><code>  processor 16f84a
  #include &lt;p16f84a.inc&gt;
  __config _HS_OSC &amp; _WDT_OFF &amp; _PWRTE_ON
</code></pre>
So far this is not programming yet.  This last config line is telling the machine a few things, but only a few.  Like &quot;hey I have a crystal connected to it&quot; or &quot;I don&#x27;t have a crystal, use some internal resistors to simulate a less accurate clock so it can run the program&quot; or &quot;turn code protection on -- meaning microcontroller is not allowed to be overwritten&quot; or &quot;I don&#x27;t need a babysitter watchdog in case my code freezes because I wrote good code and it won&#x27;t freeze and the hardware is good too and won&#x27;t cause a freeze either&quot;.  Anyhow, here&#x27;s some actual code.<p><pre><code>  movlw    B&#x27;00000011&#x27;
  tris     PORTA
  movlw    B&#x27;00000000&#x27;
  tris     PORTB
  clrf     PORTB
</code></pre>
This part defines how I want the pins on two ports to behave.  B&#x27;&#x27; notation means binary, so you can clearly see pins in code.  I load an instruction byte that defines pins (written in binary) to a working register (W), then copy the working register to PORT A&#x2F;B with the TRIS command and that sets the port operation.  Anyhow, in this code there I set two pins on port A as inputs for little contact switches.  Specifically, pins 18 and 17 on the chip are buttons.  Rest, including port B are all outputs, connected to LEDs.<p>After this point you have your chip up and running.  If you had 8 LEDs connected to individual pins on port B (via appropriate resistor of course), you can turn every other one on with this simple program:<p><pre><code>  main:
    movlw    B&#x27;10101010&#x27;
    movwf    PORTB
    goto     main
</code></pre>
The 1 corresponds to an LED being on, 0 to off.  If you wrote B&#x27;11111111&#x27; they would all be on (actually maybe they&#x27;d be off, I can&#x27;t remember if a 1 or a 0 is a voltage low or voltage high, but you get the picture!)<p>Here&#x27;s what a programmer device looks like that lets you transfer a program from a PC to the microchip: <a href="http:&#x2F;&#x2F;pp19dd.com&#x2F;_old&#x2F;geocities&#x2F;geocities.com&#x2F;krusko.geo&#x2F;jdm&#x2F;jdmandlily.jpg" rel="nofollow">http:&#x2F;&#x2F;pp19dd.com&#x2F;_old&#x2F;geocities&#x2F;geocities.com&#x2F;krusko.geo&#x2F;jd...</a> - you put the chip in the socket, plug it into a serial port, and hit a key on the keyboard.<p>Here&#x27;s the same microchip controlling a bunch of LEDs for a clock display: <a href="http:&#x2F;&#x2F;pp19dd.com&#x2F;_old&#x2F;geocities&#x2F;geocities.com&#x2F;krusko.geo&#x2F;7seg&#x2F;7seg-on.jpg" rel="nofollow">http:&#x2F;&#x2F;pp19dd.com&#x2F;_old&#x2F;geocities&#x2F;geocities.com&#x2F;krusko.geo&#x2F;7s...</a><p>Here&#x27;s how great this stuff is.  The microchip only has 8 outputs for port B, but in it I&#x27;m able to control 4 digits, each requiring 8 leds.  In other words, I&#x27;m controlling 32 LEDs with only 8 pins.  Way this happens is that I&#x27;m multiplexing at high speed through the 4 displays, and each one is only turned on for a fraction of a second.<p>Anyhow, there are tons of resources on this chip and its version of assembly out on the web, including this repository of hundreds of projects with code and hardware descriptions: <a href="http:&#x2F;&#x2F;pic-microcontroller.com&#x2F;project-list&#x2F;" rel="nofollow">http:&#x2F;&#x2F;pic-microcontroller.com&#x2F;project-list&#x2F;</a><p>The fun stuff in this assembly language is that there are only about 50 instructions total, so writing simple algorithms like &quot;divide this number by 2&quot; or &quot;multiply this number by 3&quot; or &quot;take square root of 14&quot; become fun academic challenges.<p>If you&#x27;re interested, take a look at this brief tutorial titled &quot;PIC Assembly Language for the Complete Beginner&quot;: <a href="http:&#x2F;&#x2F;www.covingtoninnovations.com&#x2F;noppp&#x2F;picassem2004.pdf" rel="nofollow">http:&#x2F;&#x2F;www.covingtoninnovations.com&#x2F;noppp&#x2F;picassem2004.pdf</a>