Studies - New themes for development.

ZX Review #5-6
(C) Davydov VM, Nizhny Novgorod
reg., s.Zaprudnoe


   Suggest new topics for development in the section "Studies".


   The procedure for obtaining copies of the graphics on the 
printer box arbitrary size of the screen area that can be

useful in many applications
programs. For her writing is not
must have a printer. We may assume that sub-program transfer 
printer code with the seat in the battery is already there in 
the right place puts CALL. 

    In the general form of procedure is as follows.

    1. Setting a zero distance between the print lines the 
printer. Printer "EPSON" To do this you need to pass

sequence 27,65,8 (decimal).

    2. Installing graphics
printer mode. For "EPSON" sequence 27,42,5, n1, n2,
where n1 and n2 specify the number of printed vertical columns 
= n1 + n2 * 256. 

    3. The calculation of the start address
line familiarity in the display area.

    4. Transmission cycle printer
Image Line (256 bytes).

    4.1. The calculation of the battery. With graphic print top 
needle printer matches Bit 7, the second from the top - Bit 6 
,..., bottom - bit 0. 

    4.2. Transfer content
battery to the printer.

    4.3. Go to the next column.

    5. Transfer printer codes
carriage return
line (13.10).

    6. If printed, not all
line, go to step 2.

    7. Restoration of the interval
between the lines. For "EPSON" codes 27.64 (translated in the 
state, which was after power-up).


    Practically the only interesting thing in terms of 
programming, is conversion of eight bytes familiarity, 
coinciding with the format character generator, a sequence of 
eight bytes in the format of the printer. 


    Another useful procedure for the printer can print 
high-quality graphical mode using a loadable character sets.


    It is desirable that it supported the sequence of control 
codes: 

    27,87,49 - enabling double
width of a character;

    27,87,48 - turn off double-width characters;

    27.69 - enabling double
thickness character;

    27.70 - Turn off the double
the thickness of characters. Would be nice
if someone will build this procedure into a text editor.


    Almost none
major program, in which
not used all sorts of menus. Another direction for
studies. Options may be
a lot. As a special performance is required, the criterion
one - at least the memory.