[3/4] FX11HELP.TXT

ZXNet echo conference «real.speccy»

From Valerij Kozhevnikoff To All 12 January 2004

Section 3 of 4 of the file fx11help.txt < Posted by UU Wizard v1.64.63
-=────────────────────────────< UU Wizard >────────────────────────────=-
you can
write a loader that will automatically load the driver and
the program itself. It may look something like this:

10 RANDOMIZE USR 15619: RE
M : LOAD "fx drv" CODE 23296
20 RANDOMIZE USR 15619: RE
M : RUN "FX 1.1"

Write such a loader to disk with the RANDOMIZE command USR
15619: REM : SAVE "FX 1.1D" LINE 10 and then run
the FX 1.1D file to run Print FX.
In addition, you will have to connect
your own driver every time after startup by selecting User in the Interface submenu
OPTIONS menu.
If you 128K computer, do not forget to switch it to 48K mode, because... in 128K mode, the system itself uses the ZX printer buffer.
Below are the requirements for the user
driver.

When the driver is running, the following is prohibited:
- changing the mode and status of masked interrupts. The call
of the byte issuing procedure can occur both when interrupts are enabled and when interrupts are disabled, therefore, the use of the HALT command is prohibited.
- modification of any memory area, with the exception of
the 256 bytes allocated for the driver.
- transferhardware stack to any memory area, with the exception of the ZX printer buffer area; if necessary
the program itself will restore the previous state of the stack.
- exit to BASIC (using RST 8 or another method).
- calling any TRDOS procedures.
- possibility of hopeless looping. In the cycle of waiting for the printer to be ready, it is advisable to set a check for pressing
CS+BREAK (although this is done by the main program before each
driver call). When you press BREAK, just skip the output byte. Sometimes, instead of the test for pressing BREAK, they set
the maximum waiting time for the printer to be ready.
When the driver is running, the following is allowed:
- modification of all registers, incl. and alternative (except
register I).
- use of ROM procedures that do not change the contents of
memory (except for the system variable area).
The following is an example of a driver for an EPSON printer (or
compatible) with the Centronics or IFSP interface with a standard
connection to the parallel input/output port of KR580VV55A
(the built-in driver has approximately the same appearance):

00010 ORG #5B00
00020 JR PRINT
00030 INIT LD A,#98
00040 OUT (#7F),A
00050 LD A,1
00060 OUT (#5F),A
00070 RET
00080 PRINT NOP ;CPL forIFSP
00085 LD B,A
00090 M1 CALL #1F54 ;BREAK
00100 RET NC ;pressed
00110 IN A,(#5F)
00120 RLA ;~BIT 7,A
00130 JR C,M1
00140 LD A,B
00150 OUT (#3F),A
00160 XOR A ; A=0
00161 NOP
00162 NOP
00170 OUT (#5F),A
00171 NOP
00172 NOP
00173 NOP
00200 INC A ; A=1
00210 OUT (#5F),A
00220 RET
----------------------------

Here is a rather interesting example of a driver using ROM:

00010 ORG #5B00
00020 RST 16
00030 NOP
00040 INIT LD A,3
00050 JP #1601

When using such a driver, please note that even if your
ROM allows printing on the printer via a third thread, system
ROM procedures most often process the transmitted characters and
sometimes replace them, which unacceptable.
There are options for connecting a printer with a shifted
port layout. To use such a scheme, you need to replace
in the first example all the numbers #3F with #5F, #5F with #7F, #7F with #FF.


Appendix B.
Printed font editor.

In order not to bind the user to one type of font,The Print FX program has a built-in print font editor. With its
help you can create any stylized, national,
untyped fonts, fonts with any encoding, etc.
The editor is called by selecting the Font editor command in the
OPTIONS menu. Since the font editor is a fairly voluminous
program, it is not permanently contained in the computer's memory, but is
loaded from disk in place of the text. The editor
program is contained on disk in the file fx edit , and if the main
Print FX program does not find this file, an appropriate warning is issued and the editor does not start.
After starting the editor, you will see the front, or main
editor panel. The grid field on the left side of the screen is a 12 x 14 square matrix that displays an enlarged
image of the symbol being edited. By moving the arrow to
the grid squares and pressing select, you will invert the indicated
square (each such square corresponds to one point on the
printer). In this way you can draw any symbol image using points. In order not to forget during the editing process which symbol is being edited at the moment, a normal image of this symbol is displayed in a small rectangle under the matrix field. To go toFor other symbols, use
arrows located to the right of the matrix. The outermost and
lower arrows move the current character pointer
cyclically along the character generator by 8 characters, the inner arrows
by 1 character. The mark y of the Rus or Lat switch indicates
which character set is available for editing at the moment
Russian or Latin. Please note that in the process of
editing you do not change the main character generator, but its
copy in memory, which is overwritten in place of the main
character generator only when you exit the editor. Therefore, at any
moment you can restore the previous design of a character or an entire font using the Restore command (see below). Now let's take a closer look at the actions of the remaining editor commands.
Load font - loading a font from disk. The previously saved font
is loaded from the file with the name specified in response to the request. If
the name is empty (but not made up of spaces), the command is aborted. You can
load fonts supplied with the program, written in files
font1..font3.
Save font - writes the edited font to disk in a file with a
specified name. Despite the fact that at a certain moment
only either the Russian or the Latin font is edited,
both character generators are written into one file.
Catalog - output toscreen of the complete directory of the disk.
Test - output of the entire edited character generator to the
printer. Due to the limited graphics capabilities of the ZX
Spectrum, it is almost impossible to represent characters on the screen in the form in which they would be printed on a printer. Therefore, you will be able to see your new creation only on a printer in
real scale. Printing is carried out in the mode that was
selected by the Set mode command in the PRINT menu.
Quit - exits the font editor to the main program. When exiting, the edited character generator is rewritten from the editing buffer to the program buffer, thereby consolidating all
changes.
The CHAR and FONT menus, located on the right side of the window,
contain identical lists of functions that can be used to You can perform certain operations on symbols to make editing easier. The effect of the FONT menu commands is different in that
they apply to all 96 characters sign 
-=────────────────────────────< UU Wizard >────────────────────────────=-