On Tue, 1 Dec 1998, Patriek Lesparre wrote:

> Hi
> 
> The R800 isn't totally Z80 compatible. For instance, the undocumented
> instruction SLL doesn't exist on a R800. It's because R800 is derived from
> Z800 family, not Z80.

The story is right, but SLL doesn't exist also on Z80. There are 4
shift-commands, 3 of which documented. Since binary shifting is the
same as multiplying/dividing, SLA and SRA are called arithmical
shifts. SLA shifts a 0 into bit 0, so a *2 is done. SRA shifts bit 7
into itself, so the sign is not affected. SRL is a logical shift: it
shifts a 0 into bit 7. A logical shift left would be the same as an
arithmical shift, hence the absence of the command. That would leave a
gap in the opcode list, which is filled with the undocumented command
(in a book I have, it is called SLI, shift left illogical). SLI shifts
1 into bit 0. I guess everybody knew about this, but for some reason,
people keep calling the command SLL, which is quite confusing, since
it is definitely not a logical shift.

Bye,
shevek


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to