APPLICATIONSBUREAUTIQUE ★ AMSTRAD LETTER WRITER ★

Amstrad Letter Writer (Wordprocessor v2)Applications Bureautique
★ 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 ★ 

A clever little program for Amstrad owners who want to develop their own word-processing package.

If you want to use your computer to write the occasional letter to The Council complaining that your dustbins haven't been emptied, you hardly need a wordprocessor. Some typewriters cost less than most wordprocessors, be they on ROM, tape or disc — but you probably know that, or you wouldn't be bothering to read this article.

A BASIC WORDPRO

Here, we describe a small BASIC wordprocessor for the Amstrad — it does its job adequately (ie: letter-writing) and you can always change it around if it doesn't do all things you'd quite like it to, like checking your spellings and making the tea.

There are a number of points about the Amstrad CPC464 which make it possible to present such a small wordprocessing package. First of all, there is the CPC464 keyboard. It is a good keyboard, laid out to correct typists' standards, and since it is a pleasure to use, why not use it more often? Secondly, the Amstrad has the built-in tape recorder which is not only reliable, it would seem, but also has that essential item of equipment: the mechanical counter. Essential, that is, if you want to build up a library of documents on your C90 cassettes.

Finally, there is the 80-column screen, so you can see in advance exactly how your document will look, and the cheap Amstrad printer which will churn out your deathless prose.

If you're still not convinced of the wisdom of proceedeing, perhaps you ought to be told (if you don't already know) that the Amstrad has a keyboard BUFFER in software which means that no matter how fast you type, you won't be able to outstrip the ability of the BASIC program to keep up with you. Now that's a piece of knowledge to make a few Spectrum owners weep, at any rate.

HICCUPS ALREADY

Our CPC464 was linked up to an Epson RX80 printer and seemed to want to print all listings double-spaced — ie: the printer was receiving two line-feeds even though it was still in its factory-set condition of "NO automatic line-feed after carriage-return". A quick look at the Amstrad manual revealed the problem: all "unused" wires on the Amstrad printer-cable are grounded, but it happens that Epson use PIN 14 as an extralinefeed control switch. Tying it to ground tells the Epson to add a LF to every CR it receives!

We got around the listing problem, as you can see. There is no need to cut the pin 14 wire on the printer cable because the print-routine of the wordprocessor only issues a single CR at the end of a printed line, so it needs the LF which the printer-cable adds. I daresay the listings will work properly too, on an Amstrad printer!

FEATURES

The idea behind "Letter Writer" is to keep everything as simple as possible so that the code can be examined, understood and modified. The entire text of the document typed is held in the array T$. It's a two-dimensional array, with the cells of the array representing the characters of the imaginary piece of paper you are typing on. Thus in line 140 the T$ array is dimensioned according to how many characters you would like down the paper (LINES). The screen (and thus the paper) is configured to the typist's standard of a 64 character line bordered by margins 8 characters wide.

The wordprocessor runs mainly in "overprint" mode. The cursor is a solid square and may be moved to any part of the document, or over the blank screen, by the four arrow keys. DELete iks a destructive backspace — that is to say it overwrites the text with spaces as it moves backwards through the document. Text may be entered anywhere except within the margins (which are indicated on the screen) and will overwrite whatever information is already there. The Amstrad repeating-key facility is retained. Overwriting, deleting and cursor movement are all as fast as they need to be, and there is no indication that BASIC routines are involved. Such is the speed of Locomotive BASIC.

However, these functions alone would not make for efficient letter-writing. An INSERT mode is needed, and so too is a backspace which closes up the text after the offending characters have been removed. CTRL X moves all text between the cursor and the end of the line to the right, thus creating space for new text. But please note: if the line was a full one, the shift-right process causes characters to leave the end of the line and then, regrettably, they are lost. CTRL Z removes the character beneath the cursor and then moves the text occupying the rest of the line one position to the left. Again, the consequences of this action do not extend beyond the line in question, so what we have in Letter-Writer is a program that can format a line, but not a whole document, and it is therefore more like a "correcting-typewriter" than a true word processor.

CTRL X and CTRL Z don't work with much speed, since they work by shifting data in the COLUMN dimension of the T$ array. They are, however, perfectly alright for corrections to the odd word or two. Because of the keyboard buffer their action is somewhat fascinating to watch. Tapping CTRL X rapidly stores a lot of "shift right" instructions in the Amstrad's keyboard memory and for the next 10 seconds or so you can watch a section of your sentence chug eastwards as the space you want is opened up in your line.

CTRL V will centre a line of text, and is useful for headings, especially letter headings.

