| cmdDBG_STACK | Index |
Command Code:
Host-to-Stem Packet:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |||||||
| address | 6 | cmdDBG_STACK | ProcID | STKMODE | OFFSH | OFFSL | NBYTES |
| ProcID - | Index of a VM process. Range is 0-3. |
| STKMODE - | Stack access mode. Range is 0-2. |
| OFFSH - | High byte of 16-bit stack offset. |
| OFFSL - | Low byte of 16-bit stack offset. |
| NBYTES - | Number of stack bytes to read. Range is 1-6. |
Reply Packet:
| 0 | 1 | 2 | 3 | 4 | ||||
| address | 3 | cmdDBG_STACK | ProcID | data... |
| ProcID - | Index of a VM process. Range is 0-3. |
| data... - | Stack data bytes. |
Description:
This command retrieves bytes from a VM stack. A process ID that is out of range will generate an error message. A process ID for an inactive process or an active process that is not in debug mode will generate an error message.
The reply packet is cmdDBG_STACK then the process ID followed by the desired stack byte(s) or a checksum byte.
The STKMODE byte determines the stack access method. When this byte is 0, the offset is one-based and relative from the top of the stack. When this byte is 1, the offset is zero-based and absolute from bottom of the stack. When this byte is 2, the offset bytes and count byte are ignored and the reply contains a checksum byte for the current stack instead of stack data.