Owner manual

DS4830 User’s Guide
8
23.6.2 - Zero Flag ........................................................................................................................................................ 185
23.6.3 - Equals Flag ..................................................................................................................................................... 185
23.6.4 - Carry Flag ....................................................................................................................................................... 185
23.6.5 - Overflow Flag .................................................................................................................................................. 186
23.7 - Controlling Program Flow ...................................................................................................................................... 186
23.7.1 - Obtaining the next execution address ............................................................................................................ 186
23.7.2 - Unconditional jumps ....................................................................................................................................... 186
23.7.3 - Conditional jumps ........................................................................................................................................... 187
23.7.4 - Calling subroutines ......................................................................................................................................... 187
23.7.5 - Looping operations ......................................................................................................................................... 187
23.7.6 - Conditional returns.......................................................................................................................................... 188
23.8 - Handling Interrupts ................................................................................................................................................ 188
23.8.1 - Conditional return from interrupt ..................................................................................................................... 189
23.9 - Accessing the Stack .............................................................................................................................................. 189
23.10 - Accessing Data Memory ..................................................................................................................................... 190
SECTION 24 INSTRUCTION SET................................................................................................................................... 192
SECTION 25 UTILITY ROM ............................................................................................................................................ 220
25.1 Overview ............................................................................................................................................................... 220
25.2 In-Application Programming Functions ................................................................................................................ 221
25.2.1 UROM_flashWrite .......................................................................................................................................... 221
25.2.2 UROM_flashErasePage ................................................................................................................................ 221
25.3 Data Transfer Functions ....................................................................................................................................... 222
25.3.1 UROM_moveDP0 .......................................................................................................................................... 223
25.3.2 UROM_moveDP0inc ..................................................................................................................................... 223
25.3.3 UROM_moveDP0dec .................................................................................................................................... 223
25.3.4 UROM_moveDP1 .......................................................................................................................................... 224
25.3.5 UROM_moveDP1inc ..................................................................................................................................... 224
25.3.6 UROM_moveDP1dec .................................................................................................................................... 224
25.3.7 UROM_moveBP ............................................................................................................................................ 225
25.3.8 UROM_moveBPinc ........................................................................................................................................ 225
25.3.9 UROM_moveBPdec ...................................................................................................................................... 225
25.3.10 UROM_copyBuffer ....................................................................................................................................... 226
25.4 Utility ROM Examples ........................................................................................................................................... 227
25.4.1 Reading Constant Word Data from Flash ...................................................................................................... 227
25.4.2 Reading Constant Byte Data from Flash (Indirect Function Call) .................................................................. 227