March 15, 2012

Hcs08 Microcontroller instruction Sets Explained

The Full Hcs08 instruction Set

All S08 instructions (arguably all computer instructions) can be plan of as three basic types.

Data movement - a value is read from one location and written to another. All of the load/store instructions are examples of movement from one location to a separate one. One of the locations is commonly somewhere in main memory and has an associated address, the other is in one of the Cpu registers and has only a name. Information flow can occur in either direction (depends on the instruction). Also the load/store instructions that involve a Cpu register and main memory there are several replacement that move (copy) data from one Cpu register to another. There is one instruction, mov, that copies from one memory location to another. There are also a estimate of instructions that write an implied value (usually ones or zeros) to a Cpu register or memory location. Clra, is an example.




Data processing (Alu) - there are two types; unary and binary. Unary instructions control on only a single value obtained from either a Cpu register or a memory location and write it back (the same place) after some modification (processing). Nega is an example. Binary instructions control on a pair of values which they couple in some fashion to yield a result. These instructions approximately always have at least one of the values come from a Cpu register and place the consequent back in that register. Add is an example. A value is obtained from register A and from a memory location. These values are combined (processed) using the arithmetic increasing operation, and the consequent is written back in register A

Program-flow altering - where the value of the Pc is (or in the case of conditional branches, might be) changed from its normal upward counting sequence. This type of instruction is used to make subroutine calls, code loops, and code if-then-else style program constructs, to name a few.

Hcs08 Microcontroller instruction Sets Explained

Spanish Fan Club La Liga