Processor addressing modes

Associate
Joined
14 Dec 2002
Posts
2,437
Hey guys,

I know this isn't software as such, but I thought it would the best subforum to ask - any help would be much appreciated. I need to select a small microprocessor to copy a programme from ROM to RAM and then execute it - the programme will read from an input port, then use the data to index in to an array of constant values and then write the data retrieved from the array to an output port.

Does anyone know which addressing modes would be needed to do this? I've been reading a lot with regards to the different types of addressing modes but I'm still not confident which modes I will need. I know I'm going to need some kind of indexing addressing mode to handle the array but I'm not sure which one?


Thanks for any help.
 
The two microprocessors I have been considering are the Z80 and the 6502 (narrowed down from a list of four that I can use).

The input/output data is 8 bits wide and the addresses are 16 bits wide.


After lots of Googling, I'm thinking:

To jump – Immediate Addressing
To copy ROM to RAM - Direct Addressing
Reading from Input Port - Direct Addressing
Index into array of constant values - Index addressing
Write the data retrieved from the array to an output port - Register indirect addressing

I've done quite a bit of high level programming before but I've rarely worked with assembler so as you can imagine, I'm struggling with this quite a bit...!

Cheers guys.
 
I used to code for the 65C02 in assembler :) It's not really a nice chip for 16bit addressing.. actually I don't think it can do 16bit without doing hardware paging.. but last time I touched it was about 20+ years ago..

If you can - have a look at thumb ARM (very easy assembler, far better than any out there). Also Blackfin 5xx series is worth a look although the assembler is a nightmare.
 
Back
Top Bottom