Elmo HARSFEN0602 Network Hardware User Manual


 
HARSFEN0602
set and remove break points
get information about existing VAC machines
get running status of the program
ask for or change a value of local variables
get call stack of 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.3 Machine 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
6.5.4 Program 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
code
The last error code or 0 for no error signed short 2
3 Program
counter
(PC)
The program counter of the present executing
line
unsigned short
2
4 Base
pointer
(BP)
The current base pointer. The base pointer is
the saved stack pointer, which marks function
entry point.
BP is used to refer local variables of a
function.
unsigned short 2
5 Stack
pointer
(SP)
The current stack pointer unsigned short 2
The non-zero error code indicates that any error occurred.
How to define which of VAC machine caused to an error?