Hi, Axel;
you know, when I bought my HP41CX I began doing time measures for whatever I thought relevant as internal resources. I once programmend the following:
...
RUNSW
XEQ "PR1"
STOPSW
...
END
LBL "PR1"
END
This was just to start: time to jump to a program and return. Tehn I added these modifications:
...
RUNSW
XEQ "PR1"
...
END
LBL "PR1"
STOPSW
END
and
...
XEQ "PR1"
STOPSW
...
END
LBL "PR1"
RUNSW
END
so I could measure the jumping and return time separately. I also did this:
...
RUNSW
LBL "PR1"
STOPSW
...
to measure the LBL instruction time. And:
...
RUNSW
STOPSW
...
for the system time spent since the stopwatch was started and stopped. All of these measures were repeated 10 and 20 times for average and I have them annotated somewhere. As you seem to be in a hurry, I decided to pass you the hint.
If the program to be measured cannot be changed, then te way you describe seems the best one. Anyway, a first measure with a blank LBL"name"END just to capture the jumping ang return would give you some more info. But if you have the chance to change the program to be measure, try this:
LBL"MEAS"
CLX
STOPSW
SETSW
RUNSW
LBL"PRG1"
....
(last program step - cannot be STOP or END or RTN)
STOPSW
...
END
where PRG1 is the program to be measured and MEAS is the name I gave to the measuring program additional part. This would also give you the chance to measure PRG1 execution time. The only fact is that you cannot add a STOP, or RTN or END in your original program because you still need the clock running. The other way would be:
LBL"MEAS"
CLX
STOPSW
SETSW
RUNSW
XEQ"PRG1"
STOPSW
...
STOP
LBL"PRG1"
....
END
As you are aware of the initial jumping time and pre-measuring, after you compute the basic program execution time you just compensate the values.
I hope this is something close to what you have in mind. If not, I'm sorry not helping you the way you want.
Best regards.
Luiz (Brazil)
Edited: 31 July 2003, 10:25 a.m.