APPLICATIONSPROGRAMMATION ★ DISASSEMBLER ★

Z80 Disassembler (Practical Computing)Applications 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 ★ 

WRITTEN IN Locomotive Basic for the Amstrad CPC-464, this program by Stephen Devine provides rapid disassembly of machine-code programs in a comprehensive and easily readable format. Output can be directed to the screen or printer and all addresses can be in either hex or decimal as required.

The program uses a very efficient algorithm to interpret each instruction. It involves splitting each byte into various segments, and examining the resultant bit patterns to determine the appropriate part of the mnemonic. The individual segments are then reconstructed to form a complete mnemonic, and any special symbols are replaced with their equivalents, which may be absolute addresses or special registers such as IX and IY.

The final mnemonic is then printed out, along with its associated bytes in both hex and ASCII, and the next instruction is then processed in exactly the same way. This method results in very fast disassembly, with speeds of up to three lines per second. In order to disassemble the ROM the program includes a short machine-code routine which accesses the Basic ROM to fetch the required bytes, which it then stores in an array for subsequent processing by the Basic program.

When the program is run it first fills a string array with the data required during disassembly, and sets up the machine-code program in an integer array. It then prompts for the address from which you wish to begin disassembling, and this can be given in either hex or decimal.

A value preceded by a & is interpreted as a hexadecimal address. All addresses produced by the program are given in hex, except for any offsets to index registers, which will always be given in decimal. All addresses below &C000 are taken as being in RAM, while those above refer to the Basic ROM. You are asked to enter an end address for the disassembly, which must be greater than the start address. Pressing Enter alone will set the end address to &FFFF.

Enter y to the next prompt if you wish the output to be sent to the printer, or press n or Enter to direct output to the screen. The program cannot determine whether or not you have a printer connected, so use this option with care. If you get stuck, just press Esc twice and start again.

Disassembly will now begin. Each line contains: the address, in hex or decimal, of the current instruction; the bytes, in hex, of the code stored there; the instruction itself in standard Zilog mnemonics, and the ASCII equivalent of the bytes themselves. This last feature is useful when disassembling areas of text, but note that control codes and graphics characters are printed as a symbol. Any invalid code is taken to be data and is displayed using the word Data. This also applies to the data bytes which follow some restart instructions.

The listing can be halted at any time by pressing the space bar and continued by pressing any key. When the listing is complete you will be prompted for new start and end addresses as before. To break out of the program press Esc twice.

Although formatted for 40 columns, the program can also be run in mode 2 by changing the value in line 10. The display colours can also be changed to suit the user by altering the Ink statements in the same line.

Practical Computing

★ PUBLISHER: Practical Computing
★ YEARS: 1986 , 1984
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ AUTHOR: Stephen DEVINE
 



★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» Z-80  Disassembler    (Practical  Computing)    LISTING    ENGLISHDATE: 2024-12-03
DL: 161
TYPE: PDF
SiZE: 662Ko
NOTE: 3 pages/PDFlib v1.6

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

Lien(s):
» Applications » Bitbuster Z80
» Applications » Bitbuster Extreme Z80
» Applications » Lerm Software - Z80 Toolkit 2
» Applications » Assembleur Z80 pour CPC
» Applications » DZ80 Makroassembler
» Applications » Antisoft Z80 Assembler
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 401 millisecondes et consultée 507 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.