Bars

ZXNet echo conference «real.speccy»

From Igor Zhadinets To All 8 June 2001

Hello, All!

How can Subj be counted, otherwise it’s not very convenient with your hands? I tried sts, but
it gives something completely wrong, or am I using it wrong?

I wish you good luck. Igor.

From Pawel Kislyak To All 9 June 2001

Hello, Igor!

Igor Zhadinets ==========> All:

IZ> How can Subj be counted, otherwise it’s not very convenient with your hands? I tried
IZ> sts, so it gives something completely wrong, or am I using it wrong
IZ>?

Test Int

Bye!
Pa...@nm.ru rscg.boom.ru [RC 2.0 70%] [ZX] [Real Software]

From Aleksey Malov To All 9 June 2001

Hi, Igor!

Fri 8 Jun 2001, at 17:10:05 Igor Zhadinets told All about Bars.

IZ> How can Subj be counted, otherwise it’s not very comfortable with your hands? I tried it with sts,
IZ> so it gives something completely wrong, or am I using it wrong?
It calls your procedure N times and measures the number of interruptions that have passed during
this time. Naturally, errors are possible. In addition, your procedure should not
prohibit interruptions during its operation, otherwise everything will go to hell.

Bye, Igor.
WBR, Vivid^Brainwave of the X-Project association.

From Alexander Fisun To All 10 June 2001

Hello Igor !

My computer at 16:10:05 Friday 8 June 2001 is discovered a top secret
information.
Igor Zhadinets from (2:454/5.18@FidoNet) wrote to All from () about { Bars }.
And I decided the answer of this message.

IZ> How can Subj be calculated, otherwise it’s not very convenient with your hands? I tried it with sts,
IZ> so it gives something completely wrong, or am I using it wrong?

You can calculate the test (it calculates itself) Super Test 3.4 (I think that’s what it’s called).

Good bay Igor !
I'm waiting for your answer.
┌════════════════════════ ════════════════════┐
· ---──══ Alexander Fisun aka Nihrom ══───-- ·
·> ZX SPECTRUM 4eva <───────> SPECY RULEZZZ <·
└═══════════════════════════════ ═════════════┘

From Vassili Klimov To All 11 June 2001

heLLo, Igor!

IZ> How can Subj be counted, otherwise it’s not very convenient with your hands? I tried it with sts,
IZ> so it gives something completely wrong, or am I using it wrong?
Is it really necessary? if not, take a sheet of paper as long as the height of the monitor and
glue it on any edge (to the left or right) of the border, write a program:
wait
xor a:out (#fe),a:halt
ld d,h:ld e,l:ld bc,pause
ldir
ld a,#7f:in a,(#fe):jr c,wait:ret
change the pause parameter and draw marks on the paper accordingly, and then the tactometer is ready;-). (c) CJ/xLFG

I was with you .┌─┐┌─┐┬┌ .┌─┐ aka J7n/4D
│┼─┼│ ├┴┐│├┤
└┘┘ └└─┘┴ ┴└└─┘ j...@mail.ru

From Igor Zhadinets To All 11 June 2001

IZ>> sts, so he’s giving something completely wrong, or am I using him wrong
IZ>>?
AM> He calls your procedure N times and measures the number of interruptions
AM> that has passed during this time. Naturally, errors are possible. In addition, your
AM> procedure should not disable interruptions during its operation, otherwise
AM> everything will go to hell.

Can you be more precise about how many times the measured procedure is called and
how to calculate its length in cycles?

I wish you good luck. Igor.

From Igor Zhadinets To All 11 June 2001

IZ>> sts, so he’s giving something completely wrong, or am I using him wrong
IZ>> using him?

AF> Can you count the test (he counts it himself) as Super Test 3.4 (I think that’s what it’s called
AF>).

And he counts the execution time (in clock cycles) of any procedure? Or did you mean the
number of cycles in the interrupt? First things first.

I wish you good luck. Igor.

From Aleksey Malov To All 12 June 2001

Hi, Igor!

