Project - a homemade scanner for the Spectrum from Printet.

Spectrophoby #05
     ╔────────────────────╗     
  ПРОЕКТ       
     ╚────────────────────╝     
                                
Борис Курицын                   
─────────────                   
257010 Украина, г.Черкассы, а/я 1529      
                                          
                                          
       Как мы будем программировать       
      на Speccy в ближайшем будущем.      
                                          
     Умерев  в Англии и на Западе в целом,
как это не парадоксально, в странах СНГ ZX
Spectrum-совместимые компьютеры переживают
бум.  Появление  поистине  проффесионально
написанных  программ,  в  первую  очередь,
игр, показывает, что это семейство компью-
теров еще имеет некоторыйpotential.      
                                          
The software market is gradually forming
ZX Spectrum-compatible framework
our computers. There is everything here: games, adventures,
good programs, programs of various
for service purposes.  Some of them
written well, many - poorly, only a few
prostrate - excellent. What are they written on? What
same from the tool support
our programmers use? In 99% of cases
tea is an assembler - from the good old
Hisoft GENS Assembler 4.1up to new ones
TASM, EDAS etc.                        
                                          
 We're used to assembler. Every try
write something serious on Hisoft C
Compiler, Hisoft Pascal, etc. finishing-
was a failure - the “quality” of these compilations
tors is amazing. In addition, high languages
level type Cor PascalI give too
voluminous code so that our programmers,
brought up in assembly language, could use it
agree. But assembly language programming --
this is not normal! Not on any model, not in
one class computer central
instrument is not ac-
sampler!  Its place is programming
tyre resource-intensive or time-intensive
sections of programs, drivers, etc. Even
if your program is really critical
in this sense, then (as statistics show
tick) this criticality is caused by 10% of the code:
they need to be written in assembly language.  But os-
The remaining 90% of the code can be written in sufficient
but in a high-level language!                 
                                          
 Considering all of the above, the author
The long-cherished idea has finally matured
create an efficient, low-level, but
machine independent programming language
general purpose and implement its compu-
lyator on ZX-Spectrum.                     
                                          
 It is assumed that the language will be
only low-level, which in terms of quality
Yes, it will be close to assembler, but sufficient
but abstract and machine-independent so that
prepared (and not so prepared) user
was able to reduce the time it took to write my programs
ramm susing this language in 5-10
times compared to assembler.           
 The language is designed as C-like,
but even more concise and optimal for
8-bit microcomputers. His level
somewhere in the middle between "C" and "C--". Who doesn't
knows "C--" is a C-like low-level
new low-machine-dependent programming language
for IBM-compatible machines.        
                                          
 The language will necessarily contain pro-
interstitial object level of code - level
thread of the compiled unrelocated co-
yes with a table of external links and published
bathroom symbols. Not a single “normal” system
The topic of programming is not complete without
object level.  One of its advantages
are that the programmer can
create a library of programs for a specific
purpose and sell it as an object
th file and the external declaration file. like this
the library can be purchased and used for
programming, it is not possible to change, re-
dig, dig up, etc., as they really like
do our hackers. And all because
The project format will not be disclosed, as
this is usually done. In addition, when
lichesobject level and separation
large program for several files three-
only the changed one will be recompiled
file, which dramatically reduces the time
compilation.                               
                                          
 At the first stage, a com-
pilator and linker (program text
will have to prepare in some re-
daktor).  At the second stage it will be created
integrated environment. Perhaps on the third
eat -- intellectual high-level
debugger at the source text level(!).   
                                          
 The language will contain a set of libraries,
with which you can implement
anything from including music in the program
for AU before organizing a window interface
in the program.  Moreover, at the language level
exceptions will be supported from multi-level
new interception (as in C++).               
                                          
                                          
 It is assumed that the language will be
wander around without any protection
principle Shareware. That is, wherever you are from
received a copy, you canregistered
work for a small fee by writing to the authors
or distributors. Then you get post-
latest version of the program, printed manual
programmer and user guidance and new
The latest libraries, utilities.               
                                          
 An important stage is underway now - development
