This isnt actually for programming in assembly at all. I want to write an emulator for this CPU and i have little experience in ASM. DONT SHOOT ME! I know I should have the experience but I figure I would learn the ASM as I go through it.
http://www.zophar.net/tech/files/z80opcod.txt
Is a good list of opcodes for the cpu and their mnemonics, but I don't know what each does exactly. I am pretty sure I have a pretty good of how everything works with register sand addresses but I don't know what each opcode does.
I am not asking for someone to go through the list of opcodes and and type in what each does, I want some general help. Also a link to a good guide which i imagine is out there seeing as how I have seen some of the same mnemonics for other cpu's.
Why are there 30 opcodes for almost the same mnemonic?
Someone could start off by explaining this statement to me.
LD (BC),A
Im assuming LD is the actual opcode, and BC is a byte and A is an address, but i have no idea!
The same site where you got that has some nice things, including a ZIP file with a Word document about fourth from the top:
http://www.zophar.net/tech/z80.html
If you're not familiar with assembly, the reason for having 30 different opcodes varies. Generally speaking, they are there for different memory addressing modes, or for different register placement.
Quote from: Atom on December 02, 2004, 11:23 AM
This isnt actually for programming in assembly at all. I want to write an emulator for this CPU and i have little experience in ASM. DONT SHOOT ME!
On a sidenote, I was involved in hiring students for the next work term at my job. Two of them mentioned "z80" assembly on their resumes, which intrigued me. It's something that stands out, since not many people know about it.
Good job trying to broaden your horizons :)
Quote from: Atom on December 02, 2004, 11:23 AM
LD (BC),A
Im assuming LD is the actual opcode, and BC is a byte and A is an address, but i have no idea!
I'll assume it means "*BC = A;" in C-style code. It's probably storing a word, unless A is some special register with non-standard size for the cpu.
Quote from: Atom on December 02, 2004, 11:23 AM
Why are there 30 opcodes for almost the same mnemonic?
That's probably because they're only
almost the same? How would the processor know which of the things you wanted it to do if there was no difference in how you told it to do it?
Thanks for your help so far guys, I appreciate it.
As I stare at these documents and they bring more meaning, I am perfecting the way I am emulating the memory addresses (low endian).That part is pretty simple. Thanks.
Ok, i found probably the best documentation out there that explains everything to death and the deepest depth. www.z80.info (http://www.z80.info)
Thought i would share it if anyone else needs z80 stuff.
BTW iago: knowledge of z80 asm translates into "was a slacker during geometry and programmed TI series calculator" :P
(TI-8*'s and TI-9*'s are z80-based.)
exactly. And i now have to repeat college alg and trig. This project has been dropped.
Quote from: Stwong on December 21, 2004, 02:21 PM
BTW iago: knowledge of z80 asm translates into "was a slacker during geometry and programmed TI series calculator" :P
(TI-8*'s and TI-9*'s are z80-based.)
Actually only some of the TI-8*s are z80 based, but the 89 operates on a Motorola 68k cpu. If what you want to do is just test the assembly commands on this CPU, you could always use the emulator of TI calcs.
Good job responding to someone who revived a 5 month old thread even though they had something useful to add to the topic and there has not been a noticeable pattern of the specific person reviving topics. Thanks for being a wannabe moderator and offering advice that no one wants to hear when you have no common sense.
Thanks.
Quote from: iago on December 02, 2004, 12:09 PM
Quote from: Atom on December 02, 2004, 11:23 AM
This isnt actually for programming in assembly at all. I want to write an emulator for this CPU and i have little experience in ASM. DONT SHOOT ME!
On a sidenote, I was involved in hiring students for the next work term at my job. Two of them mentioned "z80" assembly on their resumes, which intrigued me. It's something that stands out, since not many people know about it.
Good job trying to broaden your horizons :)
My Computer Science teacher actually said to keep that off all resumes because 'z80 knowlege' means 'I got bored in class and poked around my graphing calculater'.
He seriously said that? Because z80 development is more than just calculators. And you can't even prorgram z80 in class <_<
Eh...that's what he said. All of the people who would bother with z80 "take notes" in class with a laptop.
http://www.insanedev.net/tks/tuts/index.php?dir=&file=win32asm%20tutorial.chm
That's a decent reference I use a lot, although some of his wording make a few instructions seem incorrect.
That would be good, if it was about z80 Assembly...