APPLICATIONSBUREAUTIQUE ★ Rushing into print ★

Turbotext (Computing with the Amstrad)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 ★ 

CHRIS NIXON knows how to turbocharge your cursor

LOCOMOTIVE Basic is quite a fast version of the language but have you ever wondered whether it could be made to go any quicker? Wonder no longer! With Turbotext, Basic programs which print on the screen can run up to 87 per cent faster.

When a character is printed an incredible amount of work is carried out before anything appears. Finding how many bytes make up a letter in the current mode, what the pen value is, what the byte masks are for that colour, where the shape matrix is, and calculating the character's position in the screen memory are just a few of the operations involved.

As you can imagine, this really slows things down, and forms a bottleneck in an otherwise fast system.

By replacing most of the in-built routines used to print characters with faster, more dedicated pieces of code. Turbotext achieves a useful speed increase. In Mode 1 it is 44 per cent faster, in Mode 0 it's 67 per cent and in Mode 2 the figure rises to 87 per cent.

When you run Program I you will have two RSX commands, |TURBO and |NORMAL. As the names suggest , |TURBO activates fast printing mode, while |NORMAL restores things to normal. To obtain the speed increase I restricted some of the facilities available, and you need to take account of this when writing programs.

In normal printing internal adjustments are made when the screen scrolls. Turbotext avoids having to do the necessary calculations by clearing the screen when printing a character would cause it to roll. The text then continues from the top of the screen.

This is to avoid a crash and not a feature of the program so don't rely on it. In Modes 0 and 1 the quick-'n'-dirty method I used can lose the first character to be printed on the newly-cleared screen. For this reason you may wish to keep Turbotext dormant while you are typing in.

To speed things up further, transparent mode is ignored and text windows are not taken into account. All characters printed while Turbotext is active will appear at their physical screen positions, that is with location 1,1 at the top left of the screen.

You may find that some control codes such as CHR$(24) don't work. PEN and PAPER commands will function normally except in Mode 2. Here Turbotext shows some intelligence and will reverse pen and paper by just using PEN 0, or PEN 1 to switch them back again.

Remember that although Turbotext will speed up the printing of text it won't affect other aspects of your Amstrad's operation. Therefore, in worst case situations where printing is not a frequent occurrence, the overall speed improvement will be low.

The extra speed is achieved by replacing the firmware jumpblock entry TXT OUTPUT at &BB5A -through which most printing is channelled - with a jump to the Turbotext routine.

This first checks whether the character is a control code. If so, it is sent to the firmware. If not. Turbotext gathers all the information needed to print the character and bungs the result into the screen memory with a sprite subroutine.

For those of you reaching for your disassemblers, there are two things which may cause confusion. One is that the program uses self-modifying code, the other is that I cheated in the program loop which prints in Modes 0 and 1.

HL, DE and BC were taken up and I was going to use IX to point to the character matrix for reading the shape data. The problem is that operations involving IX and IY are relatively slow and should be avoided in speed-critical situations.

To get round this I used some illegal opcodes detailed in the April 1986 issue of Computing with the Amstrad which treat the 16 bit IX register as two 8 bit registers.

This isn't quite as fast as using normal 8 bit registers, but gives a net speed increase of 3 to 5 per cent by allowing me to keep HL and DE free for pointing to the screen and matrix.

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1988
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1988
★ AUTHOR: CHRIS NIXON
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Turbotext    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-30
DL: 213
TYPE: ZIP
SiZE: 5Ko
NOTE: 40 Cyls
.HFE: Χ

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

Lien(s):
» Applications » Textverarbeitung
» Applications » Textdump (Computing with the Amstrad)
» Applications » Giant Text (Popular Computing Weekly)
» Applications » Multitext CPC
» Applications » Textverarbeitung
» Applications » Arnor - Protext - Making the Most of Protext (Amstrad Computer User)
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 333 millisecondes et consultée 941 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.