CODINGLISTINGS ★ CPC464 MONITOR AND CASSETTE UTILITIES ★

CPC464 MONITOR AND CASSETTE UTILITIES|Popular Computing Weekly 1985-04-11)CPC464 MONITOR AND CASSETTE UTILITIES|Popular Computing Weekly 1985-04-18)
 ★ 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 ★ 

When I'm calling you

A selection of useful routines for the Amstrad CPC 464 from the keyboard of Brian Cadge.

This collection of machine code and cassette routines should be equally useful to both the Basic programmer and the machine code programmer. To use the program, type in the Basic listing, or the assembly language listing if you have an assembler, and Save it. The Basic program will warn you if you have made any errors in entering the Data statements, in which case you should recheck the listing.

Among the things the program will allow you to do are to enter machine code into Ram, examine the contents of any piece of Ram, set breakpoints in the code for testing subroutines, access the cassette motor, read in a cassette header and display relevant information from it, and write Basic data statements to tape.

To run the program, once loaded into reserved Ram type CALL 38000. The 1 >' character is the monitor's prompt for a command, the following commands are available:

  • BYE — Returns to Basic, or the calling routine
  • WRITE — Writes Basic data statements to tape
  • LIST — Displays a section of Rom or Ram
  • START — Turns on the cassette motor
  • STOP — Turns off the cassette motor
  • READ — Reads and displays information from a header block
  • FAST — Sets the cassette to 2000 baud
  • SLOW — Sets the cassette to 1000 baud
  • WIDTH — Toggles between the 40 and 80 column display
  • INPUT — Allows data to be entered directly into Ram
  • REGS — Displays the contents of the Z80 registers
  • CALL — Calls a machine code subroutine
  • BREAK — Inserts a breakpoint
  • JUMP — Jumps to a given address (used with Break)
  • HELP — Displays a list of these commands

Some commands will ask for more information. For the purpose two other prompts are used; the '#' character means a 16 bit Hex number is required. Four characters must be entered, so to input the number 20(decimal), (which is 14 hex), you would type 0014. The '$' character means an eight bit hex number is required; here only two characters are required.

Here is a description of the commands in more detail. The Write command is used to record an ASCII file on tape, containing Basic data statements starting at Line 100. This File can be loaded as a normal Basic program, using Load This is very useful for anyone who writes a machine code program using an assembler, and wishes to produce a Basic loader program.

The Data statements in the Basic listing for this program were produced using this command. The program will ask for the start address and the length of the code to be put into data statements. It will then ask for confirmation before producing the file.

The List command will ask for a start address. A screenful of data is displayed, the program automatically formating it to fit whichever size display is being used. Pressing any key will continue the list; pressing Esc will return you to the command prompt.

To analyse a program's header block, the Read command is used. The cassette should be positioned as if to Load the program, and the Play button pressed. The monitor will read in the first header block it finds and display the following information. The filetype byte character, as given the Cat command in Basic, the start address of the program, the length, and the execute address. This is useful mainly for binary files you have saved, but have forgotten where they load and execute from.

The Input command allows you to enter data directly into Ram. After supplying the start address, you can type in the data, each byte separated by the Enter key. Press Esc when you've finished. This command can be used to enter small test programs, or to quickly change the contents of a memory address.

The Call command is used to test subroutines, which should end with a normal Ret instruction, to return to the monitor. On return, the values of the Z80 registers are saved, these can be displayed by the Regs command.

To enter a breakpoint into a program, use the Break command. This asks for the address of the breakpoint and saves the contents of this address, after which it inserts a RST 30 instruction. Using the Jump command to run the program under test, when a breakpoint occurs the monitor will halt the program, display the values of all the usable Z80 registers, and replace the original byte into the breakpoint address.

All the commands are quite straight forward and do not really need further explanation. All commands must be entered as one word, in capitals. The program sets the caps lock on when called so there should be no problem.

Next week, how to add your own commands to the monitor and the remainder of the assembly listing.

PopularComputingWeekly

★ PUBLISHER: POPULAR COMPUTING WEEKLY
★ YEAR: 1985
★ AUTHOR: Brian Cadge

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» CPC464  Monitor  and  Cassette  Utilities    (Popular  Computing  Weekly)    LISTING    ENGLISHDATE: 2017-05-11
DL: 5 fois
TYPE: PDF
SIZE: 612Ko
NOTE: Uploaded by hERMOL ; 5 pages/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):
» Coding Src's » Jouez avec les allumettes
» Coding Src's » Loader for drive B (RAMDOS) format (CPC Attack)
» Coding Src's » Zahl (CPC Amstrad International)
» Coding Src's » Watch It (Computing With the Amstrad)
» Coding Src's » Graphic Patterns
» Coding Src's » Flippy v2.2 (CPC Attack!)

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 077 millisecondes et consultée 130 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.