APPLICATIONSPAO/PRESSE ★ The light fantastic ★

Printer Echo Utility (Computing with the Amstrad)Applications Pao/presse
★ 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 ★ 

IAN SHARPE's handy utility echoes screen text output to the printer

IT'S often useful to be able to instantaneously provide hard copy of your screen text output. For instance, if you're using the checksum utility it's easier to take a printout of the entire list and work through the program making alterations rather than listing out checksums every time you find a discrepancy.

Another use might be as an easy way of providing printer output from a program by simply switching on the echo facility instead of writing routines to deal with it. Copies of disc or tape catalogues spring to mind, as does keeping a record of what happened while you were testing a program.

Program I does the trick. When run it provides an RSX, |PRINTER,n where n is a number 0 or 1. Using 1 will echo all screen output to the printer and 0 will switch it off again.

Control codes below 32 can cause different effects on the printer to those on the screen, so all but carriage return and line feed are filtered out. Of course sending codes with PRINT#8 will still work as normal.

With the facility enabled, as characters appear on the screen they may not be echoed immediately. There's no need to worry, the printer is storing the characters in its buffer and will output them when either the buffer is full or it receives a carriage return.

Using more than one machine code utility at once can cause problems if they want to use the same area of memory. I've made this one relocatable and it will automatically go to the top of free memory and lower Himem to protect itself. If you are using other utilities, make this the last one you install.

The program works by intercepting two firmware jumpblock entries - TXT WRITE CHAR and TXT OUT ACTION -and sending the character to the printer if a switch has been set with the RSX. Those familiar with the firmware manual will probably find that these are lower level routines than the ones they would have expected to be patched.

This is because the higher routines at &BB5A and &BB5D are not always accessed by other parts of the firmware. Patching these routines leads to only part of the screen output being sent to the printer. Luckily all output is eventually routed through the jumpblock entries at &BDD3 or &BDD9 so these are the ones intercepted.

One further complication is this: &BDD9 deals with both control codes and characters to be printed. Control codes it sends off to the appropriate control code routine, characters find their way to &BDD3 which prints them at the screen location specified in HL.

Now while some firmware routines wanting to print text go through &BDD9 others go straight to &BDD3. The consequence of this is that if we patch &BDD3 alone, no carriage returns get sent to the printer. If we only patch &BDD9, the carriage returns are sent but the program misses those characters sent directly to &BDD3.

The answer, therefore, is to intercept both routines but this causes one further problem: Text characters sent to &BDD3 will be sent to the printer once but those sent to &BDD9 will go twice - once from that address and again when they reach &BDD3.

As the patch at &BDD9 is only there to send carriage returns to the printer we ensure these are the only characters sent at this point, text being left until it reaches &BDD3.

There's a lot to be learned from the assembler listing - it's copiously documented and tyro machine coders should find it instructive. Unfortunately space will not allow us to print it so those who want a copy can send me a stamped addressed envelope, though I can't enter into any correspondence.

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1987
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1987
★ AUTHOR: IAN SHARPE
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» Printer  Echo  Utility    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-08-24
DL: 182
TYPE: ZIP
SiZE: 4Ko
NOTE: 40 Cyls
.HFE: Χ

» Printer  Echo  Utility    (Computing  with  the  Amstrad)    ENGLISH    LISTINGDATE: 2020-08-06
DL: 196
TYPE: PDF
SiZE: 34Ko
NOTE: 1 page/PDFlib v1.6

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/c
Page créée en 079 millisecondes et consultée 882 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.