The Full Hcs08 instruction Set
All S08 instructions (arguably all computer instructions) can be concept of as three basic types.
Basic Microcontroller Tutorial
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 usually somewhere in main memory and has an associated address, the other is in one of the Cpu registers and has only a name. Data flow can occur in either direction (depends on the instruction). Besides the load/store instructions that involve a Cpu register and main memory there are some exchange 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 number 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 operate on only a singular 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 operate on a pair of values which they consolidate in some fashion to furnish a result. These instructions roughly always have at least one of the values come from a Cpu register and place the succeed 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 expanding operation, and the succeed 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 education Sets ExplainedMake Homemade Air Conditioner Electric Motor Drives Air Conditioning Compressor Troubleshooting