Bear in mind: It’s going to assist to have a HCS08 Microcontroller info reserve proper earlier than pursuing this text!
Allow us begin off by considering a established of 4 HCS08 tips. They’re the key subset of the load/retailer instructions. Two entail sign-up A and two the H:X pair as a key participant. The sign-up-A instruction’s operand factors to a solitary byte of reminiscence to load from or retailer into. The register-H:X instruction’s operand components to a double byte of reminiscence. The operands of all 4 appear equal, we should always convey to from the opcode no matter whether or not they are going to be finding out that website or writing to it and whether or not it reads or writes 1 byte or two. We additionally should “know” from the architectural necessities of the private laptop (the small print we wish are in Desk 7-2) that for the H:X suggestions, the operand particulars to the reminiscence location used with H and that the place employed with X is simply the upcoming one explicit down in reminiscence (has an tackle only one larger than the 1 employed with H). The instructions are:
load join A (lda) C6 hhll precisely the place hh specifies 2-hex-digits
retail retailer join A (sta) C7 hhll that kind probably the most vital
load registers HX (ldhx) 32 hhll byte of the 2-byte, 4-hex-digit
retail retailer registers HX (sthx) 96 hhll deal with of the operand
Go uncover all these within the desk in your microcontroller info ebook. Suppose we solely have the C6 as can be the case if we have been inspecting a way in reminiscence – that we are going to not nonetheless know is a load register A instruction. 1st, search up the C6 in Desk 7-3, website 105. The center of the C6 entry tells us it’s an lda instruction. We then search for lda in Desk 7-2 that entry is across the centre of web site web page 100. Discover: There are 8 lda directions! We’ll take care of that downside later. To acquire the 1 we wish, look within the opcode column to uncover C6. A look to the left of it finds EXT. Site 104 tells what these Sort out methodology abbreviations imply! Make investments a while discovering relaxed with the HCS08 microcontroller ebook and refer once more to this put up for a critique about machine language programming!