HARSFEN0602
6.4 The program execution............................................................................................................................................62
6.4.1 Initiating a Program...............................................................................................................................................63
6.4.2 Halting and resuming a program........................................................................................................................... 63
6.4.3 Automatic program running with power up.......................................................................................................... 64
6.4.4 Save to Flash......................................................................................................................................................... 64
6.5 Debugging................................................................................................................................................................. 64
6.5.1 Running, breaking, and resuming..........................................................................................................................64
6.5.2 DB command........................................................................................................................................................ 64
6.5.3 Machine status.......................................................................................................................................................65
6.5.4 Program status....................................................................................................................................................... 65
6.5.5 Setting and clearing break points.......................................................................................................................... 66
6.5.6 Continuation of the program................................................................................................................................. 66
6.5.7 Single step............................................................................................................................................................. 66
6.5.8 Getting stack entries.............................................................................................................................................. 68
6.5.9 Setting stack.......................................................................................................................................................... 68
6.5.10 Getting call stack.............................................................................................................................................. 68
6.5.11 View of global variables...................................................................................................................................69
6.5.12 View of local variables..................................................................................................................................... 69
7 THE VIRTUAL MACHINES............................................................................................................................71
7.1.1 Introduction Alla please complete where necessary..............................................................................................71
7.2 Virtual Machine registers........................................................................................................................................71
7.3 Call Stack During Function Call............................................................................................................................ 71
7.4 Data types................................................................................................................................................................. 72
7.5 Op code structure and addressing modes.............................................................................................................. 73
7.6 Short reference......................................................................................................................................................... 73
7.7 Alphabetic reference................................................................................................................................................ 75
7.7.1 ADD - ADDITION............................................................................................................................................... 75
7.7.2 AND – Bitwise AND Operator............................................................................................................................. 75
7.7.3 CMP – Compare....................................................................................................................................................76
7.7.4 DIV – Divide.........................................................................................................................................................76
7.7.5 EOL – End Of Line............................................................................................................................................... 77
7.7.6 FORITR – FOR Loop Iteration............................................................................................................................. 77
7.7.7 FREE_VAC - Free Virtual Machine.................................................................................................................... 78
7.7.8 F_OR – Bitwise OR Operator............................................................................................................................... 78
7.7.9 GETINDEX...........................................................................................................................................................78
7.7.10 GET_COMM – Get Command........................................................................................................................ 79
7.7.11 JMP – Jump...................................................................................................................................................... 79
7.7.12 JMP_EOL – Jump............................................................................................................................................ 80
7.7.13 JMP_LABEL – Jump to the label.....................................................................................................................80
7.7.14 JNZ – Jump Not Zero....................................................................................................................................... 81
7.7.15 JNZ_EOL – Jump Not Zero............................................................................................................................. 81
7.7.16 JZ – Jump If Zero............................................................................................................................................. 82
7.7.17 JZ_EOL – Jump If Zero....................................................................................................................................82
7.7.18 LINK................................................................................................................................................................ 82
7.7.19 MLT – Multiply................................................................................................................................................83
7.7.20 MOV – Assignment Operator (=).....................................................................................................................83
7.7.21 NOT – Bitwise NOT Operator......................................................................................................................... 84
7.7.22 REM – Reminder..............................................................................................................................................84
7.7.23 RSLTA – Relational Operator (>).................................................................................................................... 85
7.7.24 RSLTAE – Relational Operator (>=)............................................................................................................... 85
7.7.25 RSLTAND – Logical AND Operator (&&)..................................................................................................... 86
7.7.26 RSLTB – Relational Operator (<).................................................................................................................... 86
7.7.27 RSLTBE – Relational Operator (<=)................................................................................................................86