Hi i am working on remaking 65c02
https://eater.net/datasheets/w65c02s.pdf
And i cant understand the addressing modes and what they do
Can anyone please explain them to me?
What are addressing modes?
Re: What are addressing modes?
Welcome!
Chuck Peddle and his team did a terrific job of explaining them in MOS MCS6500 Family Programming Manual.
A lot of effort went into this and the other manuals -- the story ( here ) is actually somewhat humorous.
-- Jeff
Chuck Peddle and his team did a terrific job of explaining them in MOS MCS6500 Family Programming Manual.
A lot of effort went into this and the other manuals -- the story ( here ) is actually somewhat humorous.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: What are addressing modes?
I may have not explained what i wanted to say well
I mean in addressing modes as for the instructions themselves, not how the CPU addresses the memory
Here are some examples, which i still dont understand, of addressing modes
I mean in addressing modes as for the instructions themselves, not how the CPU addresses the memory
Here are some examples, which i still dont understand, of addressing modes
Re: What are addressing modes?
Hi Radiant
welcome to the forum, and to the 6502!
this is quite a small place, and everyone who is likely to answer one of your queries is likely to be reading every new message. So, please don't start a new thread every time - it will actually help you, and us, to be able to see the continuity as you make your journey.
you have set off on a very ambitious challenge, but yes, it is possible to make a 6502 out of logic, whether in simulation, on breadboard or circuit board, or in FPGA. But it is not easy: there's a lot to do, and some complexity and some subtlety. If you have the energy and enthusiasm and sticking power then it's certainly possible to do it. No-one was born knowing how to build a 6502, but many people have done it, so it's a matter of applying yourself, finding out what you don't know, and then coming to know it.
I would not recommend that you post here with every question which occurs to you. It won't help you learn and it might be counterproductive because it might put off the people who can answer. If you want us to do some work, you will need first to show that you have done some work: that you have looked into the question, found out some things, but still have something puzzling you.
That is, this forum is populated by people, who have some amount of time and energy and interest. People who have in many cases already posted hundreds or even thousands of responses. The forum is not a search engine. But you can search it, and I encourage you to do so.
Good luck with your journey!
welcome to the forum, and to the 6502!
this is quite a small place, and everyone who is likely to answer one of your queries is likely to be reading every new message. So, please don't start a new thread every time - it will actually help you, and us, to be able to see the continuity as you make your journey.
you have set off on a very ambitious challenge, but yes, it is possible to make a 6502 out of logic, whether in simulation, on breadboard or circuit board, or in FPGA. But it is not easy: there's a lot to do, and some complexity and some subtlety. If you have the energy and enthusiasm and sticking power then it's certainly possible to do it. No-one was born knowing how to build a 6502, but many people have done it, so it's a matter of applying yourself, finding out what you don't know, and then coming to know it.
I would not recommend that you post here with every question which occurs to you. It won't help you learn and it might be counterproductive because it might put off the people who can answer. If you want us to do some work, you will need first to show that you have done some work: that you have looked into the question, found out some things, but still have something puzzling you.
That is, this forum is populated by people, who have some amount of time and energy and interest. People who have in many cases already posted hundreds or even thousands of responses. The forum is not a search engine. But you can search it, and I encourage you to do so.
Good luck with your journey!
Re: What are addressing modes?
What's that image you posted, Radiant? Something from WDC doc? I can see how you might be disappointed in that.
So, I guess you need some material that explains the subject in a different way, and/or simply does a better job -- and there's nothing wrong with that. But ask yourself this. Do you think I or some other poster is going to be a better resource for you than a professional author (other than the WDC folk, I mean)? Again I refer you to the MOS Programmning Manual (which is where I learned about address modes, so I know the info is in there).
Another excellent reference is Programming the 65816 Including the 6502, 65C02 and 65802 -- a pdf which I believe is available on the WDC web site.
I see Ed has posted while I was typing, and my message echoes what he said: "If you want us to do some work, you will need first to show that you have done some work."
If you still have a few specific questions after you've done your homework then c'mon back here and we'll try to help.
-- Jeff
So, I guess you need some material that explains the subject in a different way, and/or simply does a better job -- and there's nothing wrong with that. But ask yourself this. Do you think I or some other poster is going to be a better resource for you than a professional author (other than the WDC folk, I mean)? Again I refer you to the MOS Programmning Manual (which is where I learned about address modes, so I know the info is in there).
Another excellent reference is Programming the 65816 Including the 6502, 65C02 and 65802 -- a pdf which I believe is available on the WDC web site.
I see Ed has posted while I was typing, and my message echoes what he said: "If you want us to do some work, you will need first to show that you have done some work."
If you still have a few specific questions after you've done your homework then c'mon back here and we'll try to help.
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: What are addressing modes?
BigEd wrote:
this is quite a small place, and everyone who is likely to answer one of your queries is likely to be reading every new message. So, please don't start a new thread every time - it will actually help you, and us, to be able to see the continuity as you make your journey.
Yes; also, when you continue the same topic, those who have already replied will get an email notifying them that there's an addition to the topic, whereas that won't happen if you start a new one. It's also ok to continue a topic that appears to have been dormant for years, if you have something relevant to say or ask about it. Keep related stuff together, for less forum clutter and to make it clear what things tie together.
About addressing modes:
- Think of immediate like "Here, take this," and the person hands it to you. Example: LDA #$41
- Think of direct as "Go ask Bill for the file." IOW, it tells you where to get it. Example: LDA $43A (with no "#")
- Think of indirect ask "Go ask Bill where to find that resource." IOW, Bill doesn't have it, but he can tell you where to get it. Example: LDA ($6B)
- Think of indexing like adding to an address, either with or without indirection, to get the final effective address. If with indirection, it can be before or after the indirection. Imagine you're a new employee, and you've met some of the others but don't know all of them yet. Let's say you know where Bill's cubicle is, and someone tells you, "Take this to Lori. She's in the third cubicle after Bill's." The specified address is "Bill's cubicle," and the index register contains a 3, so now you know where to go. Example: LDA $3A60,X
- Implied just means the location or target doesn't need to be specified (like SEI, which is the SEt Interrupt-disable bit instruction), or the mnemonic itself tells (like DEX, the DEcrement X), or the processor can get the information off the stack (like RTS, the ReTurn-from-Subroutine instruction), or from the stack pointer (like PLA, the PulL Accumulator instruction which knows where from the stack-pointer register)
- Absolute means the supplied address is 16-bit. It does not necessarily mean there won't be indirection involved.
- Instructions referring to ZP (zero page, ie, addresses from 0000 to $00FF) save memory and execution time by not having to specify or load an address high byte, because it is assumed to be 00. ZP instructions offer indirect indexed and indexed indirect combinations that are not available in absolute addressing. Examples: LDA ($4E),Y and LDA ($4E,X)
It's possible to do doubly and triply indirect addressing, but we'll leave it for later as it's more advanced. Hopefully I remembered all the main ones.
Most addresses in the code should be given names that are meaningful to humans. The assembler will substitute-in the numerical addresses. This is true for many constants, too. There should be very few numbers showing up in your programming. I just put number above to emphasize that they are actual addresses, even though in most cases I would have names for them in my code, since "$4E" for example doesn't tell you what $4E is used for.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: What are addressing modes?
GARTHWILSON wrote:
Yes; also, when you continue the same topic, those who have already replied will get an email notifying them that there's an addition to the topic, whereas that won't happen if you start a new one.
That has never happened for me unless I check the Notify me when a reply is posted box when I post something. It doesn't appear to be an automatic feature of the forum software.
x86? We ain't got no x86. We don't NEED no stinking x86!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: What are addressing modes?
BigDumbDinosaur wrote:
That has never happened for me unless I check the Notify me when a reply is posted box when I post something. It doesn't appear to be an automatic feature of the forum software.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
-
ThePhysicist
- Posts: 60
- Joined: 17 Jun 2020
Re: What are addressing modes?
this page can help you probably better than any explanation I can come up with: http://skilldrick.github.io/easy6502/#addressing
No simulation survives contact with reality!