╔───────────────────────╗
│ ─═─ ASSEMBLER ─═─ │
╚───────────────────────╝
We have been planning to open such a
section in our magazine, but that’s just
thoughts on paper (that is, on the screen) could not
state. But finally we were able to formulate
outline and outline some tips for
programming. Our guy gave us the idea
programmer Gorbunov Diman, who is currently
at the moment he writes, with our help, quite well
dick toy you can read about
to sectione PREMIER.
By the way, almost the same advice
We were recently told by guys from Samara that
who also found it on their own. About
they wrote the same thing in ZX-REVIEW'3-96, but there
they wrote something like this... It’s scary to read.
In general, why am I compiling your brains, chi-
hide the article itself. Sharmanov Alexey (ALEX NORMAN)
──────────────────────────────
Volzhsky, 1996
I apologize a little for the fact that
I’m raising a topic that’s already been discussed
Probably almost everyone has forgotten. Speech
will talk about the article in one of
Spectrophones, in which "harmless-
the departed "Sim Oleg"
sting" on FANATIC StAS, who
at the same time he fought back furiously and
constantly asked about some
demo called TOR
SECREt, allegedly written in our
area.
By the way, an interesting point -
none of us in the region I know
so many hackers I've never even heard of
about this program. It's just a paradox
some kind.
so, FANAtIC StAS is more likely
just in view of its hekomne-
tehthoctu, or simply ignorant-
laziness (sorry if I offended you)
told the whole world from the pages
SPECTROFON that it is impossible
but guess whatduration of co-
mand ED70 and ED71 in pro-
tsessora. With all the responsibility
I am declared responsible
Yu: "Stas, you're wrong!!!"
Well, let's say it's impossible to guess
no way, but it’s quite easy to calculate
well, but here’s how it’s done
please read below.
So the purpose of my article is to report
talking about the so-called primary source, and
to be more precise about its absence...
I mean that the length in cycles of the com-
mandaED 70 and others can be completely determined
pouring programmatically is another question
how long will it take to determine it?
lenition and why it is needed at all (but this is already
another question). Below I will give the program
which can be used to determine the time
execution of almost any command, ho-
cha forsome commands require special
approach (mostly jump commands
type JP,JR,CALL). But considering that
the "time" of these commands is known and now they
It’s also in the company’s programming book.
"INFORCOM", for which, by the way, she gets a lot of credit
thank you, and in other books. We stopped
We rely only on undocumented commands
like ED 70 (well, I like this com-
manda)...
10 DI
20 LOOP LD A,7
30 OUT (254),A
40 INF ;mnemonic ED 70 when pros-
50 ;motre from STS.
60 XOR A
70 OUT (254),A
80 LD A,#7F
90 IN A,(254)
100 RRA
110 JR C,LOOP
120 LD HL,0 ;don't be alarmed by this
130 LD DE,0 ;just delay
140 LD Sun, 30000;ka.
150 LDIR
160 ; second part of the subroutine
170 ;
180 LOOP1 LD A,7
190 OUT (254),A
200 ;
210 LD A, A ; commands sum of "times"
220 LD A,A;which do you think
230 LD A, A; equal to the “time” of testing
240 ;directed commands
250 XOR A
260 OUT (254),A
270 LD A,#7F
280 IN A,(254) ;output - by
290 RRA ;space
300 JR C,LOOP1
310 EI
320 RET
It all works as follows: how
you already guessed the first part of the program
gets stuck creating on any curb
be a certain effect until
you won't press the "space" key. Next, the second part of the program works
similarly, if the execution time is checked
the command we specify is equal to the sum of “times”
commands that we installed in the second
parts of the program (highlighted by empty lines -
mi), then the effects will be the same
nakovy and only in this case, and not at all
otherwise. If the effects when doing both
parts of the payment order are different, in this case it is required
It is impossible to select using the method of “scientific poking”
mands, the sum of their clock cycles will be equal to
the command being checked (in the first paragraph).
That's all, now with the help of this program
frames you can determine how much time in
clock pulses, one or another is performed
no matter how undocumented the command is
neither was. True, there is one test here -
lem, in order to determine "time"
one team needs to know the “time” of others
commands, but having the above reference
this is not a problem.
In the same, or almost the same way, op-
the execution time of entire subroutines is determined
ram, this is necessary in order to know
Does the subroutine “fit” into one interruption orнет, ну а о важности этого я думаю и гово-
рить не стоит.
10 LOOP EI
20 HALT
30 LD А,7
40 OUT (254),А
50 CALL PROG
60 XOR А
70 OUT (254),А
80 IN А,(254)
90 RRA
100 JR C,LOOP
110 RET
В строке 50 вы задаете адрес вашей п/п,
время которой нужно узнать. Так-же можно
узнать время сразу нескольких п/п, устано-viewing all CALLs between 40 and 60 lines.
If you are the owner of a PROFI v3.02 computer
with an old version of the clock generator ROM, then
you (as well as KVANT SOFT - our main
editor) border size is only 2
familiarity from the main screen, and then,
if the time of the measured time is short, you
You won’t see anything on BORDER. For this
you need to introduce a small delay, say
with this sequence:
22 LD HL,0
24 LD DE,0
26 LD BC, 500
28 LDIR
which will be 500*21=10500 process cycles
sora, and by this time the beam will come even to
main screen. By the way, I didn’t say that about the author of this
say inventions, his name is Gorbunov
Dmitry and he is one of the coolest programs
measures in our region, namely in
Volzhsky, and I (with his permission, of course)
I decided to tell the others. Well, I think that's it.
If anything else smart hits your head,
We'll definitely write. Goodbye.
Sharmanov Alexey
04/03/96
Р.S. Congratulate me, I defended my diploma in
Volga Polytechnic College.
And finally, a small table of lengths
the validity of some commands that can be
used for control measurements. In general,
in principle, just a few are enough
first commands, the rest can be done
addition.
Legend: N - single-byte number
lo, NN - two-byte number, s - offset
for index registers.
╜───────────────┬─────┐
│ command │time│
├───────────────┼─────┤
│ NOP │ 4 │
│ INC HL │ 6 │
│ LD A,N │ 7 │
│ RES 0,A │ 8 │
│ LD A,I │ 9 │
│ LD HL,NN │ 10 │
│ ADD HL,HL │ 11 │
│ BIt 0,(HL) │ 12 │
│ LD A,(NN) │ 13 │
│ LD IX,NN │ 14 │
│ ADD IX,IX │ 15 │
│ LD HL,(NN) │ 16 │
│ CALL NN │ 17 │
│ RRD │ 18 │
│ LD A,(IX+s) │ 19 │
│ LD DE,(NN) │ 20 │
│ RES 0,(IX+S) │ 23 │
└───────────────┴─────┘
И еще небольшой совет: если у вас никак
не получается подобрать сумму к проверяе-
мой команде, то вполне возможно что к той
команде нельзя подобрать такие. Но выход
все-же есть, простоadd to checked
team any other team, and to
add one more to the sum of the others, for 1 measure
less than what was added to the previous one.
In short, if you add to the first part of the command -
if ADD HL,HL (11 t), then by the second do-
add LD HL,NN (10 t).
Okay, that's enough, otherwise it's already crazy...
you can nudge. Bye.
Р.S. This addition was written by Yuri Repnikov,
06/04/96.
Р.S. The source codes of all programs have been published -
listed here are recorded on disc in ac- format
sampler TASM 3.
Share your thoughts about the article