ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


4 - Addressing Modes

Discussing the RPTR index also highlights an important aspect of all computers - the addressing modes. My unofficial list of SNK32 addressing modes is as follows:

  • Absolute Memory - The t register contains a memory address, which is used to refer to an absolute memory address. An example would be 'mov8 (t),r0'.
  • Immediate - Data is encoded in the instruction byte or the bytes following, and the CPU decodes or extracts it. This mode is exclusive to the ldt instruction.
  • Register - The data affects a specific register, like the t register, and so needs no addressing. However, the 't' still needs to be specified in code, such as for example 'dec t' for decrementing the t register.
  • Register Immediate - The instruction has a value embedded in it, which is a register index referring to the register used in the instruction. In assembly code it is referred to by a register number, such as 'mov t,r4', to move the t register's contents to register 4.
  • Register Indirect - Using the RPTR index, the instruction acts on that register. It is coded with the 'rp' entry; for example 'inc rp' would increment the appropriate register's value.
The following sections divide the instruction set into several broad groups to aid in learning them. For each entry, the acceptable assembly codings are shown, separated by semicolons, and a brief description is given. Note that this is just an overview, and for a more detailed discussion consult the Franklin SDK documentation.

The ebm/SNK32 packs a lot of performance in a little chip. For many (myself included) this will be the first exposure to the RISC architecture, and working with it will be a new experience. The next article takes a look at actually creating and running machine code on the ebm.

Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice