Spectrofon #18
22 марта 1996

System - tips for beginning programmers.

<b>System</b> - tips for beginning programmers.
   Today's talk will be devoted to beginning programmers. 
Although, I think, in nizhepublikuemyh recommendations for 
beginners something interesting will find those who have already

long been involved in computer brand
"ZX-SPECTRUM". Pass the word to the author
article.

(C) Cnigirev Jury


            Tips for beginners


   I started out like so many fans with ZX
recorder "Leningrad" option
ZX, which is now gathering dust on a shelf in polurazobrannom 
form, because a couple of years ago I put together a more 
modern model - Pentagon 128. In general, I must say that

Recently, a new generation of fans ZX begins its communication 
directly with the model 128K. This is certainly good, but still 
less often encountered such a phenomenon, when a man, 
absolutely not understanding in computer architecture,

structure of the address space, port configuration, just trying 
to write something yourself, make your boot, write scroller, 
etc. 


   I would like to give some advice to young programmers. Will 
focus on the interesting and unfamiliar things.


1. 50% success of software depends on a beautiful screen saver 
and a beautiful font. With a beautiful screen saver is clear. 
That well understood by the beautiful font? The main parameters 
of beautiful fonts are: 

- Good readability (especially important for
word games);
- Consistency of the linear dimensions (same width of the 
letters in the points, the same height of the letters of one 
case); - The letters in any case should not stick together 
(this means that in the matrix of all letters of one column - 
the left-most or the best right - and one line - the upper

or the lowest - must contain canceled bits);
- Constancy of thickness of the lines;
- Redundant elements should not be.


   For a 8x8 matrix of points the most successful
From my point of view is the font in the style "BOLD - Art 
Studio" from standard. It will have to correct

only the letter "M", "W", "Q", "m", "w", the number "4" signs 
"(c)", "@" and "$". 

2. Spoils the impression of a software product typographical 
errors. One of the most common - the English word HACKER. 
Remember - in Russian HACKER HACKER written - one letter "K"! 
Let me explain - the word is borrowed from English. HACKER word 
comes from the HACK. Similarly, the word we borrowed from the 
English language a few - BLOCK - BLOCK, DOCK - MLC, DOCKER -

Docker ... Not hard to spot - they a
the letter K. If it comes to that, let's look at this word on 
the composition: HAQ - root EP - suffix. The word Hacker does 
not parsed suffix CER in Russian

does not exist. Who did not believe - please contact the 
Faculty of Moscow State University, there'll explain 
everything. 

"S": Perhaps it is worth to comment on the explanation of the 
distinguished author. Those who are not interested in questions 
of word- may miss our commentary.



   The fact that the process used in evidence analysis of the 
word "hacker" on the composition - is not convincing. Since the 
word "Hacker" - and can be expanded as follows: CCA -

root K - suffix Ep - suffix. And then it turns out everything 
is smooth and clear, and the author's arguments are powerless. 
Another thing is that all the new words which appeared in 
Russian in the last ten years - derived from the English, and 
often just as heard, and written. All of this computer 
"Newspeak" as a something: "upgrade", "hacker", "coding" and so 
on had to wipe off and settle into our language. At a time when 
these words included in our daily life (because really, we 
strongly related to computers) - they could not find in any 
dictionary. Now we have something like "Hacker", began to 
appear in dictionaries and non-specialized literature. At the 
end of ends with the word "hacker" to find out. Yes,

indeed the word in all dictionaries
spelled with one letter "K". But many of
of habit, continue to write it with
two "K". We take this condescending in view of the above 
explanations. We hope that everything will be fine. So it's

not scary. You may recall that the city of Babylon in the world 
is called Babylon, and We both used to, and talking. Please

sorry for this little digression ...
3. A lot of mistakes in the English language, as spelling and
grammar. Tip - write in Russian
or learn good English.

4. Now music coprocessors is not
rarity, so why should our programmers
still do not take for standard use of opportunities "muzykalki?

5. Before loading the display file or decompression 
zakompressirovannogo screen loaders, do not forget to put on 
the Attributes zeros, otherwise picture appears on the screen 
gradually and not instantaneously. 

6. When writing programs supporting
printer, remember that the most common printer interface in our 
country is LPRINT III and interface VV55, on this

Provide policy support as
one and two.

7. When you create a program with the shipment provisions 
should be possible (and this almost always possible, especially 
in the regime 128K) to provide shipment status in

memory, so as not to drive once again the drive and do not rub 
the disc. 

8. When shipped on the disk drive has the opportunity to 
overwrite the file in the same place with the same name with a 
request Overwrite? or overwrite?


9. If the program is not in the mode of 128K,
Organize a program setting port 32765 to the requirements of 
the program to not had to reset the computer to

48K, dial RANDOMIZE USR 15616.

10. Checking for KEMPSTON
JOYSTICK, necessary to compare the value of the port
# 1F (d31) with zero pre-extinguishing
The lowest 5 bits in a few words.


Ie KEMPSTON implemented in the case
when the three most significant bits at any position joystick 
reset. 

11. One of the most serious errors occur
when you create a boot in the native
through the procedure # 3D13 (d15635), which
manifested in the fact that if a toy (or
another program) with the loader to place on the middle of the 
disk, then after reading N-Nogo number of sectors, the head 
drive darts off, running fast to the center of the disc, with a 
strong bang rests on the chassis of the drive, then runs to the 
zero track is returned to the starting position and finished 
reading the remaining piece of the file. 


   Have to write such programs in
beginning of the disk, and sometimes I correct loaders. How can 
this be avoided? 



   I know of two ways: first - a more sophisticated - write 
your own loader through direct appeal to the microcontroller KR

1818 VG93 (through the entry point # 3D2F), the second - the 
easiest I have found on their own, is that the process Download 
the file by not just one piece, and portions (the experiments 
showed the optimum value of the 50 sectors or less) I will 
explain with an example: 


START LD B, 172, the number of sectors

      LD C, # 05; reading

      LD DE, (23796); current track / sector

      LD HL, 25000; load address

      CALL # 3D13

      RET



   Optimized boot (no cod
and severed heads):

START LD HL, 25000; load address

      Call M1

      LD HL, 25000 50 256

      CALL M1

      LD HL, 25000 +2 * 50 * 256

      CALL M1

      LD HL, 25000 +3 * 50 * 256

      LD B, 22; the remaining sectors

      Call M2;

      RET
M1 LD B, 50
M2 LD C, # 05; reading

      LD DE, (23796); current track / cektor

      Call # 3D13

      RET


   Maybe this is not new, but even the latest version of the 
disc are described with a software defect. 



    Program with the loader safely
You can save at least to the end of the disk,
everything will be OK, though every program I check the 
individual - self-confidence can sometimes turn into a major 
failure. To date, all programs with the loader are working 
without problems. 


   More on TR-DOS:


   Not many people know, and in descriptions of
TR-DOS, I have not seen that command: RUN
"Name" SODE, you can simultaneously download
block code and run it with the load address, I use this command 
to view zakompressirovannyh display files on disk, without 
leaving the environment TR-DOS. 


   Unlike many users, ZX, I
run the file "boot" does not command LOAD or
RUN, a team POKE, since it is closer
all located on the keypad of a button
ENTER, it allows you to more quickly manipulate the keyboard.

   It was experimentally observed that
Floppy longer keep writing if their format directly in the 
TR-DOS, or in the program HC, the other disc

utilities give the worst result (DCU, ADS,
PHT). Who does not believe in - a format
disk utility, such as DCU, and the other in
TR-DOS, write them down completely, put on
shelf and in a week or a month check in the same DCU. Disc with 
a standard format reads smoothly, without jerks, CD

same from the DCU to verify with the pauses, the triangles may 
or may not change the color, but check this disk somehow 
affected by instability. 


   Floppy disk labeled IZOTOV, Mini Disc,
Comp Disc, Tandy - a very indecent quality, even on drives 
import (in including TEAC) and the well-established

controllers provide fail, it is better to have themselves not
keep.



   Discs SIGMA, BOEDER, TUNGSRAM, SKC,
MAXI DATA average quality, sometimes give
failures.


   Discs MEMOREX, SONY, BASF (red) -
good quality.


   Wheels FIRST, BASF (blue), MAXELL - the coolest, even on 
drives of low quality and poorly-functioning controllers yield 
the best results. 


   Soviet discs: MIG-130, Dialog, Serveko range from good to
steep. Some copies of the diskettes can
be worse than this estimate because of imperfection of our 
world. 







Other articles:

Expertise - the first time in our country is presented and discussed "The Bards Tales "- a full semnadtsatiurovnevaya role-playing game.

Fantasy - short story on a computer game "Captain Blood".

Review - the influx of new games: Last Battle, The turn or xor'em all, Tank War, Adventures of Winnie the Pooh War Embera, Open it!

From the world of bat - post the log and continued discussions about and around Spetrkume him.

From the world of bat - Hackers and authors are not just people: An Inside Look.

System - tips for beginning programmers.

Designer - Some useful improvements for the Spectrum, as well as The original scheme of the ADC. For owners of modems, an article on how to improve communication.

Premiere - reclaimed and recycled a demo version of the game "Prince of Persia".

Advertising - advertising and announcements.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Gluck - Glitches in TASM'e, Dizzy 4 (Russian, f.Sunsoft), Star Heritage.
AD & D - A little information on the group of "wizards".
Wreck Time - Advertisements and announcements ...
Ottyag - EXKlyuZivnye GonY from IronmAN'a.

В этот день...   5 May