Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Z80 Assembler Questions

by Elgon (Curate)
on Jan 31, 2003 at 14:54 UTC ( [id://231628]=note: print w/replies, xml ) Need Help??


in reply to Re: Z80 Assembler Questions
in thread Z80 Assembler Questions

Thanks Aristotle, I've been trying to see if I could find a specification online to see how instructions are built up from bit fields - I may have found something, in which case I'll go via the parsing and tokenising method, building up each byte from its components. Otherwise I may have to go via the hash route.

Elgon

UPDATE: Unfortunately, the information I was looking for on how opcodes are built up was no good, on the other hand after tokenisation I've worked out how to use a system of hashes-of-hashes to make it a bit simpler.

"What this book tells me is that goose-stepping morons, such as yourself, should read books instead of burning them."
       - Dr. Jones Snr, Indiana Jones and the Last Crusade

Replies are listed 'Best First'.
Re: Re: Re: Z80 Assembler Questions
by dpuu (Chaplain) on Jan 31, 2003 at 18:17 UTC
    I remember the first Z80 assembler I wrote, about 20 years ago. Back then we had very limited resources (on the computer), so were forced to do a fair amount of work on paper.

    The way to identify the construction of the instruction formats is to create a 16x16 grid (for each hex digit in the basic instructions). When you place the instructions on this grid it will become very obvious how the instructions are structured. You'll even see how the designers used a few meaningless instructions (e.g. ld a,a) to find encodings for other instructions (e.g. HALT). Once you've done the basic instructions, overlay the extention opcode tables: you'll find that the IX/IY instructions closely map onto the HL/DE register instructions. You'll also find that you can guess a few "undocumented" instructions in the CB extention set -- there's one empty column, IIRC).

    I've sorry I can't remember more of the details: it was a long time ago, and I'm suddenly feeling old. --Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://231628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found