Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

Machine Language Programming and Using a Microcontroller Data Book

10
This article is about machine language programming and the short op-codes and symbols that you need to understand.
The first step is to get yourself an HCS08 microcontroller data book.
If you have one, flip open to figure 7-2, otherwise just follow along and you will be fine! I will start with the EXT, which indicates an extended address.
That is what you should have expected.
A glance to the right of the C6 shows that the operand portion of the instruction format consists of two bytes indicated the above referenced hh and ll.
Note that all of the entries in the operand field consist of zero, one, or two double letters.
These are like variable name that indicate that any value can appear in a given instance of the instruction.
Only the opcode is fixed.
The double letter is to help you recall that each name stands for a pair of hex digits.
Thus, in an actual instance of the instruction in a program, each double letter will be replaced by an 8-bit value normally expressed as a pair of hex digits and will be in the range 00 FF.
It does not indicate that both hex digits must be the same value! The letters themselves have been chosen to help you remember the role of the operand in that particular instruction format.
It not only tells you there are two bytes (4 hex digits), but also that the first byte is the high-order byte and the second is the low-order byte of a 2-byte (16-bit) extended address.
The exact meaning of each letter pair is no longer given in Rev.
5 of this manual.
They have been picked to be mnemonic letters.
ii means two hex digits (one byte) of immediate data.
dd means two hex digits (one byte) of a direct address.
The complete address is found by using 00 as the first byte of the address and the dd digits as the second.
hh and ll have been covered.
ee is the most significant byte of a two-byte offset that is temporarily added to the content of the H:X pair or SP to form the address of the operand.
ff is either the least significant byte of a two-byte offset or the entire one-byte offset that is temporarily added to the content of the H:X pair or SP to form the address of the operand.
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.