Re: LZ: flags


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

Re: LZ: flags



I can only offer a small suggestion.  I don't have my list of
Z80 opcodes with me at work and I'm very rusty on the z80.


in   set b,a  b is not a variable, it's a register.  Thats an
important distinction and you should understand the difference.
A variable is a name thats an alias for an address in memory.


If the z80 has an opcode for set b,a you can do it.  If it
doesn't you cant.  You should have a list of z80 opcodes and
mnemonics handy to find out if this is something the z80 can
do.   Questions like this become real simple with a list like
that.  Most z80 books have a list of instructions and there
are several on the net.


Someone else may be able to tell you the answer to your question
but you still need that list.


Also, rotating isnt much more complicated than bit setting.
And it's a really useful capability that can do things that
cant be done by just setting bits.


Barry




On Wed, 24 Jul 1996, David Kristensen wrote:


> Is there a way to work with bits using variables. For instance, instead of
> doing this:
>         set 0, a
>         set 1, a
>         set 2, a
> ...etc, could I do this:
>         ld b, 0
> Loop:   set b, a
>         inc b
>         (check to see if b is > 2)
>         jr Loop
> If there is a way or any other way to do this, could anyone help me. (It
> should also apply to set, res, and bit). I guess the best way would be to
> set a bit, then rotate it, but this creates problems of its own and I am not
> as familiar with rotating bits as I am setting or checking them.
> 
> David Kristensen at the University of Missouri - Kansas City
> dkristensen@cctr.umkc.edu
> 
> The Mind conquers All...
> 
> 


References: