#: 17904 S12/OS9/68000 (OSK)
13-Apr-93 17:27:15
Sb: #17894-MM/1 disasm
Fm: ole hansen 100016,3417
To: Bob van der Poel 76510,2203 (X)
Hello Bob
The reason why you use 'odd'-addresses and not 'even'addresses is the way the
68000 cpu is connected to the DATA-BUS. If you use move.w $10000,d0, bit d15-d8
will be read from $10000 and d7-d0 will be read from $10001, so if you only
read a byte from an I/O-chip like MC68901, which is an 8-bit device, you need
to access it via 'odd'-addresses, otherwise you are likely to get an
'error-102' or 'garbage'. If you need to access several register in 'one go',
you can use the MOVEP.L instruction. It will read/write 4-bytes on every
second-address from base-address. Example:
MOVEP.L d0,$ffa001 will write 1 byte at $ffa001 and 1 at $ffa003 and 1 at
$ffa005 and one at $ffa007.
regards ole@danelec.dk
|