APPLICATIONSDIVERS ★ RSX RAM PRINTER BUFFER (COMPUTING WITH THE AMSTRAD) ★

RSX RAM Printer Buffer (Computing With the Amstrad)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 ★ 

IN the December 1986 issue of Computing with the Amstrad we explained how to expand the buffer in the Amstrad DMP 2000 printer.

When a printer outputs characters it can't do it as fast as the computer sends them. To get round this most printers have an on-board buffer, which is an area of memory where characters are stored until the print head is ready for them.

If your printer has a 100-byte buffer the Amstrad can send 100 characters to the printer and carry on with what it is doing. In the meantime the printer chugs along at its own pace taking a new character from the buffer when it needs one.

If you try and print more text than the size of buffer allows, the operating system will wait until the printer has caught up and the micro pauses until it has sent everything it wants to. Printers with larger buffers hold more text, meaning that the computer spends less time waiting and consequently you can get on with something else.

Not everyone has a DMP printer and those who do may not feel confident about delving inside and invalidating their guarantees. Rambuffer overcomes this by setting up another buffer to complement the printer's own, but locates it in the computer's memory.

It is compatible with Basic programs and rom-based software like Protext or Maxam and will work with any make or model of printer. The buffer can be located anywhere in memory and its size varied according to your needs.

Type in and run Program I, which will generate the machine code, and save it to tape or disc as RAMBUFF.BIN.

You then need to use either Program II (for CPC464/664) or Program III (for the CPC6128) to install the new facility. The reason for the difference is that on the CPC6128 the buffer is in the extra bank of RAM and initialised in a different way to the 64k models. This frees more memory for Basic programs.

Rambuffer produces three new RSX commands- |BUFON, |BUFOFF and |HOLD.

|BUFON turns the RAM buffer on and the format of the command depends on the model of CPC you are using. With the CPC464/664 it must be followed by two parameters, the first the size of buffer and the second where in memory it is to be placed.

Try and put the buffer as high up in memory as possible to leave the maximum amount available to Basic. Also be careful not to overwrite the machine code which starts at &A000 or 40960 in decimal. So:

MEMORY 35838:|BUFON,5120,35839

would set up a buffer of 5k (5120 bytes) starting at location 35839 and ending at 40959. You must lower HIMEM to protect the buffer from being over written by Basic, hence the MEMORY command before |BUFON.

CPC6128 owners make use of the extra bank of ram, freeing more memory for use by Basic. Only one 16k block can be used, but in practice this is not a problem as 16k is more than adequate, holding around eight pages of text.

With the CPC6128 one parameter, between 4 and 7 is passed with the |BUFON command. This is the block of extra RAM to be used: The four 16k blocks in the first 64k are numbered 0 to 3 and the blocks in the second bank are 4 to 7. If you are using Bank Manager remember to avoid the buffer when using commands such as |SCREENCOPY.

When |BUFON has been used with parameters, there is no need for them when you next use the command. Once the buffer has been turned off with | BUFOFF, the size and location may be reset using new parameters with I BUFON, but if no parameters are present the old ones are used.

|HOLD suspends printing, although characters will still be stored in the buffer. To continue printing use |BUFON and no text will be lost. This could be handy if you wanted to change the paper in the printer in the middle of a long document.

When the buffering facility is no longer needed, |BUFOFF will restore normal printing. It also has the effect of clearing the buffer so any remaining text will be lost.

Rambuffer consists of two routines. When |BUFON is used, the firmware indirection MC WAIT PRINTER is redirected to point at the first routine, which stores characters in the buffer.

The second part takes a character from the buffer and sends it to the printer when it is ready to accept one. It is set up as an interrupt, which is the machine code equivalent of the Basic EVERY command.

Pressing the Escape key in a Basic program while printing is in progress will return operation to the keyboard as usual, but text will continue to be printed until the buffer is empty. If you want to avoid this, type |BUFOFF to clear the buffer.

CWTA

★ PUBLISHER: Computing with the Amstrad
★ YEAR: 1987
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1987
★ AUTHOR: Adrian Joiner
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» RAM  Printer  Buffer    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-08-04
DL: 272
TYPE: ZIP
SiZE: 5Ko
NOTE: 40 Cyls
.HFE: Χ

Je participe au site:
» 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.7-desktop
Page créée en 551 millisecondes et consultée 1484 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.