internal language conventions, development
object file format and object library
library, thinking through the layout algorithm
object files, compilation algorithm,
language syntax. Other pre-
cooking research. So far the team
initiators consists of the author(B. Kuritsyn),
K. Tetepuha (KSoft) and K. Vyshemirsky
(Tired Wanderer).                         
                                          
                                          
                                          
                                          
 The author wrote all this with the aim of making
project being developed for general discussion
denition. It is very important for us to know whether it is necessary
what language would you like it to be,
what capabilities it should have.
Please write to us (address in title
articles). Send us your ideas and wishes.
By the way, you too can become one of the...
workers.  If you are interested in
anyonefrom aspects (maybe as simple as
future user of the language), also write-
those to us.  Everyone who writes to us is free
(for the cost of only floppy disks) will receive Beta--
version of the compiler for testing, and when
purchasing the commercial version will have
significant benefits.                      
                                          
 And one more thing: the language does not yet have a name.
Whoever comes up with the best name will receive a full
commercial version of the compiler for free.
                                          
                                          
                                          
                                          
 "S": This is the letter that came from the city
yes Cherkassy, in Ukraine, from Boris Ku-
Ritsyna.  It seems to me that this was already brewing
for a long time, everyone is already pretty fed up with everything
these TASMs. Of course, write in assembly language
for now it’s most familiar to us, but how true
noted by the author of the article, no one speaks assembler
does not write anything on the same IBM andAMIGA. And 
if the speed of such a compiler
will not be very different from assembler,
then why not do it?            
 So, we announce an all-Union (?)
consideration of this issue.  Feedback and
Send suggestions directly
authors in Cherkassy, but you can also send
us - we will publish them and also send them
to the authors. And thanks to the company 'MAGIC SOFT' from
Moscow, our magazine is no longer read only by
Russia - Moscow, St. Petersburg, Ufa, Chelyabinsk,but
and beyond - Ukraine (Kharkov, Cher-
box office), Belarus (Minsk),so according to
It seems to me that we have arrived at the water of readability.
we approach SPECTROFON, who later
I'm completely crazy in this room.           
 It is on such an optimistic note that we
we will finish this section if there are responses
soon after the release of this issue, then everything
We will include them in the sixth issue.  Description of work         
 scanning device.    
                                
 * SCANNER V-1 *         
                                
 1. Introductory part.        
                                
 If your computer is 'SPECtRUM'
equipped with printer and kempston
joystick (printer preferably
inkjet type MC-6312, SPRINTER
etc.), and also if desired
also have a scanning device
device - then consider that
you already have this device
yes.                           
 With its help you canska-
create drawings, screensavers, fo-
tographies, diagrams from magazines, ha-
z and books for using them
when designing your programs.
Scanning modes are set
support program.           
                                
 Using the ones below
diagrams and recommendations, you
you can make your own
change its hardware.      
                                
 2. Operating principle        
 scanning device.    
                                
 Block diagram of the scanning device
              swarm shown
