APPLICATIONSPROGRAMMATION ★ Z80 SIMULATOR|Amstrad Action) ★

Z80 SimulatorApplications Programmation
★ 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 ★ 

No, no, it's not the lastest release from Codemasters. Z80 Simulator is a machine code debugging tool that should be useful to hackers and programmers alike. ADAM WARING puts it through its paces...

Z80 Simulator does what it says - it's a Z80 simulator that will test your code, performing any actions that the program carries out, without actually executing any instructions.

Obviously it's no use simulating code without any indication of what's going on. So wodges of information appear to guide you through your steps. The registers, disassembled instructions, and other valuable information is displayed at all times.

The Simulator is basically a machine code monitor, albeit a powerful one. The mam difference is that it allows you to use the whole of memory to test your programs. The traditional limitation of monitors is that they require a certain amount of memory to reside in. When examining a program that has been written by someone else - or even one of your own - it can be difficult to decide where to locate the monitor where it won't get overwritten.

Z80 Simulator isn't affected by these problems. The code is actually stored in the alternate memory banks in the 128K machines, and pulls out the bits of code as it needs them. The user doesn't have to worry where the code lies at all. In fact the whole thing is very clever. All memory operations are earned in the extra memory banks. It is indeed a simulation. as the main memory remains uneffected by the program's actions!

[NOIMG]
Stuck? The help screen lists all the instructions and what they do. The more common commands are accessed with a single keypress, while extended commands are prefixed with an 'X'.

You're in command

When the program's first run, a help screen is displayed, showing all the available commands. Should you get stuck, pressing the H key will remind you what's available.

Most commands are available at a single keypress. These are the commonly used ones. Other, less frequently used functions, are known as the extended commands. These are accessed by first pressing X. followed by the keypress This allows all the functions to have reasonably logical names, and also acts as a safeguard - loading a block of code is an extended command, so you won't accidentally overwrite the program you've been tracing for hours.

All the registers may be altered with ease, including the stack and program counter. So 'what if' situations can be tested by entering troublesome routines with different values.

[NOIMG]
Single stepping is the most useful option. Registers change as they would if the program were run, but everything takes place in the computer's secondary memory bank.

A step at a time

Memory dumps, disassemblies, memory editing can be performed ROMs can be switched in and flags can be examined. But real work starts when you use the single stepping commands -here's where the actual simulation takes place. The program can be stepped through an instruction at a time, with the registers and other information displays being updated as the commands are 'executed'.

For the most pan, the program steps through each instruction quite happily. But there are some situations where it can't simulate the command, and in this instance a warning is given to the user.

Commands that use the I/O ports, that attempt to swap memory banks, that try to alter the interrupt mode or that aren't valid Z80 instructions will throw up such a warning In other words, anything that may cause the Simulator to stop working, or could cause the computer to crash. In this instance the instruction is skipped, but, most importantly, you're told that it's been skipped.

There are other situations in which such a message may be displayed. Breakpoints and high and low address limits can be set by the user. Should the simulated code reach the breakpoint address, or stray outside the minimum or maximum limits, then you'll be told.

Should you want to run some code without being informed of what's happening at every instruction, tracing a subroutine that you know works for instance, the Go command will step through rapidly without updating the display Execution stops, as above, when a break occurs.

Ground level

Sim is a very useful tool. It's extremely flexible -not having to know where a program's located means that a great deal of the fiddliness normally associated with debuging aids is eradicated.

That's not to say it's for the beginner, though. A good grounding in machine code and a general understanding of the way monitors work is essential - don't expect the manual to teach you anything above a command-specific level.

So, whether the program is of any use to you depends entirely on the way you use your Amstrad. If you're forever getting flummoxed by bugs in your machine code programs, or enjoy hacking mto other peoples, then Sim has an awful lot of plus points!

GOOD NEWS

  • No need to worry about memory clashes
  • Could be invaluable as a debugging aid

BAD NEWS

  • Manual isn't overhelpful
  • Not a beginners' program!

AMSTRAD ACTION (August 1991)

★ PUBLISHER: GOLDMARK SYSTEMS
★ YEAR: 1991
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ TAG: /MISSING/Z80/
★ LICENCE: COMMERCIALE
★ AUTHOR(S): ???
★ PRICE: £19.95 disk only

★ AMSTRAD CPC ★ DOWNLOAD ★

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 » Memedit (Popular Computing Weekly)
» Applications » Defspr - Lispr - Creget (Amstrad Magazine)
» Applications » DDI-1 Firmware: The Complete CPC 464 DISC Operating System ROM Specification
» Applications » Affichag
» Applications » ZMON (CPC Amstrad International)
» Applications » C.A.A.N: Creador de Aventures Aventuras Nova

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