Working on bugs
ZX-Guide #1, article "Studies"
Message from Valeron:
------------------------------------------
I apologize for disturbing you, maybe
maybe for nothing, but just in case I want
report that in ZX-Guide #1 in section"This─
dy" the procedure for printing 42 sim─ has been published
there is an ox in the line, and you must have a typo
happened because in that version the process─
fool every second character imposes on
previous ones. Having analyzed the logic of work,
I replaced the line
LD A,2
RRCA
....
on
LD A,#80
RRCA
....
You must have already corrected this operation─
chat, but I looked through the rest of the episodes
I didn't find any mention of this magazine
this typo. In addition, on zxdn lies
article from this issue and also from this op─
Chatka.
The procedure itself is very elegant, I didn’t immediately
got into it, I needed more
hours, but whenI understood how it works -
It hit me like thunder! Such an este─
I've never had a real thrill from a program before
didn't receive it! So small and nimble, pro─
tive of those sheets that I wrote on and
I was sure that I definitely had nothing superfluous
not in the procedure. In general, THANK YOU
huge!
------------------------------------------
It was very nice to see such feedback
- because this means that the magazine continues
read many years later! Indeed, in
there was an error in the procedure. Magazine on the website is─
rules.
* * *
Info Guide #10, article about batteries:
Message from Lvd:
------------------------------------------
In general, the article is useful.
Notes, global and minor:
1. The author claims that with high current
charge, the key in the battery may die due to
constant switching. I don't agree. In no─
which pulsed network sources pi─
Tanya field keys operate at frequencies
0.1-1 MHz and they don’t die. The key will soon die
simply from overheating due to current overload─
viscous
2.Any chemical current source is based
on redox reactions─
yakhs, which when charging (if possible
for this source) go in one direction─
well, and when discharged - to another. Lithium-ion
batteries are no exception. True, they contain oxide─
healing and restoration do not occur with ─
tion, but with other elements (complexes─
tium with transition metals, which are also under─
undergo redox
reactions at the cathode and anode), and lithium
serves only as a carrier of these complexes to
electrolyte. You can read more about
all this cuisine on the sites:
http://en.wikipedia.org/wiki/
Lithium_ion_battery,
http://www.e-articles.info/e/a/title/
The-Lithium-Ion-Battery/,
http://en.wikipedia.org/wiki/
Lithium_battery,
in general about chemical current sources (according to
Russian):
http://www.krugosvet.ru/articles/
106/1010640/1010640a1.htm,
http://www.chemport.ru/
chemicalcurrentsources.shtml
By the way, from the Wikipedia links you can
get useful tips regarding
extending the service life of lithium-ion batteries─
simulators, including in laptops.
If the author likes to write about accumulato─
ry, I would like to see an article from him
about lead-acid, with theory, with practice─
Well, with consideration of the types of such batteries─
tors, with discharge-charging characteristics─
mi, charging algorithms, etc.
------------------------------------------
* * *
Inferno Guide #5, article about Hrum/Hrust
In the description of the archive header Hrip (it
was taken from the original documentation)
there is an error. Message describing this
errors were found in the echo conference archive─
tionsCODE.ZXnetworkZXNetfor 2003:
http://code-zx1.zxnet-archive.ru/id/798
------------------------------------------
In the file HRIP_DOC.WRD from the pic kit─
HRIP 1.05 contains the following:
=== cut ===
The archive begins with the following heading:
IDARCH DB "HRi" ;identifier
IDALL DB 0 ;number of files in
; archive (used in
; Hrip when added
; archive so as not to
; there were more than 255 files)
SMESH DB 0 ;see. further (BYTE)LAST DW 0 ;see. further (SECS)
CAT DB 0 ;1 - directory present
; in the archive
;0 - no directory
The following formula shows how you can
determine the end of the archive (in bytes from the beginning)
archive):
END_ARCH=[LAST]*256-(256-[SMESH]) bytes
Directory location, if any─
is available, can be determined using this formula:
START_CAT=[LAST]*256 bytes
That is, the directory is on the last
sector after the archive. As can be understood from
of the two listed formulas - between the ends
archive and the beginning of the directory is free
space < 256 bytes. This is where it shows up
"sharpening" for TR-DOS. Such a simple reality─
zation is made so that every desire─
he could open the archive with the directory (topic
moreover, the directory is almost similar to TR-DOS-
ovsky).
=== cut ===
In fact, the formula for calculating─
niaEND_ARCH (i.e. archive length in bytes,
without taking into account the directory) should look like this:
END_ARCH=[LAST]*256-(256-[SMESH]) bytes,
if SMESH>0;
END_ARCH=[LAST]*256 bytes,
if SMESH=0.
Or like this:
END_ARCH=[LAST-1]*256+[SMESH]) bytes,
if SMESH>0;
END_ARCH=[LAST]*256 bytes,
if SMESH=0.
Without branching, the formula can be written─
sana like this:
END_ARCH=[LAST]*256-
((256-[SMESH]) mod 256) bytes.
Вычисление END_ARCH на ассемблере (по─
лучаем результат вHL:A ):
LD HL,(LAST)
LD A,(SMESH)
AND A
JR Z,$+3
DEC HL
ВычислениеEND_ARCH-1 может быть короче
и быстрее:
LD HL,(LAST)
LD A,(SMESH)
DEC HL
DEC A
С уважением, Иван Рощин.
------------------------------------------
Чтобы исключить ошибки в описании фор─
матов Hrum и Hrust 1.x (такое описание
труднопроверяемо,seeErrata in the Info Guide
#7), I will refer to the documentation for these formats─
mats supplied with the mhmt packer.
Alone Coder
Share your thoughts about the article