HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

set and remove break points

 

get information about existing VAC machines

 

get running status of the program

 

ask for or change value of local variables

 

get call stack the program

 

The DB command is designed for the IDE Manager use. The syntax of this command is strict, namely the spaces and white characters are not allowed to simplify the treatment of the command and all values must be numbers, expressions are illegal.

6.5.3Machine status

The command DB##MS returns status about all existing VAC machines.

Syntax:

DB##MS

The command DB##MS return a string in hex binary format containing 16-bit number. Every 4 bits characterizes the status of the VAC machine, so the command can give a status of four VAC machines as maximum. The returned status may get the following values:

0:Halted

1:Running

2:Idle/Not running

3:Aborted/Fault

4:Not existing

65

6.5.4Program status

The command DB##PS returns the status of user program.

Syntax:

DB##PS[N]

where N is a handle of a specified VAC Machine.

The command DB##PS returns a string containing hex binary data with the following information:

 

Name

Meaning

Type of data

Size in

 

 

 

 

bytes

1

Status

Running status. See 6.4.

signed short

2

2

Error

The last error code or 0 for no error

signed short

2

 

code

 

 

 

3

Program

The program counter of the present executing

unsigned short

2

 

counter

line

 

 

 

(PC)

 

 

 

4

Base

The current base pointer. The base pointer is

unsigned short

2

 

pointer

the saved stack pointer, which marks function

 

 

 

(BP)

entry point.

 

 

 

 

BP is used to refer local variables of a

 

 

 

 

function.

 

 

5

Stack

The current stack pointer

unsigned short

2

 

pointer

 

 

 

 

(SP)

 

 

 

The non-zero error code indicates that any error occurred.

How to define which of VAC machine caused to an error?

Page 67
Image 67
Elmo HARSFEN0602, HARmonica software manual Machine status, Program status, Db##Ms, Db##Psn