APPLICATIONSDIVERS ★ PRINTER CHARACTER MODIFIER (PRACTICAL COMPµTING) ★

Printer character modifier (Practical Compµting)Applications Divers
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

ONE common problem when using a printer with the Amstrad is that both a Linefeed and Carriage Return are sent to the printer, which causes a double Linefeed to all printed output. D J Ellis suggests that one way to solve the problem is to cut wire 14 on the printer lead — if you can find the correct wire. He also suggests a simpler method, which is a lot more versatile.

You divert the output from the CPC-464 to the printer, via a machine-code program which checks for the value of 13 — the Carriage Return — or any other characters that you wish to change. It then sends the modified values to the printer in the normal way. The accumulator holds the value to be sent to the printer and the routine is called via the jumpblock at &BD2B. The listing shown redirects this jump to the machine-code routine, which is compiled by the Basic program.

First, the program asks you where you want the machine-code program to reside in memory. No limitations are imposed here as it is possible that the screen memory may be located lower in memory, and you may also have other machine-code programs in memory. The machine-code program will use up a minimum of 15 bytes if no changes are made, 21 bytes if the Linefeed is suppressed, and an additional six bytes for each character that you modify. If you are not sure where to put it, then try &9000 (36864), which is as good a place as any. Prefix hexadecimal numbers with & if you use them.

The Top of Basic pointer will be set to just below the address that you choose — line 50030. The next five lines Poke this address and some data to the machine-code program; this part is where the redirection takes place.

If you wish to suppress the Linefeed, press the Enter key when prompted by lines 50090 and 50100. Press any other key if you want the double Linefeed to operate.

You will then be asked if you wish to change any of the characters. Often daisywheel characters do not match up with those on the CPC-464. For example, the £ sign on the CPC-464 is ASCII 163, but the CPC-464 can only send numbers between 0 and 127 to the printer as it ignores the eighth bit. So 128 is taken off the value of 163, and the value sent for £ is 35. On some wheels 35 is the £ sign, but on others it is the # sign. If the £ sign is not on the wheel at all you can use the $ character as a last resort; this is ASCII 36.

When prompted by line 50130 press the Enter key to change characters. In reply to line 52010, enter 163 for the character to change, and then 36 in reply to line 52030 for the character to change to. To make further changes to other characters press the Enter key and repeat this process. Otherwise press any other key and the program will end after tagging the original call to ROM on to the end of the machine-code program.

The machine-code program will be Called in line 50180, and any characters sent to the printer will be checked to see if they need modifying. In the case of the Linefeed this is changed to a null character, so nothing is printed.

If you have a dot-matrix printer you should also find this program useful. You can also change the printing codes below ASCII 32 if you like, which could prove interesting.

Once the program has been run you can New it as the Basic program then takes no further part. The lines are numbered so that you can Chain Merge the program on to the end of a program that you have in memory, and then use it and delete it before listing or using the program.

Keyboard aid

If you are a touch-typist, you will have noticed that the Amstrad CPC-464 has an unconventional arrangement for the colon and semicolon, which probably slows up your typing. REF Street provides an easy solution to the problem. Add the following lines to your program

10 KEY DEF 29,1,1,58
20 KEY DEF 29,1,59
30 KEY DEF 28,1,42

This addition will move the colon to its conventional position in place of the asterisk; move the semicolon to its normal position in place of the colon and move the asterisk to where the semicolon used to be.

If you are using the Tasword 464 word-processing program, note that although you have moved the asterisk to where the semicolon used to be, the command Control* to convert upper to lower-case remains as it was, provided that you use the old position of the asterisk. 0

Practical Compµting

★ PUBLISHER: Practical Compµting
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: Dave J. ELLIS
 



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Printer  Character  Modifier    (Practical  Computing)    LISTING    ENGLISHDATE: 2024-12-04
DL: 101
TYPE: PDF
SiZE: 358Ko
NOTE: Supplied by archive.org ; 1 page/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Pride Utilities - Rsx Printer Pac 2
» Applications » Printer buffer
» Applications » Printer Support Disc (Locomotive Software)
» Applications » Cassette Box Label Printer (The Amstrad User)
» Applications » Pride Utilities - Rsx Printer Pack 1
» Applications » Printer Control RSXs (Amstrad Computer User)
Je participe au site:
» Pour ce titre nous ne disposons de fichier executable sur CPC (Dump, Saisie du listing) , alors si vous avez ça dans vos cartons ou vous désirez usé vos petit doigts boudinés sur votre clavier faites le nous savoir.
» Vous avez des infos personnel ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.732-desktop/c
Page créée en 043 millisecondes et consultée 393 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.