The other commands are CTRL S for "save document", CTRL L for "load document", CTRL P for "print document" and CTRL Q for "quit letter-writer". The save and load work upon the entire T$ array and can take some time if you have dimensioned a large array and are using the slow speed 1000 baud transfer. Printing, on the other hand, can be controlled in a simpole manner by the user. All characters will be sent to the printer, from the start of the document — T$(1 , 1) — up to the reverse-slash. The reverse-slash may be inserted anywhere in the text, but if it is absent, all T$ will be printed.

THE LISTING

In the listing "$" has printed as "£" , but otherwise everything is as it should be. The program is made up of simple modules which manipulate T$ in the appropriate way. The screen is constantly updated by the short routine starting at line 3800, which works by repeatedly calling the routine at 3600 w3hich updates one single line. You will observe that, for reasons of eccentricity, the text in T$ is passed to a one-character-size WINDOW on the screen. This seems to work just as fast as the more traditional PRINT@ or LOCATE x,y so no complaints, please! The translation of the CHR$() codes are shown in figure 1 and the source listing of the short machine code section is shown in figure 2. Machine code? We hear you ask. . . It's there to help the Letter-Writer scroll its screen if you are working on documents more than 25 lines in length. All the machine does is call a routine in ROM which causes a hardware scroll of the Amstrad screen. However, when using machine code within the Amstrad, beware of the cassette buffer! This is a delightful little beast which meddles with the high-memory pointer when you aren't looking. It is not documented in the manual that accompanies the computer. At switch on PRINT HIMEM returns 43903. After a cassette read or write PRINT HIMEM returns 39807 — a large cassette buffer has been formed by lowering HIMEM. If HIMEM is set at the beginning of a program, as would be the case with other computers, then the first time use of the cassette system will grab 4K of memory below HIMEM, and reset HIMEM to a new, lower, level. This can play havoc with your vision of the memory map and may well scramble machine code that you've placed in high-memory. The method around this problem, suggested in an appendix in Amsoft's £20 BASIC SPECIFICATIONS book is shown in line 9700. A dummy cassette operation sets HIMEM once and for all and the buffer so created will be the one used by subsequent cassette operations until a system RESET wipes it away. Therefore, after RESET, always start the program with RUN 9700. After a BREAK, the program may be started with an ordinary RUN.

Figure 1.Figure 2.
CHR$(12) ^L Load
CHR$(16) ^P Print
CHR$(17) ^Q Quit
CHR$(19) ^S Save
CHR$(22) ^V Centre
CHR$(24) ^X Move text righ
CHR$(26) ^Z Move text left
CHR$(127) delete key
CHR$(143) cursor symbol
CHR$(240) cursor up
CHR$(241) cursor dowm
CHR$(242) cursor left
CHR$(243) cursor right

CD0BBC CALL SCR GET LOCATION
015000 LD BC,80
09 ADD HL,BC
C305BC JP SCR SET OFFSET
C305BC CALL SCR GET LOCATION
01B0FF LD BC,-80
09 ADD HL,BC
C305BC JP SCR SET OFFSET

Letter-Writer is written so that it can be modified. Try, for example, setting right margin and left margin (RM and LM) to zero. You then have the full 80 column screen at your disposal, and if you keep your lines down to 64 characters in length (average), you will have 16 spaces at the end of each line to cater for possible inserts. The cursor symbol can be altered, as can the codes for the various letter writing functions. There is also scope for greater versatility in the print-document routine, and scope for faster cassette routines. So, re-code if you wish, but most of all, happy letter-writing!

ERRATA

AMSTRAD LETTER WRITER (Computing Today March 1985) unfortunately suffered though the over-enthusiastic use of our page-layout person's knife. 18 lines were cut from the top of the program, and this 'unscheduled adjustment' in the program crept through unnoticed. To correct the situation, here are the missing lines:

Computing Today

★ PUBLISHER: Computing Today
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHORS: Phil Harvey , Richard Sargent
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Amstrad  Letter  Writer    (Computing  Today)    ENGLISH    LISTINGDATE: 2022-07-06
DL: 105
TYPE: PDF
SiZE: 1633Ko
NOTE: 2 pages/PDFlib v1.6

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

Lien(s):
» Applications » RSX Bigletter (Schneider Aktiv)
» Applications » International-Formal-Letter (Compute Mit)
» Applications » Fancy Letters (Popular Computing Weekly)
» Applications » Letterhead Designer (Computing with the Amstrad)
» Applications » Big Letters (Happy Computer)
» Applications » Kangaroo's Letter Creator v3
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» 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.7-desktop/c
Page créée en 229 millisecondes et consultée 1136 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.