 Question:
Using the DLOG command
Answer: DLOG will save to a file (in ASCII format) anything that is displayed in
the debugger command window. This command combined with the use of ECHO, IF, ELSE, ENDIF
and LOOP provide a way to inspect your results and display messages accordingly. The
following example inspects an array of structures called "link" and according to
the values stored in the structure fields, writes different messages to a DLOG output file
(explore.dat).
echo DISP.TAK v1.1
DLOG explore.dat,w
cls
echo ------------- C40 Exploratory program V1.1---------------- echo -
echo Texas Instruments
echo -
echo ------------------------------------------------------------ echo Number of processors:
?(nprocs+1),d
echo ------------------------------------------------------------ echo ***** NODE 0
e k=0
loop k <6
echo --> port
?k
if (link[k].hisid == -1)
echo no connected
endif
if (link[k].hisid == -2)
echo null port
endif
if (link[k].hisid >=0)
echo connected to port:
?link[k].hisport,d
echo of node:
?link[k].hisid,d
endif
e k=k+1
endloop
e k=0
loop k<6
e first=link[k].list
take disp2.tak,0
e k=k+1
endloop
echo
dlog close
|