C's
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
Address regs can't contain odd values? Can't you say
lea 13,a0
move.b (a0),d0
13 is odd.
I thought the low bit goes out the 68000 and controls the upper/lower data
strobe line to the memory signifying that it wants only the least or most
significant byte of a certain word, so for practical purposes, even though
you only _really_ have address lines a1-a23 you get an effective a0 address
line, the data strobe.
I was casting it as pointer to int. Now I know that ints must be aligned on
word boundaries, but I had to get to an int that may or may not have been,
and I had a choice, leave it as pointer to char and have the compiler
complain about different types of objects being assigned, or change it to
pointer to int, and have my own C code that would avoid a bus error by
checking for an odd address myself and if odd moving the int one byte at a
time.
I couldn't win in this situation, and what I did does work on other systems,
like I told them. As for the printf, &x is a machine address, how can it
only be one word (16 bits)? I looked at assembler code produced on my Wicat
for that and it does a: pea _x pea pushes 32 bits onto the stack. I just
thought it was strange whatever it is that Lattice is doing. Sorry to hear
about the pre-demise of another 68000 magazine idea. Maybe its a conspiracy
by IBM? Gary