Raw Assembler (Computing With the Amstrad)Z80 Disassembler (Computing With the Amstrad)
★ 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 ★ 

Roland Waddilove takes the strain out of machine code programming with this Z80 assembler for the Amstrad

If you intend following Mike Bibby's excellent introduction to machine code programming, then by you will probably be looking round for some sort of assembler to take all the hard work out of writing machine code programs.

As you probably know, a machine code program consists of a series of binary numbers in the range 0 to 255 (which we usually enter in hexadecimal).

This makes a program very difficult to read. What does &26, &2A mean? Very little, I should imagine, unless you know all the opcodes off by heart.

Assembly language is far easier to digest. A mnemonic is used to represent each machine code instruction. For example, the code above can be written as:

LD H,&2A

which is far more meaningful. It's not perfect, but is's a big improvement.

LD H,score

is even better.

What an assembler does is to convert these assembly language mnemonics into machine code for you. There is no need to look up the individual codes and type them in as hex numbers.

You will find programs arc far easier to write and far simpler to debug if they don't work first time (and they rarely do) and by using labels to represent constants and addresses machine code can become quite readable.

RAW, the assembler presented here, will allow you to write in assembly language.

When it is run, the mnemonics and labels will be converted into Z80 machine code which will be stored starting at any address not occupied by the assembler itself.

As the assembler is in Basic, it resides at the bottom of the memory, so it's convenient to place the code near the top.

HIMEM can be moved down if necessary to create space for the object (machine) code.

The assembly language program (source code) or the machine code generated by it can be saved to disk or tape, with or without the assembler program itself.

The code can afterwards be CALLed (there is no need for an assembler once the object code has been produced).

RAW will make such a difference to your programming that once you have used this assembler I can guarantee you will never do it by hand again.

All instructions and labels are placed in DATA statements before the assembler. Instructions can be 1,2 or 3 part.

Only one instruction per line is allowed and it must be typed in upper case with one space between the first and second part (if any), and a comma between the second and third parts (if any). No extra spaces are allowed.

Labels must be in lower case only.

For example:

RET                1 part instruction.
DJNZ loop          2 part instruction with label, 1 space.
LDA, (IX +4)       3 part instruction/1 space, 1 comma.

Himem will usually be set to reserve space for the code. Use MEMORY as normal.

10 MEMORY &7FFF:REM &8000 on is available for code

The variable printer used by the assembler can be set to direct the listing to the printer on the second pass. printer=0 turns printer off, printer=1 turns printer on.

20 printer=0:REM printer off

REMEMBER the good old days when all there was in the way of video games was ping pong? And then Space Invaders appeared and you couldn't get on a machine for love nor money.

Well, for all nostalgia lovers, Computing with the Amstrad proudly presents a re-vamped version of this classic game. It is written in 99 per cent machine code with only the title screen in Basic.

As ever, your mission is to prevent Earth from being invaded by hostile aliens, your only defences being five space cruisers and your own reflexes.

The machine code is held in the data statements starting at line 590. If you renumber the program you must change the value of lin in line 550 to the first line of data. This is to ensure that the internal data validation routine works correctly.

Because this sort of validation routine is not 100 per cent infallible make sure you save the program before you run it.


★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1987


  » RAW  Assembler    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-24
DL: 3 fois
NOTE: 40 Cyls

» RAW  Assembler    (Computing  with  the  Amstrad)    ENGLISH    LISTINGDATE: 2013-09-20
DL: 87 fois
SIZE: 972Ko
NOTE: 5 pages/PDFlib v1.6

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

» Applications » BASMON (Schneider Magazin)
» Applications » Inside Arnold (Popular Computing Weekly)
» Applications » XLISP/Prolog
» Applications » Pascal Face Au Basic
» Applications » CPC Basic Compiler
» Applications » Affichag


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.7-desktop/cache
Page créée en 077 millisecondes et consultée 1413 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.