1 - Assembly on the ebm - Part 1Ultimately, the fundamental language of any computer is machine language. Although nowadays we can usually avoid it by using faster computer chips and high-level languages that provide low-level access (like C/C++), there are occasions when the need for speed and programming 'close to the metal' is necessary. For that, machine language is the key.
A complete survey of the ebm's language isn't possible in a single article, so this tutorial will give a brief overview of the ebm processor's architecture and code, and the next article will show a little 'hands on' programming.
RISC vs CISC
The SNK32 processor (the official name of the ebm CPU) is a RISC chip, or Reduced Instruction Set Computer. The PC world, as well as other common computers use a CISC, or Complex Instruction Set Computer. One of the primary goals behind RISC is to take the fundamental instructions a computer needs, optimize them, and allow the more complicated ones to be synthesized by the programmer or compiler. For example, an instruction to copy and increment a counter on a CISC computer could be broken up into two commands for the RISC processor, one for the copy, and another for the increment.
Although breaking up operations in this way may seem counterproductive, RISC processors actually have great performance gains. Since the computer now has a reduced variety of modes and states, the logic becomes simpler and cleaner; this equates to faster throughput, fast enough that the individual instructions can still perform as well (or better) than the combination would. On the SNK32, this simple design leads to all instructions being a single byte in size, making for compact code.
|Copyright © 2001-2006 ebmDevMag.com - Legal Notice|