Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Another 68k question Reply to this message
Posted byRiff
Posted on08/14/04 05:55 PM



> Maybe this is a really dumb question so please bear with me :-)
> With the "MOVE EA,EA" opcode, the documentation says the N and Z flags are
> affected by the result.
> So what is the result here? The destination?
> And if the size is byte or word, are the flags then affected by the sign
> extended result?

Unless specified otherwise, flags are based on the value that gets written back to the destination. In this case, the value written back is the unmodified memory contents. This rule of thumb also applies to the size of the result as well. If you add to an 8-bit sub-register, the result is 8-bit and the carry and overflow flags are set according to the 8-bit intermediate results.

On the Nuon, bytes and words can be loaded, but not stored. A byte or word load will place the contents into the upper bits of a 32-bit register and zero out the lower bits. Addition is always 32 bit. It wouldn't surprise me if the 68K and other architectures use a similar internal shift mechanism allow all operations to be done using a single ALU using maximum operand bit length.


-
Entire Thread
Subject  Posted byPosted On
*Another 68k question  erikduijs08/14/04 01:59 PM
.*yay, my 68k is coming to life! :-D  erikduijs09/03/04 04:30 PM
.*Re: Another 68k question  Jan_Klaassen08/15/04 11:29 PM
..Re: Another 68k question  Riff08/14/04 05:55 PM
..*Re: Another 68k question  erikduijs08/14/04 10:49 PM