APPLICATIONSCREATION GRAPHIQUE ★ Memories are made of this|Popular Computing Weekly) ★

Memories are made of thisApplications Creation Graphique
 ★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se le presenta en su versión original ★ 
 ★ Dieser Text wird in seiner ursprünglichen Fassung Ihnen präsentiert ★ 

Find out how characters are stored in memory with this m/c program by R G Bennett

Although this program could perhaps be classed as a novelty program, there are features which could be of academic interest to some readers. Appendix III of the Amstrad handbook shows pictures depicting those characters with ASCII codes from 32 to 255 decimal, and shows them on an 8x8 grid. This grid is called the character matrix, and is stored in lower Rom as the 8 bytes represented by the 8 rows, or lines, of the matrix. Each byte is a number between 0 and 255 decimal, which is stored as the binary bit pattern which represents that number. The convention is that when a bit is ‘one' it is said to be set, and when the bit is ‘zero' it is reset.

You can see quite clearly from Appendix ID that it is the pattern of set bits in each byte which make up the whole character.

When you have the program up and running you are requested to press a key, with or without Shift You could even press the Enter key at this stage if you wished. The character represented by the keypress is then shown on the screen in a much enlarged form, followed by the binary, hexadecimal, and decimal representation of each byte of the matrix. You should have no difficulty in matching up the binary pattern on the screen with the pictures in Appendix HI.

After seeing the result of your first keypress, a second one will take you back to the start of the program, but pressing Enter here will stop the program.

Regarding the actual program, in order to gain access to a character matrix, the lower Rom has to be 'turned on' first, and turned back off again when the matrix has been found. When printing the enlarged character each of the 8 bits of the byte are checked in turn. If the bit is set then a solid square is printed, and if reset, a space is printed. Thus the solid squares pick out the shape of the character. The same method is used to print the binary representation of the character, but this time a 'one' replaces the solid square, and a zero is printed in place of the space.

Program notes

The following routines are called from within the program, with the addresses given in hexadecimal:

  • BC0E - sets the computer mode. Register A holds the mode. AF,BC,DE,HL corrupted
  • BB5A - print the character in register A to the screen, nothing corrupted but control characters are obeyed.
  • BB18 - wait for a keypress, code returned in register A with cany set nothing corrupted
  • B806 - enable the lower Rom
  • B909 - disable the lower Rom
  • BB78 - set the current cursor position. ie, the next print position register H holds the column and register L the line position
  • BBA5 - puts in the HL pair the start address for the matrix-character in A

The only control code used in the program was in the Text, this was control code 31 which is the same as a Print At instruction. This is followed by a number for the column, and then the line number to printed to. Most of the control codes are ideal for embedding m message printing loops.

Once you have successfully generated the code by the Basic program, the actual machine code can be saved by Save '‘name",B,30000,290,30000. It can then be loaded back later on by either Memory 29999: Load "name", or Memory 29999: Run ".

Popular Computing Weekly

★ PUBLISHER: POPULAR COMPUTING WEEKLY
★ YEAR: 1985
★ AUTHOR: R.G.Bennett

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Memories  are  Made  of  This    (Popular  Computing  Weekly)    ENGLISH    LISTINGDATE: 2017-05-07
DL: 0 fois
TYPE: PDF
SIZE: 98Ko
NOTE: Uploaded by HERMOL ; 1 page/PDFlib v1.6

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » UDG Symbol Definer
» Applications » Symbol (CPC Infos)
» Applications » Symbol - Editor (CPC Amstrad International)
» Applications » Symbol Definition
» Applications » Symbol-0/Symbol-1
» Applications » Symbol - Basic

QUE DIT LA LOI FRANÇAISE:

L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!

CPCrulez[Content Management System] v8.75-desktop/c
Page créée en 110 millisecondes et consultée 55 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.