APPLICATIONSDIVERS ★ PRINTING MODES (POPULAR COMPUTING WEEKLY) ★

PRINTING MODESPRINTING MODES: PART 2
★ 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 ★ 

Following on from last week, this week brings another short machine code utility to enhance your hard copy on the 464. Run the Basic program, and save the code generated using Save "Printer", B, (your address), 100. The routine is activated by a direct call to the start address, and deactivated using start address plus two.

In order to cue your text for double-width, or underlining, you have to choose a couple of characters, which the routine can recognise and send the appropriate codes to the printer. I have picked "—" (shifted zero), to signal underline and "t" (the exponent arrow under the £ sign), to signal double-width. Of course, using these characters in this way means that neither of them can be printed, but they are not symbols which often turn up in the ordinary course of typing. If you specially want them in your text, you could change them for something else; their positions are marked in the programs.

If you want to load this routine piggyback with Easi-Amsword, you must beware that the word-processor uses some blocks of upper memory for its own purposes. Here is a rule of thumb Load sequence, which avoids the pitfalls.

  • (1) Clear the computer with Ctrl/Shift/ Esc
  • (2) Symbol After 245
  • (3) Memory Himem-100
  • (4) Load "printer + ",&AB44
  • (5) Call &AB44
  • (6) Load "Easi-Amsword" in the usual way

This program uses Escape sequences which toggle on and off. That is, they switch on, using "SEC,(code), 1" and switch off with "ESC,(code),0". The Epson code for "underline" is 27,45,1: to switch it off, use 27,45,0. There is a similar one for "double-width": 27,57,1 for on; 27,57,0 for off. Most dot-matrix printers have options like this and you should have no trouble making your own modifications.

For the benefit of people interested in machine language, who have a disassembler, you will discover a routine which finds its own address. It's based on ideas suggested by Toni Baker. She was working with a Spectrum, but the Amstrad uses a similar system of Interrupts for keyboard scanning etc, and it works just as well.

Here's how it goes: First, give a Halt instruction; this makes the program wait until the next Interrupt. When this occurs, it goes off to do its key-scanning bit, which it treats as a sub-routine. This means that it puts the address of the next byte (DEC SP) on the stack. On return from the sub-routine, it POPs the stack address into the program counter and goes ahead. But it's a mistake to think that POPping the address gets rid of it. All that has happened is that the stack pointer has been incremented twice. The number is still there in RAM. So all you have to do is send back the stack pointer with two "DEC SP"s - and then POP the address into HL (which automatically restores the correct stack address).

Copy this address into the IX register and after that, some simple arithmetic can calculate the relative addresses, needed for the program, and put in place using offsets in the IX Register.

PopularComputingWeekly860213

★ PUBLISHER: Popular Computing Weekly
★ YEAR: 1985
★ CONFIG: ???
★ LANGAGE: ???
★ LiCENCE: LISTING
★ AUTHORS: John Durst & GLENN COUNSELL



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Printing  Modes    (Popular  Computing  Weekly)    LISTING    ENGLISHDATE: 2025-06-10
DL: 63
TYPE: PDF
SiZE: 2101Ko
NOTE: Supplied by archive.org ; 2 pages/PDFlib v1.6

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

Lien(s):
» Applications » Printer Pictures (Compute Mit)
» Applications » 3'' Disc Inlay Printer (Amstrad Computer User)
» Applications » Printer Pack - Sound Effects
» Applications » NLQ mode for none NLQ printers (Amstrad Action)
» Applications » Printer Echo Utility (Computing with the Amstrad)
» Applications » Banner Printer
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 537 millisecondes et consultée 3558 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.