HPlogo System Debug Reference Manual > Appendix C Emulated/Translated CM Code

Appendix C Emulated/Translated CM Code

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Table of Contents
Debugging Emulated CM Code
Object Code Translation
Node Points in Translated Code
Executing a Translated Section
The Node Functions
CM Breakpoints in Translated Code
NM Breakpoints in Translated Code
Examples: CM Breakpoints in Translated Code
Examples: Program Windows for Translated Code
Compatibility mode code segments are executed in emulation mode, unless they have been translated by the Object Code Translator (OCT).

Emulation of an instruction can be described in the following way:
  1. Fetch the instruction at the current program counter (CMPC).

  2. Emulate that instruction with NM precision architecture instructions.

  3. Update the program counter to point at the next instruction.

Note that multiple NM Precision Architecture instructions must be executed during the emulation of every single CM instruction. Besides the obvious cost of fetching and emulating the instruction, there is usually additional, less obvious overhead, such as indirection and indexing, and updating STATUS register bits (that is, condition code, carry).

               CM Object Code
 
               CM Instructions

               +-------------+
               | PROC+%0     |
               | PROC+%1     |
               | PROC+%2     |
               | PROC+%3     |
         P >   | PROC+%4     |  ----> Fetch    PUSH S-2,X
               | PROC+%5     |
               | PROC+%6     |
               | PROC+%7     |
               | PROC+%10    |
               | PROC+%11    |
               | PROC+%12    |
               | PROC+%13    |
               | PROC+%14    |
               | PROC+%15    |
               | PROC+%16    |
               +-------------+




Appendix B Expression Diagrams


Debugging Emulated CM Code