in Fig. 1, from which swarm visible main functional сх- computer puhtepa, block of co- votes (BS) and scanning head- ki. Variable resolution resistor (R1)
is given to the sensitive the accuracy of the scanning device.
The principle of image scanning niya is shown in Fig. 2. Ray of light from a mini light bulb
L1, reflected from highlights ckahupyemoro image reflected light depends on the plot details) falls through the bepctue 'D' dia- meter 0.3-0.8 mm to the phototransistor Ft with high gain
or doraptopars
AOT 116, AOT 120 v phototransistor and produces signal at the output of the photor, which which through the block amplification stage when approval is sent to Kempston joystick connector (set 'down'). Scanned image (1) is placed on the shaft (4) tera (3) instead of paper
and clamped For videos (5) see. Fig. 3. In return I print- jet head installed on the carriage (6) poured read-
head (2).
3atem download the program for scanner holders. After selection the required scanning format, the printer enters the 'setup' mode print line' when rum GS transmits the readable information formation on the monitor screen. 3. Reading head. The reading head (HR) can be make from used inkjet printing
dexterity. The order of ee iso- Fig. 4 - Fig. 8. For this-
cabbage soup filler for ink, do on front surface 'B' window size 10*16 mm, into which then we will paste the photoblock
read head, according to Fig. 5. Const- GS photo block manual cauldron in Fig. 6. His
it is better to make the body made of vinyl plastic or ebo thread size 10*10*16 mm. On the top surface is fixed
L1 bulb with reflective screen (3). 3atem needs to be installed into the drilled from-
bepctue (at an angle 30-40 degrees) cap (4) with co- librated from- bepctuem 'D' and fo- totransistor (5). Light bulb and photo FT transistor connection thread with flexible BS wires in photo roplast insulation tions 40-50 long see Fig. 7 while- back view of the head before modernization, and on Fig. 8 shows GS
after installing the fo-panel.
4. Matching block. Electrical diagram of the indicating block in Fig. 9 and represents regular transistor switch logic (trigger
Schmidt), intended started to create output 'K' signal block in the form of a rectangular new impulse. When sufficient feeling used photo transistor can make do with one amplification stage. Applicationphotore-
resistors instead phototransistors are undesirable reason for their low speed
actions. Resistance R2+ is under- is taken during the setup process block. Output 'K' BS connect to contact 'down' of the Kempston socket joystick, as in the program support is based on a status survey connection of this particular contact. 5. Support program. The presented program it consists of two parts: basic and code block. BASIC - define- no format setting, allows adjust delays when ramping hupobahuu images, in case their necessity in agreement with a printer, as well as production reset the received image transfer to a floppy disk. The code block is intended for printer initialization and transfer to the 'conditional print sheet' mode, polling port Kempston joystick to the contact state 'down', processing information from scanned cutting head and output ckahupye- image on the monitor screen tora. Upon completion of the code- of the new block, control is transferred BASIC program. Used in the code block procedure for outputting a byte to a printer ter (print driver) from the system iS-DOS, which makes it possible to seem from using commands dy LPRINt. The support program offers wife's choice of working with one of printers: 1.Printer 'MC-6312' 2.Printer 'SPRINT' Changing delays in BASIC program, you can configure scanning made by you device for your printer. Delay addresses. Below are the addresses in the table Description of delays and their decoding: 1. Horizontal adjustment
zontal distance betweenскaнируeмыми точками. 2. Размер шага скани- рования по вертикали (Н*1/288 дюйма). 3. Компенсация уста- новки точки на экран. 4. Количество задер- жек принтера после
сканирования строки.
5. Величина задержки принтера после пробега строки (от 30000 до 60000). Одновременная рeгули- ровка 4 и 5 задержки позволяет установить начало сканирования изображения. 6. Printer delay value after its initialization and otpa- idle boots. Note: 1/288 inch is maximum resolution method - inkjet printer performance and traceability depending on this scan devices. 6. Conclusion. Right to distribute this version of the program belongs to magazine SPECtROPHOBY. Author: Yudin Viktor Viktorovich. 347340, Rostov region Volgodonsk-22, Stroiteley Ave., building 16, apt. 87. In the preparation and design of the program frames took part: Ivanishchev D.M. *DIMiK SOFt* 347340, Rostov region, Volgodonsk-11, Stroiteley Ave., building 4/6, apt. 24. Dremov A.P. 347340, Rostov region, Volgodonsk, Leningradskaya st., building 1, apt. 100. For all questions arising from you during the production of the scan- device, you can convert contact the author, as indicated above - new address. Attach when prompted blank envelope for reply. Currently, the author is schemes have been worked out and testing is underway transfer of scanning devices from two and three gradations contrast. From the editors of the magazine. We were instructed to report To you, utowork on the third version this program is practically accomplished, and as proof of this - Well, the application has a DEMO of working you are the SCANNER of this third version. And also, I hope, continued- There are attempts to remake the SCANNER for needle printer (ROBOTRON, SMbZ37).

Share your thoughts about the article