A92: Re: Stupid question


[Prev][Next][Index][Thread]

A92: Re: Stupid question




well, your question is ont THAT stupid.
in fact, your pb is one of the conceptors of the 68000 processor.
In that time, it was difficult to integrate many things and they wanted an adreesable space of 16MB of RAM. 
This could be achieved only by an adress bus of 14 bits. Adresses had to be coded on 14 bits.
The pb is that building a 14 bit 
adress bus was difficult in that time.
So, they decided that they would use an other unit than the byte: the Word.
this means that you can only access words in memory. When you want to read a byte, you need to read
2bytes.
Electronicians will see this as directly connecting the lowest bit of t
As they never had to use byte reads in memory, all the adresses generated and used by the processor
had to be coded on at least word or, better, longwords...
That is why they never implemented the arithmetic operations on one byte on the adress registers.
if you wish to do one nonetheless, you will need to:
move.l a0,d0
add.b #1,d0
move.l d0,a0
this will work . However, i would not suggest doing so because the byte addition may not generate the right adress on a longword: if there is #$000000FF in a0, adding one on a byte will do:
#$00000000 while adding it on a word or logword will do: #$00000100....

hope this will help :)
best regards, mathieu