Mon 11 Jun 2001, at 14:24:30 Igor Zhadinets told Aleksey Malov about Bars.

IZ> But can you be more precise about how many times the measured procedure is called
IZ> and how to calculate its length in bars?
We measure the length of the int, then look at how many times per The interrupt allows the procedure under test to be executed. If it runs longer than one
interrupt, then call it 100 times (in this case, the counting accuracy will be about
1/100 of the interrupt length) and divide the number Int_Length*Int_Count/100, where Int_Length
is the length of the interrupt, Int_Count is the number of interrupts that came during 100
calls.

If the procedure is executed less than 1 interrupts, then we look at how many times it
is called in 100 ints. In this case, its execution time will be
100*Int_Length/N, where N is the number of times the procedure was executed in 100
interrupts.

Naturally, from the Int_Length parameter you need to subtract the number of clock cycles occupied
by the handler itself.

Instead of the number 100, you can take any number. As this number increases, the accuracy of determining the length of the procedure increases.

By the way, six months ago someone was going to write a debugger (STD and some other). Have you given up on this idea yet? I would really like your debuggers to have a clock counter during the tracing process. A very useful
thing.

From Aleksey Malov To All 12 June 2001

Hi, Igor!

Mon 11 Jun 2001, at 14:52:10 Igor Zhadinets told Alexander Fisun about Tacts.

IZ> And he counts the execution time (in ticks) of any procedure? Or did you mean
IZ> in view of the number of cycles in the interrupt? The first thing is important.
You have to count with your hands. For example, I have already memorized the execution time of almost
all Z80 commands. Another thing is that errors are possible when summing up.
I can advise the following:
First you count the time of 4 such commands, then 5, etc.

The method is ineffective when the program has a lot of branches that are
impossible/very difficult to predict in advance.

From Igor Zhadinets To All 14 June 2001

IZ>> sts, so he’s giving something completely wrong, or am I using him wrong
IZ>>?
VK> is it really necessary? if not, take a sheet of paper as long as the height of the monitor
VK> and glue it on any edge (to the left or right) from the border, write
VK> prog: wait
VK> xor a:out (#fe),a:halt
VK> ld d,h:ld e,l:ld bc,pause
VK> ldir
VK> ld a,#7f:in a,(#fe):jr c,wait:ret
VK> change the pause parameter and draw marks on the paper accordingly, here
VK> the tactometer is ready;-). (c) CJ/xLFG

Thank you, I used this method, although it looks a little different,
but the principle is the same. This method is well described in zx-formate3.
Regarding manual calculation, when the procedure has no branches or only a couple of them, then of course this is the most accurate method, but when the execution time varies within 3-5 thousand cycles, then the above proposed method is best suited. Thanks again for the advice.

I wish you good luck. Igor.

From Alexander Fisun To All 14 June 2001


IZ>>> sts, so he’s giving something completely wrong, or am I using him wrong
IZ>>> using him?
AF>> You can count it as a test (he counts it himself) Super Test 3.4 (I think that’s what it’s called
AF>> it’s called).

From Aleksey Malov To All 15 June 2001

Hi, Igor!

Thu 14 Jun 2001, at 13:40:05 Igor Zhadinets told Vassili Klimov about Bars.

IZ> Regarding manual counting, when the procedure has no branches or only a couple of them
IZ> - then of course this is the most accurate method, but when the execution time
IZ> jumps within 3-5 thousand cycles, then the above is suitable
IZ> best. Thanks again for the advice.
I once manually wrote a procedure with a bunch of branches using multiplications
and jumps through jump tables (there were about 80 such jumps!), the internal
loop of which had to be constant for all input data and took about
1600 clock cycles. The question arises: why the hell did I do this manually, instead of writing a decrementer for these purposes? According to preliminary estimates, the complexity
of writing and debugging a dekruncher would exceed the complexity of writing this procedure
manually. The size of the source turned out to be about 90 kilobytes in the ZXASM format, which
was compiled within half a minute into 13 kilobytes. It compressed, however,
kilobytes into 6.
Manual counting of cycles - rulez!!!