[A83] Re: Getkey loop


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

[A83] Re: Getkey loop




TI calculators use the Z80180, right?

>As a note, it is a GREAT idea to go over to www.zilog.com and check out the
>actual manual for the Z80 processor. Once you learn the notation they use,
>which isn't too esoteric, it will become a valuable learning tool. It has the
>(almost) complete instruction set, with opcodes, flags set, clock cycles, and
>explanations + more.
>
>The CP instruction can perform two simulated subtraction operations:
>
>A(register) - K(constant)
>or
>A(register) - G(register), where G is an 8-bit register such as B, C, D, or E
>
>The flags are set as follows:
>NC, or there is NO CARRY if A - X >= 0.
>*In this case, X would be equal to or less than A.
>
>C, or there is a CARRY if A - X < 0.
>*In this case, X would be greater than A.
>
>NZ, or the result is NOT ZERO if A does not equal X
>
>Z, or ZERO, if A = X
>
>Essentially, the CP operation is the same as the SUB A,X operation, but it
>doesn't return the result in A.
>
>Hope this helps,
>Tom
>
>p.s. This was all off the top of my head, so if I may have made a minor error
>somewhere...




References: