User guide

DS4830A User’s Guide
8
22.3.4 Command 03h Password Match ................................................................................................................. 185
22.3.5 Command 04h Get Status .......................................................................................................................... 185
22.3.6 Command 05h Get Supported Commands ................................................................................................ 186
22.3.7 Command 06h Get Code Size .................................................................................................................... 186
22.3.8 Command 07h Get Data Size ..................................................................................................................... 186
22.3.9 Command 08h Get Loader Version ............................................................................................................ 186
22.3.10 Command 09h Get Utility ROM Version ................................................................................................... 186
22.3.11 Command 10h Load Code ........................................................................................................................ 187
22.3.12 Command 11h Load Data ......................................................................................................................... 187
22.3.13 Command 20h Dump Code ...................................................................................................................... 187
22.3.14 Command 21h Dump Data ....................................................................................................................... 188
22.3.15 Command 30h CRC Code ........................................................................................................................ 188
22.3.16 Command 31h CRC Data ......................................................................................................................... 188
22.3.17 Command 40h Verify Code ...................................................................................................................... 189
22.3.18 Command 41h Verify Data ....................................................................................................................... 189
22.3.19 Command 50h Load and Verify Code ...................................................................................................... 189
22.3.20 Command 51h Load and Verify Data ....................................................................................................... 189
22.3.21 Command E0h Code Page Erase ............................................................................................................ 189
SECTION 23 PROGRAMMING ....................................................................................................................................... 190
23.1 Addressing Modes ................................................................................................................................................ 190
23.2 Prefixing Operations ............................................................................................................................................. 190
23.3 Reading and Writing Registers ............................................................................................................................. 191
23.3.1 Loading an 8-Bit Register with an Immediate Value ...................................................................................... 191
23.3.2 Loading a 16-Bit Register with a 16-Bit Immediate Value ............................................................................. 191
23.3.3 Moving Values Between Registers of the Same Size ................................................................................... 191
23.3.4 Moving Values Between Registers of Different Sizes ................................................................................... 191
23.4 Reading and Writing Register Bits ....................................................................................................................... 192
23.5 Using the Arithmetic and Logic Unit ..................................................................................................................... 193
23.5.1 Selecting the Active Accumulator .................................................................................................................. 193
23.5.2 Enabling Auto-Increment and Auto-Decrement ............................................................................................. 193
23.5.3 ALU Operations Using the Active Accumulator and a Source ...................................................................... 195
23.5.4 ALU Operations Using Only the Active Accumulator ..................................................................................... 195
23.5.5 ALU Bit Operations Using Only the Active Accumulator ............................................................................... 195
23.5.6 Example: Adding Two 4-Byte Numbers Using Auto-Increment ..................................................................... 195
23.6 Processor Status Flag Operations ....................................................................................................................... 195
23.6.1 Sign Flag ........................................................................................................................................................ 195
23.6.2 Zero Flag ........................................................................................................................................................ 196
23.6.3 Equals Flag .................................................................................................................................................... 196
23.6.4 Carry Flag ...................................................................................................................................................... 196
23.6.5 Overflow Flag ................................................................................................................................................. 197
23.7 Controlling Program Flow ..................................................................................................................................... 197
23.7.1 Obtaining the Next Execution Address .......................................................................................................... 197