[A83] Re: tst + tstio instructions


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

[A83] Re: tst + tstio instructions




Ah. Thanks. I'm now waiting for my ID from zilog.

-----Original Message-----
From: Kirk Meyer <kirk.meyer@colorado.edu>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: vrijdag 6 juli 2001 17:54
Subject: [A83] Re: tst + tstio instructions


>
>Hmm, you can get it from www.zilog.com under the techincal support area,
but
>you have to sign up for a support account and give them the name of your
>dog. There's docs on ticalc.org under www.ticalc.org/pub/text/z80 but
>beware, some of them contain errors (mostly in the tstate counts). There
are
>several that list the flags affected by each instruction in a nice format.
>
>-----Original Message-----
>From: assembly-83-bounce@lists.ticalc.org
>[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Ronald Teune
>Sent: Friday, July 06, 2001 9:25 AM
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Re: tst + tstio instructions
>
>
>
>Do you have a specific address of where to get the docs?
>
>>The statements about the P/M flag are mostly correct -- however not all
>>instructions affect the P/M flag. Refer to the Zilog docs to see which do
>>and which don't. Carry isn't always affected either. For example, INC r
and
>>DEC r don't affect the carry, even though there was a carry during the
>>operation. Again, the Zilog docs list how all instructions affect the
>flags.
>>
>>-----Original Message-----
>>From: assembly-83-bounce@lists.ticalc.org
>>[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Tijl Coosemans
>>Sent: Tuesday, July 03, 2001 2:15 PM
>>To: assembly-83@lists.ticalc.org
>>Subject: [A83] Re: tst + tstio instructions
>>
>>
>>
>>The P/M flag has the same value as bit 7 of A. If it's set (negative
>result)
>>then the P/M flag is set, and you test that with M. If it isn't set
>>(positive result) then the P/M flag isn't set (how obvious :-) and you
test
>>that with P.
>>
>>The carry you can see as the 9th bit of A. When A overflows (larger than
>>$FF) then the carry is set. When the result is below 0 then the carry is
>set
>>either. Remember your first math classes. Then you had things like this
>(but
>>now in binary)
>>
>>ca 7 6 5 4 3 2 1 0
>> 0 1 1 1 1 1 1 1 1
>>+  0 0 0 0 0 0 0 1
>>------------------
>> 1 0 0 0 0 0 0 0 0
>>
>>ca 7 6 5 4 3 2 1 0
>> 0 0 0 0 0 0 0 0 0
>>-  0 0 0 0 0 0 0 1
>>------------------
>> 1 1 1 1 1 1 1 1 1
>>
>>You see, the carry is set when a bit has been 'carried' over.
>>
>>In rotations and shifts, the carry has the same value as the bit that was
>>shifted away, carried away.
>>
>>Tijl Coosemans
>>
>>
>>
>
>
>
>