306
=L/2*:RUOGZLGH+HDGTXDUWHUV 5DFH6WUHHW 6DQ-RVH&$ 7HOHSKRQH )D[ ZZZ=L/2*FRP User Manual Z80 Family CPU User Manual 80

Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������ �� ������ � � ������� ��� � � ������� ���� �!�"#�$��% &'�� (�$)*+��*+*�)) � ,�-(�$)*+��*+*�)) � ���+�����+��.

User Manual

Z80 Family

CPU User Manual

/0))*))�#)�)�

Page 2: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������� �� �

/0))*))�#)�)�

This publication is subject to replacement by a later edition. To determine whether a later edition exists, or to request copies of publications, contact:

ZiLOG Worldwide Headquarters910 E. Hamilton Avenue Campbell, CA 95008Telephone: 408.558.8500Fax: 408.558.8300www.ZiLOG.com

Document Disclaimer

ZiLOG is a registered trademark of ZiLOG Inc. in the United States and in other countries. All other products and/or service names mentioned herein may be trademarks of the companies with which they are associated.

©2001 by ZiLOG, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZiLOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZiLOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. Except with the express written approval of ZiLOG, use of information, devices, or technology as critical components of life support systems is not authorized. No licenses are conveyed, implicitly or otherwise, by this document under any intellectual property rights.

Page 3: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������� �� �

���

Table of Contents

���������������������������������������������������������������������������������������������������� �

������������������������������������������������������������������������������������������������������ ���������������������������������������������������������������������������������������������������������������������������� �������������������������������������������������������

�� ���������� �������� ���������������������������������������������������������������������������������������������������������!������� ��������������������������������������������������������������������������������������������"

���� � ��������� ��������������������������������������������������������������������������������������������������##���������!���� �������������������������������������������������������������������������������������# $����%���������&���� ��������������������������������������������������������������������������#'��(�������(���%��������������������������������������������������������������������������������#)*����+��,��-�� �������%���������������������������������������������������������������#�������(���+��,��-�� �������%�������������������������������������������������������#�.��/$�-�0���������(���(���� ���������������������������������������������������������#"1��2�34�� ����������������������������������������������������������������������������������������������#5�� ��/6� ����-�� �������%���� ���������������������������������������������������������#7�� ��/6� ����������%���� ������������������������������������������������������������������� 8

� ������������ ����������� �������������������������������������������������������������������������������������������������� ������(�3��0��,6��0��� ������������������������������������������������������������������������� ������(���� ���������������������������������������������������������������������������������������� )

��������� ������������������ ����� ��������� ������������������� ��

$�������9%��������������������������������������������������������������������������������������� "���������$� ������������������������������������������������������������������������������������������ 7$����%�9(��������������������������������������������������������������������������������������'8

/0))*))�#)�)� %�1 ��2����� ���

Page 4: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������� �� �

��

����:������6%������$������� ������������������������������������������������������������� '#

����������� ��� ����� !"��� �� ##

������� ��:�9�: ����!�������������������������������������������������������������������� ''

34��(����:�9(���:���;58���������� �������������������������������������������������� ')

34��(����:�������������2�-� ���������������������������������������������������������� '"

������ �� ���!"��� �#��"������ ��������������������������������������$

������� � ������������������������������������������������������������������������������������������������ )#

���������2%(�������������������������������������������������������������������������������������� )#

���������$�������������������������������������������������������������������������������������� ))

����������(������������������������������������������������������������������������������������ )5

����� ���!"��� ���� ��������������������������������������������������������������%

;58����0�%���������������������������������������������������������������������������������� "�

;58�9������������!�������������������������������������������������������������������������� "�

���,9�0����!���� ���������������������������������������������������������������������������������� ""

;58����������6����(���� ������������������������������������������������������������������� 58

5/*�������<���(� ����������������������������������������������������������������������������������� 5#

#�/*�������<���(� ������������������������������������������������������������������������������� #8

34������=�*���-�2���:��=�����9������<���(� ������������������������������������� #

5/*�����������<���(� ������������������������������������������������������������������������ #)8

<������/���(���������������������������<���(� ����������������������� #��

#�/*�����������<���(� ���������������������������������������������������������������������� #"7

���������9��:�<���(�������������������������������������������������������������������������� #78

*��9�=����=�����2��<���(� ������������������������������������������������������������� )

>��(�<���(� ������������������������������������������������������������������������������������������ '5

���������������<���(� ������������������������������������������������������������������������ ��

��(��������(��<���(� ����������������������������������������������������������������������� �7

%�1 ��2����� ��� /0))*))�#)�)�

Page 5: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

List of Instructions

�6���=�� ����������������������������������������������������������������������������������������������#)��6��1�=�� ������������������������������������������������������������������������������������������#58�66��=��1�������������������������������������������������������������������������������������������#)'�66��=���?�@���������������������������������������������������������������������������������������#))�66��=���A�@���������������������������������������������������������������������������������������#)��66��=�������������������������������������������������������������������������������������������������#) �66��=��� ����������������������������������������������������������������������������������������������#)8�66�1�=�� ������������������������������������������������������������������������������������������#"7�66��?=�((� ������������������������������������������������������������������������������������������#5 �66��A=������������������������������������������������������������������������������������������������#5'�.6�� ���������������������������������������������������������������������������������������������������#� *�2�0=��1��� ������������������������������������������������������������������������������������������� �*�2�0=���?@������������������������������������������������������������������������������������������� 5*�2�0=���A@������������������������������������������������������������������������������������������� '8*�2�0=����������������������������������������������������������������������������������������������������� )�������=���� ����������������������������������������������������������������������������������������� �"�������� ����������������������������������������������������������������������������������������������� ����!��������������������������������������������������������������������������������������������������������#"8���� �������������������������������������������������������������������������������������������������������#�5��6��������������������������������������������������������������������������������������������������������#'"��6������������������������������������������������������������������������������������������������������#'5���� ��������������������������������������������������������������������������������������������������������#')����� �����������������������������������������������������������������������������������������������������#'����� �������������������������������������������������������������������������������������������������������#�56���������������������������������������������������������������������������������������������������������#��63���?� �������������������������������������������������������������������������������������������������#5563���A� �������������������������������������������������������������������������������������������������#5763���� ��������������������������������������������������������������������������������������������������#�)63��� ��������������������������������������������������������������������������������������������������#5"6�� ����������������������������������������������������������������������������������������������������������#")6>.;=���������������������������������������������������������������������������������������������������� �'

/0))*))�#)�)� ������2�3����������

Page 6: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

3�� ���������������������������������������������������������������������������������������������������������� #"�3?��9��=�1�� ����������������������������������������������������������������������������������������� # �3?��9��=��?� ������������������������������������������������������������������������������������������ # �3?��9��=��A� ������������������������������������������������������������������������������������������ # "3?��!=��!B�������������������������������������������������������������������������������������������� # '3?�63=�1��������������������������������������������������������������������������������������������� # 3??������������������������������������������������������������������������������������������������������� # )1��2� ��������������������������������������������������������������������������������������������������� #"'�$�8� ������������������������������������������������������������������������������������������������������ #"��$�#� ������������������������������������������������������������������������������������������������������ #""�$� � ������������������������������������������������������������������������������������������������������ #"5�.��=����� ����������������������������������������������������������������������������������������������� �7�.������� ������������������������������������������������������������������������������������������������� "8�.���1��� ���������������������������������������������������������������������������������������������� #�#�.����?@��� ������������������������������������������������������������������������������������������� #� �.����A@��� ������������������������������������������������������������������������������������������� #�'�.���?��������������������������������������������������������������������������������������������������� #5��.���A��������������������������������������������������������������������������������������������������� #5��.��������������������������������������������������������������������������������������������������������� #�8�.��� ��������������������������������������������������������������������������������������������������� #5)�.6�������������������������������������������������������������������������������������������������������� "��.6�� ���������������������������������������������������������������������������������������������������� ""�.�� �������������������������������������������������������������������������������������������������������� " �.��������������������������������������������������������������������������������������������������������� "'>���1��� ������������������������������������������������������������������������������������������������� �8>����?�� �������������������������������������������������������������������������������������������������� �#>����A�� �������������������������������������������������������������������������������������������������� � >����=���������������������������������������������������������������������������������������������������� '7>����� ����������������������������������������������������������������������������������������������������� '5>��.�=��� ����������������������������������������������������������������������������������������������� ))>���=��� �������������������������������������������������������������������������������������������������� ) >���� ������������������������������������������������������������������������������������������������������� )#>��.;=��������������������������������������������������������������������������������������������������� )5>��;=��� �������������������������������������������������������������������������������������������������� )�

������2�3���������� /0))*))�#)�)�

Page 7: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�6��*��=��� ���������������������������������������������������������������������������������������������7��6��63�=��� ���������������������������������������������������������������������������������������������7��6��1��=��� ����������������������������������������������������������������������������������������������57�6��1��=��������������������������������������������������������������������������������������������������5��6���?@��=��� �������������������������������������������������������������������������������������������78�6���?@��=�����������������������������������������������������������������������������������������������5"�6���A@��=��� �������������������������������������������������������������������������������������������7#�6���A@��=�����������������������������������������������������������������������������������������������55�6�����=��� ����������������������������������������������������������������������������������������������7"�6�����=���� �������������������������������������������������������������������������������������������##8�6�����=�1�� ������������������������������������������������������������������������������������������#87�6�����=��?� �������������������������������������������������������������������������������������������###�6�����=��A� �������������������������������������������������������������������������������������������## �6��=��*��� ���������������������������������������������������������������������������������������������7 �6��=��63�� ���������������������������������������������������������������������������������������������7'�6��=������ ����������������������������������������������������������������������������������������������7)�6��=�������������������������������������������������������������������������������������������������������75�6��=��� ��������������������������������������������������������������������������������������������������77�6���=������ �������������������������������������������������������������������������������������������#8��6���=���� ����������������������������������������������������������������������������������������������#8 �6�1�=������ ������������������������������������������������������������������������������������������#8��6��=�����������������������������������������������������������������������������������������������������#88�6��?=������ �������������������������������������������������������������������������������������������#8"�6��?=��������������������������������������������������������������������������������������������������#8'�6��A=������ �������������������������������������������������������������������������������������������#85�6��A=��������������������������������������������������������������������������������������������������#8)�6��=��1��������������������������������������������������������������������������������������������������5'�6��=���?@�����������������������������������������������������������������������������������������������5)�6��=���A@�����������������������������������������������������������������������������������������������5��6��=��� ������������������������������������������������������������������������������������������������#8#�6��=��B������������������������������������������������������������������������������������������������������5#�6��=��������������������������������������������������������������������������������������������������������5 �6�9�=�1�� ��������������������������������������������������������������������������������������������##'�6�9�=��?� ���������������������������������������������������������������������������������������������##)

/0))*))�#)�)� ������2�3����������

Page 8: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

����

�6�9�=��A� ��������������������������������������������������������������������������������������������� ##��66������������������������������������������������������������������������������������������������������� #'#�66�� ��������������������������������������������������������������������������������������������������� #' �6�� ������������������������������������������������������������������������������������������������������� # 5�6�������������������������������������������������������������������������������������������������������� # 7.3<������������������������������������������������������������������������������������������������������� #�7.��������������������������������������������������������������������������������������������������������� #" ���������������������������������������������������������������������������������������������������������� #�)�26�� ��������������������������������������������������������������������������������������������������� 5��2�������������������������������������������������������������������������������������������������������� 5'��2����=��� �������������������������������������������������������������������������������������������� 58��2����=��� ������������������������������������������������������������������������������������������� "7��26���������������������������������������������������������������������������������������������������� 5���2�� ���������������������������������������������������������������������������������������������������� 5 �����?� ������������������������������������������������������������������������������������������������� # 8�����A� ������������������������������������������������������������������������������������������������� # #����++��������������������������������������������������������������������������������������������������� ##7��91��?� ���������������������������������������������������������������������������������������������� ##"��91��A� ���������������������������������������������������������������������������������������������� ##5��91�++������������������������������������������������������������������������������������������������ ##��39�0=��� ���������������������������������������������������������������������������������������������� '��32� ������������������������������������������������������������������������������������������������������ �8�32������������������������������������������������������������������������������������������������������ �#�32�� ����������������������������������������������������������������������������������������������������� �'�32.� ��������������������������������������������������������������������������������������������������� ������������������������������������������������������������������������������������������������������������ 8 ���������������������������������������������������������������������������������������������������������� #7#�����1��� ��������������������������������������������������������������������������������������������� #7�������?@��� ������������������������������������������������������������������������������������������ #75������A@��� ������������������������������������������������������������������������������������������ 88���������������������������������������������������������������������������������������������������������� #7)����� ��������������������������������������������������������������������������������������������������� #78��6������������������������������������������������������������������������������������������������������� 8����� ���������������������������������������������������������������������������������������������������� 85

������2�3���������� /0))*))�#)�)�

Page 9: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

���� ������������������������������������������������������������������������������������������������������#7'������ �������������������������������������������������������������������������������������������������� 8������ ���������������������������������������������������������������������������������������������������#7 ��6� ������������������������������������������������������������������������������������������������������ �92�(� ���������������������������������������������������������������������������������������������������� �"9*���=�� �����������������������������������������������������������������������������������������������#�89*��1�=�� �������������������������������������������������������������������������������������������#5#9�!� �������������������������������������������������������������������������������������������������������#"#932�0=��1��� ������������������������������������������������������������������������������������������ ''932�0=���?@��� ��������������������������������������������������������������������������������������� ')932�0=���A@��� ��������������������������������������������������������������������������������������� '�932�0=��� ������������������������������������������������������������������������������������������������� ' 9�������������������������������������������������������������������������������������������������������� ##9����� �������������������������������������������������������������������������������������������������� #)9�������������������������������������������������������������������������������������������������������� #"9�*�� ����������������������������������������������������������������������������������������������������#)5?���� ���������������������������������������������������������������������������������������������������#��

/0))*))�#)�)� ������2�3����������

Page 10: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

������2�3���������� /0))*))�#)�)�

Page 11: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

List of Figures

!������#��;58�����*���-�6������� ���������������������������������������������������������� !������ ��;58���������������:��������� ����������������������������������������������'!������'��;58��,���������:��������� ��������������������������������������������������������"!������)��*��������2������34��(��� ���������������������������������������������������# !�������������������(������!���� ������������������������������������������������������#'!���������$����%���������&�����%���� �������������������������������������������������#)!������"����(�������(���%���� ������������������������������������������������������������#�!������5��*����+��,��-�� �������%���� �������������������������������������������#�!������7��������(���+��,��-�� �������%���� �����������������������������������#"!������#8��.��/$�-�0���������(���+����(������� �������������������������#5!������##��1��2�34�������������������������������������������������������������������������������#7!������# ���� ��/6� ����-�� ������ ��������������������������������������������������#7!������#'���� ��/6� ����������%����.���#� ���������������������������������������� 8!������#)���� ��/6� ����������%����.��� � ���������������������������������������� 8!������#����� ��/6� ����������%����.���'� ���������������������������������������� #!������#���$���� �������(���(����$���� ����������������������������������������� �!������#"��$�������;58����(����9%��������������������������������������������� 5!������#5����$�������$���(����������������������������������������������������� 7!������#7�������������&���9��������$#��%������������������������������������'8!������ 8�������������&���9�������%�$����%��%���� ��������������������'#!������ #������:������6%��������$� ��������������������������������������������������' !������ ��9��:�����:�*�6�6���,*%�� �����������������������������������������������'�

/0))*))�#)�)� ������2�,�4� �

Page 12: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

������2�,�4� � /0))*))�#)�)�

Page 13: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

����

List of Tables

2�0���#��������(�3��0��,6��0��=�!��(/!��(� ���������������������������������������� )2�0��� ��*�00��������� ��������������������������������������������������������������������������'"2�0���'��$���(�%������� ������������������������������������������������������������������������'72�0���)��1�4=�*����%=�6�����������������2�0�������������������������������������)72�0������5/*�������<���(��6� ����������������������������������������������������������������#2�0������#�/*�������<���(��6=���91��������� ������������������������������������2�0���"��34�������3?�����3??��������������������������������������������������������������2�0���5��*���-�2���:���<���(� ����������������������������������������������������������������52�0���7��*���-�9������<���(��������������������������������������������������������������������52�0���#8��5/*���������������������������������������������������������������������������82�0���##��<������/���(����!��(������� �����������������������������������������������#2�0���# ��#�/*�������������������������������������������������������������������������������� 2�0���#'�����������9��:� ��������������������������������������������������������������������'2�0���#)��*��$���(�������<���(�������������������������������������������������������������2�0���#���>��(=�����=�����������<���(� �������������������������������������������������72�0���#��������<���(���������������������������������������������������������������������������"82�0���#"����(��<���(������������������������������������������������������������������������������" 2�0���#5��5/*��������������������������������������������������������������������������"'2�0���#7��$���������������������� ���������������������������������������������������"'

/0))*))�#)�)� ������2�%�1 �

Page 14: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

������2�%�1 � /0))*))�#)�)�

Page 15: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������� �� �

��

����������� ��

This user manual describes the architecture and instruction set of the Z80 CPU.

������������ �� �

ZiLOG recommends that the user read and understand everything in this manual before setting up and using the product. However, we recognize that users have different styles of learning: some will want to set up and use their new evaluation kit while they read about it; others will open these pages only to check on a particular specification. Therefore, we have designed this manual to be used either as a how to procedural manual or a reference guide to important data.

�������������

This document is written for ZiLOG customers who are experienced at working with microprocessors or in writing assembly code or compilers.

� �� ���� ��� ����

The Z80 CPU User’s Manual is divided into four chapters.

����

Presents an overview of the User’s Manual Architecture, Pin descriptions, timing and Interrupt Response.

! � � ���"�#� ��$%�$�� ����

Presents examples of the User’s Manual hardware and software.

/0))*))�#)�)� 0������15 ���6 �

Page 16: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������ �� ��������

���

�������������������&���%����

Presents the User’s Manual instruction types, addressing modes and instruction Op Codes.

���������������"�

Presents an overview of the User’s Manual assenbly language, status indicator flags and the Z80 instructions.

'� ���&���$���

� �� ������������

The following assumptions and conventions are adopted to provide clarity and ease of use:

����#����(������� �������

The words set and clear imply that a register bit or a condition contains the values logical 1 and logical 0, respectively. When either of these terms is followed by a number, the word logical may not be included, but it is implied.

)�� �����#��*���� ���"�$�� �'�����

A field of bits within a register is designated as: Register (n–n). For example: PWM_CR (31–20). A field of bits within a bus is designated as: Busn–n. For example: PCntl7–4. A range of similar (whole) registers is designated as: Registern–Registern. For example: OPBCS5–OPBCS0.

Part Number Title DC number

Part Number Title DC number

Part Number Title DC number

/0))*))�#)�)� 0������15 ���6 �

Page 17: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������������� �� �

����

����#�����$������ ������

In this document, the terms LSB and MSB, when appearing in upper case, mean least significant byte and most significant byte, respectively. The lowercase forms, msb and lsb, mean least significant bit and most significant bit, respectively.

�����+���

Commands, code lines and fragments, register (and other) mnemonics, values, equations, and various executable items are distinguished from general text by the use of the Courier font. This convention is not used within tables. For example: The STP bit in the CNTR register must be 1. Where the use of the font is not possible, as in the Index, the name of the entity is presented in upper case.

!� ���$ ��, ����&���� ����-�!

Hexadecimal values are designated by a uppercase H and appear in the Courier typeface. For example: STAT is set to F8H.

����#������%%� ��.���

The use of all uppercase letters designates the names of states and commands. For example: The receiver can force the SCL line to Low to force the transmitter into a WAIT state. The bus is considered BUSY after the Start condition. A START command triggers the processing of the initialization sequence.

����#������ ���%%� ��.���

Initial uppercase letters designate settings, modes, and conditions in general text. For example: The Slave receiver leaves the data line High. In Transmit mode, the byte is sent most significant bit first. The Master can generate a Stop condition to abort the transfer.

0������15 ���6 � /0))*))�#)�)�

Page 18: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

������ �� ��������

�����

'���������������� �����

Register access is designated by the following abbreviations:

� �$ /�

Z80, Z180, Z380 and Z80382 are trademarks of ZiLOG, Inc.

Designation Description

R Read Only

R/W Read/Write

W Write Only

– Unspecified or indeterminate

/0))*))�#)�)� 0������15 ���6 �

Page 19: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���� �

�'�!��0���'0�

The ZiLOG Z80 CPU family of components are fourth-generation enhanced microprocessors with exceptional computational power. They offer higher system throughput and more efficient memory utilization than comparable second- and third-generation microprocessors. The speed offerings from 6–20 MHz suit a wide range of applications which migrate software. The internal registers contain 208 bits of read/write memory that are accessible to the programmer. These registers include two sets of six general purpose registers which may be used individually as either 8-bit registers or as 16-bit register pairs. In addition, there are two sets of accumulator and flag registers.

The Z80 CPU also contains a Stack Pointer, Program Counter, two index registers, a REFRESH register, and an INTERRUPT register. The CPU is easy to incorporate into a system since it requires only a single +5V power source. All output signals are fully decoded and timed to control standard memory or peripheral circuits; the Z80 CPU is supported by an extensive family of peripheral controllers.

Figure 1 illustrates the internal architecture and major elements of the Z80 CPU.

/0))*))�#)�)� �6 6� �

Page 20: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

+����12 ��������*���/�&� � $

����'�����

The Z80 CPU contains 208 bits of R/W memory that are available to the programmer. Figure 2 illustrates how this memory is configured to eighteen 8-bit registers and four 16-bit registers. All Z80 registers are implemented using static RAM. The registers include two sets of six general-purpose registers that may be used individually as 8-bit registers or in pairs as 16-bit registers. There are also two sets of accumulator and flag registers and six special-purpose registers.

��&38�DQG6\VWHP&RQWURO6LJQDOV

,QVW�5HJLVWHU

'DWD�%XV&RQWURO

,QWHUQDO�'DWD�%XV

&385HJLVWHUV

$/8

&38&RQWURO

$GGUHVV&RQWURO

���%LW$GGUHVV�%XV��9�*1'�&/.

,QVWUXFWLRQ�'HFRGHDQG

&38�&RQWURO

/0))*))�#)�)� �6 6� �

Page 21: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

+����32 ��������'��������#��� ����

"%�� �4��%���'�����

��� $�������5��6

The program counter holds the 16-bit address of the current instruction being fetched from memory. The PC is automatically incremented after its contents have been transferred to the address lines. When a program jump occurs, the new value is automatically placed in the PC, overriding the incrementer.

"� �/�������5"�6

The stack pointer holds the 16-bit address of the current top of a stack located anywhere in external system RAM memory. The external stack memory is organized as a last-in first-out (LIFO) file. Data can be pushed onto the stack from specific CPU registers or popped off of the stack to specific CPU registers through the execution of PUSH and POP instructions. The data popped from the stack is always the last data pushed onto it. The

*HQHUDO3XUSRVH5HJLVWHUV

$FFXPXODWRU

+�

6SHFLDO3XUSRVH5HJLVWHUV

,QGH[�5HJLVWHU�

,QGH[�5HJLVWHU

6WDFN�3RLQWHU

3URJUDP�&RXQWHU

,QWHUUXSW�9HFWRU,

+ / /�

' ( '� (�

% & %� %�

$ ) $� )�

)ODJV $FFXPXODWRU )ODJV

$OWHUQDWH�5HJLVWHU�6HW0DLQ�5HJLVWHU�6HW

0HPRU\�5HIUHVK5

,;

,<

63

3&

/0))*))�#)�)� �6 6� �

Page 22: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

stack allows simple implementation of multiple level interrupts, unlimited subroutine nesting and simplification of many types of data manipulation.

� �������'������5�7� ����86

The two independent index registers hold a 16-bit base address that is used in indexed addressing modes. In this mode, an index register is used as a base to point to a region in memory from which data is to be stored or retrieved. An additional byte is included in indexed instructions to specify a displacement from this base. This displacement is specified as a two’s complement signed integer. This mode of addressing greatly simplifies many types of programs, especially where tables of data are used.

����%��� ��������'�����5�6

The Z80 CPU can be operated in a mode where an indirect call to any memory location can be achieved in response to an interrupt. The I register is used for this purpose and stores the high order eight bits of the indirect address while the interrupting device provides the lower eight bits of the address. This feature allows interrupt routines to be dynamically located anywhere in memory with minimal access time to the routine.

�$�-�'#���'�����5'6

The Z80 CPU contains a memory refresh counter, enabling dynamic memories to be used with the same ease as static memories. Seven bits of this 8-bit register are automatically incremented after each instruction fetch. The eighth bit remains as programmed, resulting from an LD R, A instruction. The data in the refresh counter is sent out on the lower portion of the address bus along with a refresh control signal while the CPU is decoding and executing the fetched instruction. This mode of refresh is transparent to the programmer and does not slow the CPU operation. The programmer can load the R register for testing purposes, but this register is normally not used by the programmer. During refresh, the contents of the I register are placed on the upper eight bits of the address bus.

/0))*))�#)�)� �6 6� �

Page 23: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

����$�� ��� ���+� ��'�����

The CPU includes two independent 8-bit accumulators and associated 8-bit flag registers. The accumulator holds the results of 8-bit arithmetic or logical operations while the FLAG register indicates specific conditions for 8-bit or 1 16-bit operations, such as indicating whether or not the result of an operation is equal to zero. The programmer selects the accumulator and flag pair with a single exchange instruction so that it is possible to work with either pair.

9� ����%���'�����

Two matched sets of general-purpose registers, each set containing six 8-bit registers, may be used individually as 8-bit registers or as 16-bit register pairs. One set is called BC, DE, and HL while the complementary set is called BC’, DE’, and HL’. At any one time, the programmer can select either set of registers to work through a single exchange command for the entire set. In systems that require fast interrupt response, one set of general-purpose registers and an ACCUMULATOR/FLAG register may be reserved for handling this fast routine. One exchange command is executed to switch routines. This greatly reduces interrupt service time by eliminating the requirement for saving and retrieving register contents in the external stack during interrupt or subroutine processing. These general-purpose registers are used for a wide range of applications. They also simplify programing, specifically in ROM-based systems where little external read/write memory is available.

����$����.����������5�.�6

The 8-bit arithmetic and logical instructions of the CPU are executed in the ALU. Internally, the ALU communicates with the registers and the external data bus by using the internal data bus. Functions performed by the ALU include:

/0))*))�#)�)� �6 6� �

Page 24: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

• Add

• Subtract

• Logical AND

• Logical OR

• Logical Exclusive OR

• Compare

• Left or Right Shifts or Rotates (Arithmetic and Logical)

• Increment

• Decrement

• Set Bit

• Reset Bit

• Test bit

�����������'����� �������������

As each instruction is fetched from memory, it is placed in the INSTRUCTION register and decoded. The control sections performs this function and then generates and supplies the control signals necessary to read or write data from or to the registers, control the ALU, and provide required external control signals.

��)�&0"�'�����)

����

The Z80 CPU I/O pins are illustrated in Figure 3 and the function of each is described in the following paragraphs.

/0))*))�#)�)� �6 6� �

Page 25: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

+����:2 �����;���������#��� ����

����+��������

�1<=��

Address Bus (output, active High, tristate). A15-A0 form a 16-bit address bus. The Address Bus provides the address for memory data bus exchanges (up to 64 Kbytes) and for I/O device exchanges.

SystemControl

CPUControl

CPUBusControl

Z80 CPU

AddressBus

DataBus

A0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15

D0D1

D3D4D5D6D7

D2

3031323334353637383940

14

15

12879

1013

12345

M1

MREQ

IORQRD

WR

RFSH

HALT

INT

NMI

RESET

BUSRQ

BUSACK

CLK+5V

GND

WAIT

27

19202122

26

18

24

16

17

28

2523

6

1129

/0))*))�#)�)� �6 6� �

Page 26: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

*�"��>

Bus Acknowledge (output, active Low). Bus Acknowledge indicates to the requesting device that the CPU address bus, data bus, and control signals MREQ, IORQ RD, and WR have entered their high-impedance states. The external circuitry can now control these lines.

*�"'0?

Bus Request (input, active Low). Bus Request has a higher priority than NMI and is always recognized at the end of the current machine cycle. BUSREQ forces the CPU address bus, data bus, and control signals MREQ IORQ, RD, and WR to go to a high-impedance state so that other devices can control these lines. BUSREQ is normally wired-OR and requires an external pull-up for these applications. Extended BUSREQ periods due to extensive DMA operations can prevent the CPU from properly refreshing dynamic RAMS.

&@=&�

Data Bus (input/output, active High, tristate). D7–D0 constitute an 8-bit bidirectional data bus, used for data exchanges with memory and I/O.

!�.�

HALT State (output, active Low). HALT indicates that the CPU has executed a HALT instruction and is waiting for either a non-maskable or a maskable interrupt (with the mask enabled) before operation can resume. During HALT, the CPU executes NOPs to maintain memory refresh.

�)�

Interrupt Request (input, active Low). Interrupt Request is generated by I/O devices. The CPU honors a request at the end of the current instruction if the internal software-controlled interrupt enable flip-flop (IFF) is enabled. INT is normally wired-OR and requires an external pull-up for these applications.

/0))*))�#)�)� �6 6� �

Page 27: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��'?

Input/Output Request (output, active Low, tristate). IORQ indicates that the lower half of the address bus holds a valid I/O address for an I/O read or write operation. IORQ is also generated concurrently with M1 during an interrupt acknowledge cycle to indicate that an interrupt response vector can be placed on the data bus.

�1�

Machine Cycle One (output, active Low). M1, together with MREQ, indicates that the current machine cycle is the opcode fetch cycle of an instruction execution. M1 together with IORQ, indicates an interrupt acknowledge cycle.

�'0?

Memory Request (output, active Low, tristate). MREQ indicates that the address bus holds a valid address for a memory read of memory write operation.

)��

Non-Maskable Interrupt (input, negative edge-triggered). NMI has a higher priority than INT. NMI is always recognized at the end of the current instruction, independent of the status of the interrupt enable flip-flop, and automatically forces the CPU to restart at location 0066H.

'&

Read (output, active Low, tristate). RD indicates that the CPU wants to read data from memory or an I/O device. The addressed I/O device or memory should use this signal to gate data onto the CPU data bus.

'0"0�

Reset (input, active Low). RESET initializes the CPU as follows: it resets the interrupt enable flip-flop, clears the PC and registers I and R, and sets

/0))*))�#)�)� �6 6� �

Page 28: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

the interrupt status to Mode 0. During reset time, the address and data bus go to a high-impedance state, and all control output signals go to the inactive state. Notice that RESET must be active for a minimum of three full clock cycles before the reset operation is complete.

'+"!

Refresh (output, active Low). RFSH, together with MREQ indicates that the lower seven bits of the system’s address bus can be used as a refresh address to the system’s dynamic memories.

(���

WAIT (input, active Low). WAIT communicates to the CPU that the addressed memory or I/O devices are not ready for a data transfer. The CPU continues to enter a WAIT state as long as this signal is active. Extended WAIT periods can prevent the CPU from properly refreshing dynamic memory.

('

Write (output, active Low, tristate). WR indicates that the CPU data bus holds valid data to be stored at the addressed memory or I/O location.

�.>

Clock (input). Single-phase MOS-level clock.

/0))*))�#)�)� �6 6� �

Page 29: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����)9�

����

2���;58������4��������������0%��((�������������(���������:�0�����(��������2�����������C

• Memory Read or Write

• I/O Device Read or Write

• Interrupt Acknowledge

�����������������������:�0�����(��������3�����:������(������������-��:������������4�����-�(�����������(���������%�����0��������������%�������D��������������(�����:��4��������������2�������-�(������������:����������2��������%������������(�������������:����������$������������%�����!����� )����������� ���%(����������������������:�(���:���$�����2��%�����.��������������������������:���������������%�����$#=�$ =�����$'���2���:������������%�����:���%��������������:�����%���� �������:���=�:���=�����4�2��%�������������������������0%����&��2������=� ������������0�����������4���������2���:�����%�����$#����������:��������(������:������4������������0���4�������9�0�+�������������%�������������0� ��������������������%�����,��������=�������%���%��������% �����:�����������:����2��%����������=���%���%�0������������0%� ��������%�������D������4������������������������2���:���� ����(������(�������0����������� ����������� �������%��:����0�������������%����

6������2 ���������%��0�+����2 =����������(������&��2������ ������:�������������:�����-���:����&��2����������������������=��������&��2�����������������������:���� �����%������������������+��=�������������0��������������������������������:���%�%(���:������%��������

/0))*))�#)�)� �6 6� �

Page 30: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����A2 * ����������$����0� $%�

�����������+���

!����� ����(����������������������$#���(�����:������%�����2��������(������������������0�������0����������:����$#��%������������:�����-��%������������$�3E����������������������������������������������%���������������0���D����������:�������������:�$�3E�����0������������%��������(����0�������-����%���������������2����6�����������������������������������������%����������������0�����0�������������������0���2���������(����������:������������%�����������0�� ������������������:��������-��:����2'�����������������������0%���������������::�����6�����$�3E��������2��=�����������������%�0������(����0%��������0�:��������6�������0�������������������-����2'�����2)��:���:�����%����������������:�����%���������������2�������������������������������4��������:�����������������������������(�������������0��(��:���������������

6������2'�����2)=������ ��������0���:����������0����������������%���:������������������!91�������0�����������������������������:����������:������%�����������������0�������(�����������6������������������������������:����������(����������:������::����������%�

&/.

7�&\FOH

0DFKLQH�&\FOH

0��2SFRGH�)HWFK�

,QVWUXFWLRQ�&\FOH

0��0HPRU\�5HDG�

0��0HPRU\�:ULWH�

7� 7� 7�7� 7� 7�7� 7� 7�

/0))*))�#)�)� �6 6� �

Page 31: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

������:����0���������������������0���2���$�3E����������������:��������������0��������(��:��������:����������:����������%���������2�����:�����������������0������0%����:�0�����������:���������������%�������������0���0����������$�3E�����

+����<2 ������������%�����+���

�$�-�' ����(��

!����� ��������������������:������%��������� �����%�����������������(������:�����%�����2�����%����������������%����������-�(���������������� ������������+�����0%���������%�����������&��2��������2���$�3E���������������6������������������������������:�����%���������������%� �����%���=����$�3E�����0������������ �������������0�����0��������������0������������%��������(����0���:����%���������������2���&��������������� ��������������

PC Refresh Address

T1 T2 T3 T4 T1

M1 Cycle

CLK

D7 — D0

A15 — A0

MREQ

RD

WAIT

M1

RFSH

IN

/0))*))�#)�)� �6 6� �

Page 32: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����0�����0��������������0������������%������,&�(�������������%���%�%(���:������������������%��!���������=����&�����������������������/���:�2����0�:���������������������0����������������������������������(���+��������:����������%�%(���:������������������%�%(�������

+����B2 �$�-�' ����(����-��

��%��������%����-���

!����� "�������������,�����������,�� �����(��������6�������,���(��������������� ������������������%���������2����������������������,���(������=��������:���� ����������E����������������������������������(������&��2�����������%������&���������4�����=��::������������������4��:�������,��(����������������������������������&��2�������:��� �������+����������=� �������� �����=�������::�������������$�9��,�����������������(�������:��������(�����6��������� ���������=����&��2���+�������������(����

CLK

D7 — D0

A15 — A0

MREQ

RD

WAIT

WR

Memory AddressMemory Address

T2 T3 T1 T2 T3

In

Memory Read Cycle Memory Write Cycle

Data Out

/0))*))�#)�)� �6 6� �

Page 33: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

6��������������,���(������=�����6�����������������0��������������(��������������0��F���������������:��������%�������!����,�� �����(������=����&���������������������-�������,��(���

+����@2 ��%��������%����-���

*���'C���;��/�� �����-���

!����� 5������������������:�����*����+��,��-�� �������%�����2���*�9�3E�����������(����0%�������� ������������������:�����������-�(�������:���%����������%������:����*�9�3E��������������=�����������������=����=��������������������������������/��(���������� ������������������:������4�����-�(�������������=���%��4���������������������������0��������:�������0� ���������%������,�����������2����(�����������������%�-�� ����6�����$����%������G6$�H�������%�������������2�����4���������:��������������(��������0����+���������������:������������%������������4��������������������

Out

T1 T1T2 T3TW*

WriteCycle

ReadCycle

Port Address

CLK

D7 — D0

A15 — A0

IORQ

RD

WAIT

WR

D7 — D0

*Automatically inserted WAIT state

In

/0))*))�#)�)� �6 6� �

Page 34: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����������������:����0��:��������%�����-��%����������+��������:����%������6$���%�����������=������%���������������������=�����4��������������������(��:���������:����:��������2�������������%��������:����%�������0���-��:������������:������������6$����������6��������0����+����%���=��������������0��������(���0%����������.$���������.2�������

+�����2 *���'C���;��/�� �����-��

����%��'C���;��/�� �����-��

!����� 7�������������������������� ������������(��%�����2���������(������������(���������.2�� ������������������:�����������-�����������:���%�����������2������������������(����:�����������������: ��������������������(����0���:��(/:��(������������:����*�9�3E����������������&�������������������(��=���(������$#��%����������������6���������(������$#��%���=�������E�������0��������������������:�����������$�3E������������������������(���������������(��������5/0������������������0���2 �� ��������������������%�������������%�����2��������������������������((���(�����%�������(�����������0������%���(���������2��� �� ���������� ��::������

Sample Sample

Floating

Last T State TX TX TX T1

Any M Cycle Bus Available Status

CLK

D7 — D0

A15 — A0

BUSREQ

MREQ, RD

BUSACK

WR. IORQ,

RFSH

/0))*))�#)�)� �6 6� �

Page 35: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����:��������((������������0���D�����������:%� ������,����������������������(�������������:��������(�����:�������������� ����������(���(����������������D���0%��������

+����D2 ����%��'C���;��/�� �����-��

)��4� �/ �������%��'�%���

Figure 10 illustrates the request/acknowledge cycle for the non-maskable interrupt. This signal is sampled at the same time as the interrupt line, but this line takes priority over the normal interrupt and it can not be disabled under software control. Its usual function is to provide immediate response to important signals such as an impending power failure. The CPU response to a non-maskable interrupt is similar to a normal memory read operation. The only difference is that the content of the data bus is ignored while the processor automatically stores the PC in the external stack and jumps to location 0066H. The service routine for the non-maskable interrupt must begin at this location if this interrupt is used.

In

RefreshPC

M1Last M Cycle of Instruction

CLK

D7 — D0

A15 — A0

INT

MREQ

RD

WAIT

T1 T2 TW* T3TW*

M1

IORQ

Last T State

/0))*))�#)�)� �6 6� �

Page 36: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����1�2 )��4� �/ �������%��'C�����% ����

!�.��0���

&�����������: ����1��2�������������4�����=���������4�����.�����������������(������������������������/��-�0����������-�0���������(� ��������������(�:��(/:��(������0������2��� ��������(������������(���� ����������������-������������������2)��������(��������!����� ##���:������/��-�0���������(����0��������������������-�0���������(����0��������������������������(����0���:��(/:��(����=��������1��2�������4������������4�����������-�������2���:���� �����%���������������(���-�� �������%���������(������������%(���:�������(���� �������������:�0������������������������=�����������/��-�0�����������-�� �����������������������(�����%��2���(��(����:��4�������.������������ �����������1��2��������-��(���������%���:�����������������3�����%����������1��2���������������$#��:������%�����4��(��������������������:������������%�����������������.��������������:��������������%�����������2���1��2���-�� ��������������������������������������������������(���������������1��2����

CLK

A15 — A0

NMI

MREQ

RD

RFSH

T1 T2 T3

M1

Refresh

M1Last M Cycle

Last T State

PC

T1T4

/0))*))�#)�)� �6 6� �

Page 37: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����112 !�.��0���

�� 4&� ����/�� �����-��

&�����������-���(��������$�9�;58��������((�������������1��������� ������=�����$�9�;58������(����(������������������������������������������������1� ����=���� �����0%��((�%������������������������%� �������%�������-����((��������� ��������������2)��:�������������%����:���� ��������4��������:����1��2�����������2�����������������:������(� ��/�� ��:������=� ������(�������� ������1��2���������=����� �����!����� # �

+����132 �� 4&� ����/�� ���

CLK

RD or

HALT

T1 T2 T3

M1

T1T4

NMI

HALT Instruction is repeated during this Memory Cycle

T4 T2

M1

CLK

HALT

T1 T2 T3 T1 T4

M1

T4 T2 T3

/0))*))�#)�)� �6 6� �

Page 38: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�� 4&� ��'� ���-��

2���%�������-����0���((�����������$�9�;58�����������������(� ��/�� ������&�������%�������-����((������������I���(�=�����$�9�;58�����������(�������:�������(������ ��������(� ��/�� ����� ����(���������2�����������������:�������������:����(� ��/�� �����������:����������!����� #'�=�#)�����#��

&�������1��2�������������4����������������(� ��/�� ����=�����$�9�;58�����������������1��2��������������(��������������.$������.2��������3932����������0���((���������������:������%�������-����((��������������������������(� ��/�� �����

+����1:2 �� 4&� ��'� ���-���)�2�1

+����1A2 �� 4&� ��'� ���-���)�2�3

%.-

*#.6

6� 6� 6� 6�

/�

6�

0/+

CLK

HALT

T1 T2 T3

M1

T4

RESET

/0))*))�#)�)� �6 6� �

Page 39: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����1<2 �� 4&� ��'� ���-���)�2�:

CLK

HALT

T1 T2 T3

M1

T4

INT

T1 T2 TWA TWA

/0))*))�#)�)� �6 6� �

Page 40: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�)�0''����'0"��)"0

����

���������(����� �(���(����������������(���������(�����������:�������������������(���(���������������������2����������������������%�������������4��������:����=���=�������������:��������0� ������������������(���(�������&��������������������������(����=��������������������(�������:���� ������� ��������(���

����%��0� ��;&�� ��

2���;58�������� ��������(���(�=����: ������-�0���������(���.2�����������/��-�0���������(��.$����2������/��-�0���������(�������0�����0����0%����(��������������������(��� ����������(���(�/��������������+������2���������(�����������%���������:������%���(��/���:��������������0�����0����������0������������%�0%����(�����������2�������������� ����(���������������0������������(��������(������ �������(������������������������������������� �������(��������;58����=�����������������(����0���:��(/:��(���!!����������������0%����(������������������3��0���������(��3�������6��0���������(��6�������������&��������!!������=����������(�������0������(���0%��������

2��� �����0���:��(/:��(������!!#������!! �

2�������:��!!#�������������0��������(� ������!! �������������(�/���%���������������:����!!#�

IFF1 IFF2

Disables interruptsfrom being accepted

Temporary storage location for IFF1

/0))*))�#)�)� �6 6� �

Page 41: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����������:�����0�������!!#������!! ������������=� ��������0���������(��������(�����0�����0��������%�����0%����3�����������:�������(�����������&�������3��������������4�����=���%�(�������������(���+������������(���������:���������������:���� ����3�����4�������2����������������������%���������%� ���������4������������������������������������(������������ ���������������������(������2���3�������������0����!!#������!! ���������0�������&���������������(�����-�0���������(=�0����!!#������!! ���������������%����=�����0�����:������������(���������(������������������ �3������������.������:��������:����(����������=��!!#������!! ������� �%��+����

2���(��(����:��!! ����������������:��!!#� ���������/��-�0���������(��������&���������/��-�0���������(�������(��=��!!#�������(������:������������(�����������0����0%����(�����������2��=��:��������/��-�0���������(�������(��=���-�0���������(��������0����0�����(�����������:��!!#����0��������������������(��������:��������F��(�������������/��-�0���������(�����0�������������%������&������Load�Register�A�with�Register�I��LD�A=�I����������������Load�Register�A�with�Register�R��LD�A=�R��������������4�����=��������:��!! �����(���������(���%�:���� �����������0��������������

���������������:����������������:��!!#��������������4��������:���Return�From�Non/Maskable�Interrupt���32.������������2�����������������������������/��-�0���������(��������������������(������������������:��!! ������� ���(����0��-������!!#�������������:��!!#�F��(��������������(������:�������/��-�0���������(��������������������%�

2�0�� #����������%��:�����::����:���::�������������������� �����0���:��(/:��(�

/0))*))�#)�)� �6 6� �

Page 42: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����'�%���

)��4� �/ ��

2��������� �%�����(������/��-�0���������(��&������������=��������������������4���������������:���������������(��:���������������������88��1��2�������:����������:����������%��������������������=�0����������������������������:����������: �������������/�������������������%������������(���:������������(����8��:������%�

2�����������0��(��������������(�����������-�0���������(������%������:������(��0��������

�����

2����������������������5858��������(���(����������&����������=����������(���������������(�������%��������������������0��������������4��������2��=����������(�����������(������������4������/������0���4��������:������������������������0�������������/��(��������������%�������((�%���������0%����������������������%=���%�

� ���12�����%��0� ��;&�� ��E�+��%4+��%�

������ �++1 �++3 ��$$���

CPU Reset 0 0 Maskable Interrupt, INT Disabled

DI Instruction Execution 0 0 Maskable INT Disabled

EI Instruction Execution 1 1 Maskable, INT Enabled

LD A,I Instruction Execution * * IFF2 �� Parity Flag

LD A,R instruction Execution * * IFF2 �� Parity Flag

Accept NMI 0 * Maskable�Interrupt

RETN Instruction Execution IFF2 * IFF2 ��indicates completion of non-maskable interrupt service routine.

/0))*))�#)�)� �6 6� �

Page 43: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����������������������'/0%�����������%�����������������%�������0���4������

2������0����:�����-��%����������%����4������������������� ������������������������0���:����������������2���������0�����������������������%����� �� �����������������(���(�����%���������� ��::��������������(����������4���������%/������:���(�����%���������!����� 7�����!����� #8��������������������������:������������(���(������:�������((���������:��3932=������������������%������������(�$����8�

����1

&���������������������0%����(���������=����������(���������������(�0%��4������������������������88'51��2��=������(��������������������:��������/��-�0���������(��4��(����������������������88'51��������:�88��1��2������0����:��%������+�����������(����������������������� ��������������������������� �������� ������

����3

2����������������(� ��:���������(���(����������&�����������5/0��0%��:����������=���������������������0�����������%������%���������

����������=����(���������������������0����:�#�/0���������������:�������%�������(����������������2����0�����%�0�����������% �������������%��&�������������(�������(��=���#�/0��(���������0��:���������0��������������������(���������������������������:��������0����2����((��������0���:����(��������:������:��������������:��������������2���I�����������0��������� �������((����0���������0%����(���������=�������LD�I=�A���������������������I������������������������D�����D�����2����� ��������0���:����(���������0���((�����0%����������(���������������%������0��������+������:�������������(�����������0������������/����:�����0�����0����D�����2�������+������

/0))*))�#)�)� �6 6� �

Page 44: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

0���������(����������������� ����F�����0%����:���������(����#�/0����������������������������������������������� �%��������������������

+����1B2 ����3�����%��'�%�������

2���:���0%���������0�����������/����:�������� �������(�������:������������2���(����������������(��������0��� ��������������������0�:������%�������(���������(���

2���(�������������������������0���0%����������������,&����$����%=� ������������� ������������(���(��������0����������0%���::�������������������

&�������������(������������((��������� ���(�������:����(�����=������������������%�(�������(�����������������������-=��0�������������������:��������0��=�����(��:������F��(�������������2���������:���(������+�����#7�����-�(�����������(������������:��������� ��������0��:�������������(����������=��4����������(�������������=������4����0�������F��(��������

2���;58�(���(��������������������������%/������(�����%�������(����/�����������������%��((�������(��������������������������������������(���-�� ���������:��������;58���������(����������$������:�����������(������:��������

Starting AddressPointed to by:

I RegisterContents

Seven Bits FromPeripheral 0

Low Order

High Order

InterruptServiceRoutineStartingAddressTable

/0))*))�#)�)� �6 6� �

Page 45: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����������������������������� ����������

!�'&(�'0

����$�$�"-��$

2������(�����������������������(���������%������������;58������!����� #�������������(���;58�%����

��%�;58�%�����������������:���� ����������C

• 5V Power Supply

• Oscillator

• Memory Devices

• I/O Circuits

• CPU

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 46: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����12 ����$�$�������$%���"-��$

*���������;58�������+��������%����������J�(� ����((�%=���������%�������0����(����������������%�����������((�%�

2����4�����������%�����0����%���4�����:����������$=���$=�������$�����!����� #=���������5I�0����$��#�I0%������(������������������%�%����2���;58�������������������:�����������������::����������,&���������=���+�����������4��������$������%�

�,������������� ����(����%���������:���� �������4�����������������!����� #=������(�������5/0������������������������(�������5/0����� �����2�����(����������0����������������0���������%������������/���������� ����������(����������0��������� �����%�%(���:���/�����22����������;58����������������,����������2�������������������������������0�����������������(������������+������#��0���:�22�����(��0����,������:��������;58���������(���������K�$������:����������������(��������:�������������2���(� ��:������(������0���� ������%�������9��������=�����(�����������=��������������J�(� ����((�%�

5(6(7

��9 =��&38

0�

,254

'DWD�%XV

5'

05(4

$�±$� ��9

'DWD287

*1'

$GGUHVV,1

��9�3RZHU�6XSSO\

&/.

$�

$�0�

,254

&(5'

2XWSXW�'DWD

26&

&/.

,QSXW�'DWD

&�'

%�$=���3,2

3RUW�$ 3RUW�%

&(�

&(� 520�.�%LW

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 47: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�������'��

$�����(����%�����+����������4����������,&���������%�:�������������������-���(�����������!����� ����������� � ���0%���:����������%����������������(��������4��(������!����� #��2��������%�(��������������0��������D�����:���� C�

�����������������������(�����������0��������4�����������������������0���#8��(����������$�(����:���������$�(���=����� ���������������0������:���������(������:��������!�����������������:��4��������$������$=�����(���22��������������+��������:����������(������

+����32 '��� ���'����$%�$�� ����

1 Kbyte ROM

Address:

0000H

03FFH0400H

04FFFH256 Bytes RAM

CE1

CE2ROM

1K x 8

MREQ • RD

A10

A7–A0

D7–D0

WR

RD

R/W

OD

CE2A10

A7–A0

D3–D0

CE1

WR

RD

R/W

ODMRQ

Data Bus

D7–D4

Address Bus

A7–A0

RAM256 x 4

RAM256 x 4

A10

MRQ

CE2

CE1

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 48: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�$�-�"%��������

9�� �����������������������:������%��((���������2���&��2�������������������� ����;58����(����� �����%�(���������%��$����%������������+�������=� �����������������������(����'=������������������������$#��%�������������:�������������������%�������%�������(���������������������������:�����-��%�����1����=�������������((��(��������������� �����������$#��%�������� ���������������0�������!����� '�������4��(����:�����(������������������(���������0F�������2��������������0������������������������ ����������%������%��������������������!����� )�

+����:2 ����������( ���"� ����� ���1��-��

+5V

D

C

Q

QR

S

7474

+5V

D

C

Q

QR

S

7474

+5V

M1

CLK

WAIT

CLK

M1

WAIT

M1

T1 T2 TW T3 T4

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 49: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����A2 ����������( ���"� �������-��$�-��-��

���# �����&-� $����$���

3����������������%��������$�����K�� ��(���:������������+���������������:�������������4��(���������������;���<��((��������.�������������0��������0������ ����;58�����������:����� ������(�(������%��������$�

!����� �������������������������%�������:����5�I0%���:��%��������$������#5/(���)I��%���������������2����������������������$�����������%������%�������%���������# ��������������0� ������� ��(�����:������%��6��������:�������=�������������������%������0��������2�������(�������������������:�������������������8������������&���������������������%������%��=�����������%�����(��������%���� ����������(���������# � �����������������(��/������������+������������0���������0�::�����������0��0�::���������������%���+������:����������%���

+5V

D

C

Q

QR

S

7474

+5V

D

C

Q

QR

S

7474

+5V

MREQ

CLK

+5V

7400WAIT

WAIT

MREQ

CLK

T1 T2 TW

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 50: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

+����<2 ���# �����&-� $���'���

WR

R/W

R/W

CE

CE

4K x 8 RAM Array

Page 0(0000 to 0FFFF)

4K x 8 RAM Array

Data BusPage 1

(1000 to 1FFFF)D7–D0

A11–A0

RFSH

MREQ

A12

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 51: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

"�+�(�'0����.0�0)�����)�07���.0"

���� ��#�"�#� �+ ���

2���;58������������(�������������� ��������������0����:��(�������������������;58������2������������������������4���������������������������������������(������=�:���������%�������=���������:�/�����������:���:��+����%���������

��:������������0��������������%�:�������������������=�:���������%��������%=�:���������%���������=����:������������������%���������/���=������������������������,�����%�����������0���4�������� ������������(����%�����������(��������=�����������:�����������������������������0�����(����%��4��������0%��4����������%� ����������=�EX�����EXX��2�����������4�������(�������������0���������(�����������:� ��-�����������:������::�������������(���������������4(����������:�������0���������������������(���������

9��������������������:�����0� ����(�����:�����������������%�����0�������������������/���:��/���0����������PUSH�����POP�����������������D����(������STACK POINTER���������9����2�����-����������������0���0���������(�������������������������%������������������������:����0����������-�����&�������0���������������=�:����4��(��=����������:���� �������CALL������������(�������������(��:����(��/�� ����-�(��������0%�SP��&�������0��������������������������������=�����������������(��:������-��������������(��������������:�������������:������4�����������2�����-�(����������F��������������%�����:���������������(���-�(�������������PUSH=�POP=�CALL=�����RET�����������2�����-�������������� �(���� ��������-������0��������������0�����������%�(����������(��0�����������-����������(�������%�0�����������������%�(����

2����+�������:�����������4�����������0������������0%��4���::�����:���������%=�D���=����=�(���%,����:�� =����,�0���=����:/����%�=� �������:�������������:���������=��������=���:=��������(��������������

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 52: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�:�������4��������:��������������������:���=����:��������0����������������������������F��(��������������������2�������������(����������������������:���� �����������(��������:�������0�=�5/0��0%�=����#5/0������+�������

��:�������:����������(������=�����������AND=�OR=�XOR���4������/OR�=�CPL��NOR�=�����NEG�� �K����(�����������������0���:���*��������(���/����0� �������������������������������5/0��������=������%�����/���=��������������(������

����������=���:�������:������������������������:����0����������������������0��� ������(������������������:�����5/0��(�����%�����������������%������%������%����������2�������%�:��������0����������������0%�������:������������(�������0������������:���:���������������-�������,����������������,�����%���:��(�������

0� $%����#�"%��#������������������

0� $%����F

&������"'"/0%�������������������%���������6�2�����0������������������*�!!3�=�����(���������(������������:���� CLD HL, DATA ;START ADDRESS OF DATA STRINGLD DE, BUFFER;START ADDRESS OF TARGET BUFFERLD BC, 737 ;LENGTH OF DATA STRINGLDIR ;MOVE STRING - TRANSFER MEMORY POINTED

;TO BY HL INTO MEMORY LOCATION POINTED;TO BY DE INCREMENT HL AND DE,;DECREMENT BC PROCESS UNTIL BC = 0.

3������0%��������+������:�������(����������������0%���:���������������� #�����-��%����

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 53: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

0� $%��� �F

���������������%���������������4������������:�#' ���������������������������6�2������0����������������������%�������������������������*�!!3�����������9����L���������������������������:������2����(���������(��:��������:���� C

LD HL, DATA ;STARTING ADDRESS OF DATA STRINGLD DE, BUFFER;STARTING ADDRESS OF TARGET BUFFERLD BC, 132 ;MAXIMUM STRING LENGTHLD A, ’$’ ;STRING DELIMITER CODE

LOOP:CP (HL) ;COMPARE MEMORY CONTENTS WITH;DELIMITER

JR Z, END-$ ;GO TO END IF CHARACTERS EQUALLDI ;MOVE CHARACTER (HL) to (DE)

;INCREMENT HL AND DE, DECREMENT BCJP PE, LOOP ;GO TO "LOOP" IF MORE CHARACTERS

END: ;OTHERWISE, FALL THROUGH;NOTE: P/V FLAG IS USED;TO INDICATE THAT REGISTER BC WAS;DECREMENTED TO ZERO.

.�������0%��������+������:�������(�������

0� $%����F

��#�/����������������0�������:�������(�����������!����� ���2�����:���(��:���������������D��*�6�����(��������������������2���#�/����������������0�������(����������(��-���*�6�:������ ��*�6�����,0%���2����(���������(������������:���� C

LD HL, DATA;ADDRESS OF FIRST BYTELD B, COUNT;SHIFT COUNTXOR A ;CLEAR ACCUMULATOR

ROTAT:RLD ;ROTATE LEFT LOW ORDER DIGIT IN ACC;WITH DIGITS IN (HL)

INC HL ;ADVANCE MEMORY POINTER.DJNZ ROTAT-$ ;DECREMENT B AND GO TO ROTAT IF

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 54: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

;B IS NOT ZERO, OTHERWISE FALL;THROUGH.

3������0%��������+������:�������(�������

+����B2 "��#������#�*�&�&�����;*-��

0� $%��+��F

�������0�������0���0������:��������������0��=�0����:� ������������(��-���*�6�:��������������:��+����0�����%�����������2������������������������������:�������������2����(���������(������������:���� C

LD HL, ARG1 ;ADDRESS OF MINUENDLD DE, ARG2 ;ADDRESS OF SUBTRAHENDLD B, LENGTH ;LENGTH OF TWO ARGUMENTSAND A ;CLEAR CARRY FLAG

SUBDEC:LD A, (DE) ;SUBTRAHEND TO ACCSBC A, (HL) ;SUBTRACT (HL) FROM ACC

0

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 55: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

DAA ;ADJUST RESULT TO DECIMAL CODED VALUE

LD (HL), A ;STORE RESULTINC HL ;ADVANCE MEMORY POINTERSINC DEDJNZ SUBDEC - $;DECREMENT B AND GO TO "SUBDEC"

;IF B;NOT ZERO, OTHERWISE FALL;THROUGH

9��������0%��������+������:�������(�������

0� $%����#���� $$����� �/�

����(��������2�0�� #=�����4��(���(�����������������%��:����0�������������������=����������������4�����������������������2�������0���������:����8��� ���

� ���12�*�����.�������

.�� ��G���� "�$� "����"� �$��

1 ; standard exchange (bubble) sort routine

2 ;

3 ; at entry: hl contains address of datac contains number of elements to be sorted(1 �c�256)

4

5

6 ;

7 ; at exit data sorted in ascending order

8 ;

9 ; use of registers

10 ;

11 ; register contents

12 ;

13 ; a temporary storage for calculations

14 ; b counter for data array

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 56: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

15 ; c length of data array

16 ; d first element in comparison

17 ; e second element in comparison

18 ; h flag to indicate exchange

19 ; l unused

20 ; ix pointer into data array

21 ; iy unused

22 ;

0000 222600 23 sort: ld (data), hl ; save data address

0003 cb84 24 loop: res flag, h ; initialize exchange flag

0005 41 25 ld b, c ; initialize length counter

0006 05 26 dec b ; adjust for testing

0007 dd2a2600 27 ld ix, (data) ; initialize array pointer

000b dd7e00 28 next: ld a, (ix) ; first element in comparison

000e 57 29 ld d, a ; temporary storage for element

goof dd5e01 30 ld e, (ix+1) ; second element in comparison

0012 93 31 sub e ; comparison first to second

0013 3008 32 jr pc, noex-$ ; if first � second, no jump

0015 dd7300 33 ld (ix), e ; exchange array elements

0018 dd7201 34 ld (ix+i), d

001b cbc4 35 set flag, h ; record exchange occurred

0010 dd23 36 noex: inc ix ; point to next data element

001f 10ea 37 djnz next-$ ; count number of comparisons

38 ; repeat if more data pairs

0021 cb44 39 bit flag, h ; determine if exchange occurred

0023 20de 40 jr nz, loop-$ ; continue if data unsorted

0025 c9 41 ret ; otherwise, exit

42 ;

� ���12�*�����.��������5��������6

.�� ��G���� "�$� "����"� �$��

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 57: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2���:���� ����(�����������2�0�� ������(���� ����������#�/0��������=�����������������������1���������(����

0026 43 flag: equ 0 ; designation of flag bit

0026 44 data: defs 2 ; storage for data address

45 end

� ���32������%�-�.�������

.����G���� "�$� "����"� �$��

0000 1 mult:; unsigned sixteen bit integer multiply.

2 ; on entrance: multiplier in de.

3 ; multiplicand in hl.

4 ;

5 ; on exit result in hl.

6 ;

7 ; register uses:

8 ;

9 ;

10 ; h high order partial result

11 ; l low order partial result

12 ; d high order multiplicand

13 ; e low order multiplicand

14 ; b counter for number of shifts

15 ; c high order bits of multiplier

� ���12�*�����.��������5��������6

.�� ��G���� "�$� "����"� �$��

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 58: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

16 ; a low order bits of multiplier

17 ;

0000 0610 18 ld b, 16; number of bits-initialize

0002 4a 19 ld c, d; move multiplier

0003 7b 20 ld a, e;

0004 eb 21 ex de, hl; move multiplicand

0005 210000 22 ld hl, 0; clear partial result

0008 cb39 23 mloop: srl c; shift multiplier right

000a if 24 rra least significant bit is

25 ; in carry.

000b 3001 26 jr nc, noadd-$; if no carry, skip the add.

good 19 27 add hl, de; else add multiplicand to

28 ; partial result.

000e eb 29 noadd: ex de, h l; shift multiplicand left

goof 29 30 add hl, hl; by multiplying it by two.

0010 eb 31 ex de, hl;

0011 10f5 32 djnz mloop-$; repeat until no more bits.

0013 c9 33 ret;

34 end;

� ���32������%�-�.��������5��������6

.����G���� "�$� "����"� �$��

/0))*))�#)�)� ����� �������2��� �3.& . ��������7-�.& �

Page 59: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� !��"#��������� ���$��� �� ��

����

2���;58����������4�����#�5���::��������������%(����������������"5��:����5858�������2������������:��������������F�������(C

• Load and Exchange

• Block Transfer and Search

• Arithmetic and Logical

• Rotate and Shift

• Bit Manipulation (Set, Reset, Test)

• Jump, Call, and Return

• Input/Output

• Basic CPU Control

������������-%�

2����������������������������������%���������������������0� ��������������������4�����������%�������������������(���:%�����������������:���� ����������������0��������������������������������2�����������������������������0%������������������34��(����:����������(�����������������������0� ������%��:�����������/(��(�������������������������������������*�:��������������2�������(�����������������/�������������%�������������������%��4�����������%���������������%(���:������������������� ����:���0� ������������������������%����������2����4�����������������������������������:� ���������

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 60: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�����+������:�0���-����:��������������(��������������;58��&�������������������=���0���-��:������%��:���%��D������0������������%����������������������%��2������:�0���-���������4�����%������0��� ����(��������������������:������&�������������������=���0���-��:��4�����������%��:���%������������������0����������:�����%�5/0������������&������������������:����������������:����0���-����������=�����������������������%����������*������0���-����:����������0���-��������������������0��������(����������������4�����������%�����������(%��������:��������(�������:�����

2����������������������������������(��������������������������������������������������/(��(������������������4�����������%����������2���������:�����(�����������(�������������������������������((��(�����:�������������������������������:�����(�������

����4��(����:��������������(������������������������������������������:�����4�����������%����������2���������:����������������(������������������������2�������(�������������#�/0���������������0�������0� ����#�/0�������������

2��������������:�����(����� ���%�������������%������%�����������0������������������:=� ������ ���������%�������������������������������=�����������������������������0������������������:� ��� ������������%������%���������

2���0������(�������������������� ���%�0������������������=���%��������/(��(���������=������%��4�����������%�����������0���=����=�������� ���������������������!����4��(��=������/����:�����0���:��������1�����0�������2�������(����(������%���:��������������((������������:���������������: ����:��������������/(��(���(�����������

2���JUMP=�CALL=�����RETURN�����������������������:���0� ����������������������������K�(��������2�������(�������������::����������+���:����0������������ �(��������������������:����(���:����4�����������%���������������+���%(���:�����������RESTART�����������2������������������%������������� �����������(����:�

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 61: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

���5/0���(�������2�����(��0���0���������%�������(����������������������(����D�����:�����4�����������%���%�0��(���:�������������F��(���%�����0�����������0%����������������1�=��?=�����A�������%����������=�������� �������F��(���������0�������(��4�:��������:�����������0������4������

2�����(�,��(������(��:����������������;58����� �:����� �����������:����:���0� �����4�����������%����������������������/(��(�������������=���������4�������,���������������������=����(������0�����(���������������� ��������0���:����������0�����������%��,����������������������������� ����(������0�����0��(���:����0%����������0%���:������������� ����������;58�������������� �����0��(���:����������������:��������������������F�������������:����������������������(������������,�������������������� �����(����,��(������������������: �������������������2�����������������(��0��� ���������������(����:�����(�������:�������������������������$���������:�������:�������(������������������������������:����:����������=���-���������������(���������������%�������������������:������(�������2���(���%�����������4��(����

2���;58����������������������������������������0���-��:�������(��� ���0%�������������%������:������%��,��(���������%�����%������%����������������F������� ��������������:��������/(��(���������=��������������(�������:���,��0���-����:��������2���(� ����:�����,�������������������������0%����;58�����(���������������+������:��((%���-�:��������������0��/����%�:��((%���-�������������������(/�������0����!����4��(��=��������(����������(����0��=������=����=��������0���������������

!�����%=����0���������������������������� ���������(��������������2�������(������������������������������������������������(����0���:��(/:��(������������������:�������(���(����

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 62: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�������������

$���:����;58�����������(��������������������������������������=��4�����������%=�����������,��(���������������:������� �����������:�������������������������������������2�������������0���:������%��:����%(���:��������������������;58� ������0�+�������������������%(���:����������������0���:���������������������(�

�$$�� �

������������:���������=����0%��:���� ��������(��������������%������������������(������

34��(����:����%(���:���������������������������������� ����������=� �������������������0%�����������%�:���� ��������(������

�$$�� ��0�����

2��������������4�������:���������������������������� ��0%��:���� ��������(��������������(������

34��(����:����%(���:�����������������������1���������(�����#�/0���������� ���#��0��� ��0%����:�����

One or Two Bytes

D7 D0

Op Code

Op Code

One or Two Bytes

Low Order

High Order

Op Code

Op Code

Op Code

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 63: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����#���� �������������

2���;58������(������������0%��CALL��������������%��:�����������������(����D�����:������%��2�����������=� ���������:����������������=���������������::���������������(����D�����2����������:������������������������ ���������0%����(���:%������(����#�/0�������� ������������%���������0�����������������=���������������%�(����

'� ������������

������������������������0%���:�����:���� ��������(��������(���:%�����(��������:��������4�����(��������� �������(�������F��(������������2�����(������������������ �K����(���������0��������������������������:�����(�������:����:���� �������������

2����������:����������������������������� �F��(�������0%��������� ��������%���+������� ��0%���:������%�(�����!������(������=���������F��(�����0%�:���������(��������%(���:�F��(����������(��4���%��:��������(��������������2��=������������������9����:�����%�������������%�(������+���������2�����������(������������������0� ����@# "�����/# 5�:�����@ ��2������� �:�����������(���������:�@# 7���/# ��:�������F��(����������(����������������������F����������������������� �:����������0��������

One Byte

B7 B0

Op Code

Effective Address is(B5 B4 B3 000)2

Op Code

Op Code

Jump Relative (One Byte Op Code)8-Bit Two’s ComplementDisplacement Added to Address (A+2)

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 64: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

0��������������

34���������������(�������:��� ��0%���#��0����:���������0���������������������������2�����������0������������� �������(�����������F��(����������0����������� ���������(���������������

34�������������������+������:�����(���������F��(�:������%�����������������%�����%�������������=��������������������������%������%���������

6�������4�����������������=�(���:%�����������������������������:�����(�������2�����������nn����������������������������:������%���nn=� �����nn������#�/0��������(���:��������������������2��� ��0%���:�������nn�������������(���������������%����������2�������:����(���������� �%�������������������������� �������������������(���������������%����������!����4��(��=��' 88����:���������������:������%�����������# 88�

��������������

������%(���:���������=����0%���:�����:���� ��������(�����������������(��������������������������:���� ������4�������������(������(���:��� ���������4�����������������:������(�������������%��2����������:��������4����������������������0%�����(�������

����4��(����:��������4�������������������������������:���������%��������������4��������@�6�(����������������������������

Op CodeOne orTwo Bytes

Low Order Address to Low Order Operand

High Order Address to Low Order Operand

Op Code

Op Code

Displacement

Two Byte Op Code

Operand added to index registerto form a pointer to memory

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 65: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2�����(������������������ �K����(���������0��������4�����������������%���(��:���(�������������0����:�����0�������������4������������(�������������:���%��0����2 ������4������������(��������0���������%��:����(���������+����� �����������0��������4�������������������� �:����������0��������

2��� ������4��������������;58�������:�����������?������A��2��������������4������������������������C

(IX+d) or (IY+d)

1�������������(��������(���:�����:�������(�������2���(��������������������������������������(���������4�����������%�

'�������������

$��%��:����;58��(�������������0���:���:�����������(���:%� ��������������������0������:�������(������������4��(����:����������������������������������������������������������

�$%������������

��(����������������:������(������� ���������(����������������%���(�������������������������������������������(�����������4��(�����������:�����������(������� ����������������������� �%���(�������0���������������:���������

'��������������������

2���%(���:����������(���:�����#�/0�������������(�����������1�����0����������(����������%�����������������%��2���%(���:���������������%�(� ��:�������������������� �����������:��((��������

����4��(����:����%(���:��������������������������������� ���������������������%���������(��������0%����1��������������������4��������������������%���:�����:�������������������������

Op Code One or Two Bytes

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 66: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�4��(��������(���������������� �������4����������������������������������������� �:������%�(� ��:���0����(�������(�����������%��������2���0���-������������������������������;58������4�������:����%(���:���������� �������������������������������=������������=��������(���������0�����������2����������:�����������������������������������������(��(������������������������:������������������0�����������(�������!����4��(��=����%�0���(HL) (���:����������������:����HL��������������0����������(���������������%�����������:�����������������������������������(���:%�#�/0���(����������������=�����������������(����������� ���������(�������:�����(������ �����������������������������������%���������������0��������((���(�������:�����(������

*�����������

2���;58�������������������0����:�0���=����=�����������������2����������������� ���%������%�������������������������0��(���:����:�����0���(�������������������:������(����������������������������=���������������=���������4���� ����������0���������(������(���:%� ������:���������0������0������(������

���������������$��� �����

$��%��������������������������������(���������������������������������������������������=� ��%(���:������������%�0����(��%����!����4��(��=���������������������������������(���:%������������������������������������4��������������(���:%�������������

������������%�����

2��������������0��������:����;58��������������(��������0�������������(������:�������%��������������������:������0��=�����(����������������������������������������::�����������5858�������

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 67: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

������(�������������0�%����������������������������:��������������������������������(��������������������4�����������������9������0%���(��������+����� ����4���������� ��������0���0%���(��������+�����:������4�����������!��������������=��������������:������4���0����%�����(��������2�0�� #�

2���;58�������������������������:�����(����������D���=����=���� ���(���������������� ���������(����������(����������������(�����������������������������%��������������(�����=� ����������(���������������������������Logical�OR����������=�������(�������0%��������(����������������������������������� �����%�����(������������(�������0%� ���(���������������

� ���12�!�E�*�� -E�&��$ ������������ ��

!� *�� - &��$ �

0 = 0000 = 0

1 = 0001 = 1

2 = 0010 = 2

3 = 0011 = 3

4 = 0100 = 4

5 = 0101 = 5

6 = 0110 = 6

7 = 0111 = 7

8 = 1000 = 8

9 = 1001 = 9

A = 1010 = 10

B = 1011 = 11

C = 1100 = 12

D = 1101 = 13

E = 1110 = 14

F = 1111 = 15

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 68: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.� �� ���0��� ��

2�0�� ���:��������(������:����������5/0������������������(��������������;58���������������0����������0��������%(���:��������������:������������������2����������:����������:������������(�����D������� �������������������(���:������������:���������!����4��(��=���������������:�����������*��������(������48H������������:�����=�����(��������(���:���������4�����������������������48H��0100 1000�0����%���������:������0%��������:��������4�����������%��������$#����=��������=����������������������:���������������%�(��:������0%��������

2������0�%�������������������:����������������(����6=�:���� ���0%������������=�:���� ���0%������������6�6392=�9����3���.����������������0��������:�������������������(��0����!����4��(��=������������%��������������������������������������%�0����������������M��������������������%���������(��������0%��������1�� �������������:��������6��2����(������:�������(���������72��2������������:��������������������� LD��HL�=�D�

2���(������������������1�����������������������:�1��������������(���������������%�����������������;58�����������������������=����������������� �%������:��=� ������������:���� �����2���;58����0�%��������������:�����:��������:�(������������3���%��������������:����������������(������� ��������;58����������������%�����������

���2�0�� =������(�������������������0���������;58���� ��0%���2���:������������::�������������:������%�����D�����0������5/=�#5/=� )/=����' /0�����������������(��������������;58���:�������D���������������������������������������(��������������%������0�=� �������������0���������%�����D�������������������� ���:�4�������������D��������#��0��

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 69: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���32��4*���.� ��9��%�.&

6RXUFH

,PSOLHG �5HJLVWHU 5HJ�,QGLUHFW ��LQGH[HG ([W�$GGU� ,PPH�

Destination I 5� $ % �& ' (� ) / �+/�� �%&� �'(� �,;�G�� �O<�G�� ,QQ�� Q

Register A ED57

('�)

�) �� �� �$ �% �& �' �( �$ �$ )'�(G

''�(G

)'�$QQ

)'�(Q

B �� �� �� �� �� �� �� �� ''��G

)'��G

'''�Q

C �) �� �� �$ �% �& �' �( ''�(G

)'�(G

'''(Q

D �� �� �� �� �� �� �� �� ''��G

)'��G

''�%Q

E �) �� �� �$ �% �& �' �( ''�(G

)'�(G

''�(Q

H �� �� �� �� �� �� �� �� ''��G

)'��G

''�%Q

L �) �� �� �$ �% �& �' �( ''�(G

)'�(G

''��Q

RegIndirect

(HL) �� �� �� �� �� �� �� ''��'

(BC) ��

(DE) ��

INDEXED (IX+d) ''��G

''��G

''��G

''��G

''��G

''��G

''��G

''��GQ

(IY+d) )'��G

)'��G

)'��G

)'��G

)'��G

)'��G

)'��G

)'��GQ

EXT,ADDR

(nn) ��QQ

IMPLIED I ('��

R ('�)

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 70: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

���������������������������4������������:��������������������������������������������%���������0%���:������%� �����������0%��0����������(�����������!����4��(��=���������������3� �������(������(��������0%��?� �������::���:�@5��� ����C

LID E, (IX + 8)

2�������������+������:��������������%��C

2��� ���4�������������������������������������0%������������!����4��(��=���������������������������������� �������(��������������%����������!' 1��� ����C

LID A, (6F 32H)

����������������+�������C

.������������� �������(�������:�������������� �%����:����(������

2��������������������������:�������������/(��(���5/0������������� �/0%������������2������������������������1� ������������'�1��� ����C

LD H, 36H

�������+�������C

Op CodeAddress A

A+1

A+2

DD

5E

08 DisplacementOperand

Op CodeAddress A

A+1

A+2

3A

32

6F

Low Order Address

High Order Address

Op CodeAddress A

A+1 Operand

26

36

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 71: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

���������������%������������������4������������:�������������������������������������:��������������+�����:����0%���!����4��(��=

LD (IX - 15), 21H

�((�����C

.�������� �����%�����4�����������������(���������� �%�:���� �������%��:�������(������

2�0�� '�(���:������#�/0��������(��������2����4���������������:�����������������������(���������������������(�������(���:%���������-�(�������������PUSH�����POP�����������2������������:������������������PUSH�����POP��2������::���:���������#�/0������������������-�(������������������%����������������������������������0%����(������������(�((���:���������-���(������%��!����4��(��=������������ PUSH AF ����������0%����������� �������(�������:�F5H��6�������4������=�����+����������������C

Decrement SP

LD (SP), A

Decrement SP

LD (SP), F

2����4��������-��� ��((�����C

Op Code

One or Two Bytes

Address A

A+1

A+2

A+3

DD

36

F1

21Displacement (-15 in SignedTwo’s ComplementOperand to Load

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 72: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2���POP����������������4�����������:���PUSH������PUSH�����POP��������������D����#�/0���(������������������������0%������ �%�(�����:�������(�((������

PUSH BC is PUSH 8 then C

PUSH DE is PUSH D then E

PUSH HL is PUSH H then L

POP HL is POP L then H

2������������������4������������������������:��������������+����� ��0%���:�����:���� ��������(�������!����4��(��=

LD DE, 0659H

�((�����C

��������4�������������������4�������������������=������ �������0%���� �%��((����:����:�������(������

2�0�� )�������#�/0���4������������������(��������������;58���(������08H����� ����(������������ ����0� ������� ��(�����:������������:����������� �����D9H����� ����(������������ ����0� ���������(���������:��4��������/(��(�����������2�����(�������������%�����0%�������������������D���������������%���(��:��������4�����������������(������0��-�����0����������-�����%�:��������(���(��������

(SP)

(SP+1)

F

A

Top of stack

• •

Address A

A+1

E6

07

Op Code

Operand

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 73: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���:2�1B4*���.� ��9��%�.&E���"!� ������

Source

5HJLVWHU ,PP��([W� ([W��$GGU� 5HJ��,QGLU�

Register AF BC DE HL SP IX IY nn (nn) (SP)

AF P1

BC 01nn

ED4Bnn

C1

DE 11nn

ED5Bnn

D1

HL 21nn

2Ann

E1

SP F9 DDF9

FDF9

31nn

ED7Bnn

IX DD21nn

DD2Ann

DDE1

IY FD21nn

FD2Ann

FDE1

EXTADDR.

(nn) ED43nn

ED53nn

22nn

ED73nn

DD22nn

FD22nn

PUSH Instructions �

REG.IND.

(SP) F6 C6 D6 E6 DDE6

FDE6

NOTE: The Push & Pop instruction adjust the SP after every execution. �

POPInstructions

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 74: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

*���/�� ��#� ���" ��

2�0�� ���������4�����%�(� ��:���0���-����:�������������������������������(����� ���������������

HL points to the source location

DE points to the destination location

BC is a byte counter

�:������(��������������������D������������������=���%��:�����:���������������%�0�������2���LDI���������������������������������������0%��:���������������(��������0%�1���������������(��������0%�63���������(����1������63�������������������%������������������������%���(���������:���� �������������2���0%�����������������(����*������������������������������2�������������������0��� ����0���-��:��������0��������0�������%(���:�(��������������+������0� ���������������2���LDIR������=����������������(�������������������4�������:����LDI�����������2��������������������������(�����������(�������������0%�������������������������:�D�����2��=������������������������������%�0���-��:�����:��������������������%������

� ���A2�0��� ����07� ���077

�$%������������

�+H *�HE�&0HE� ���!.H !. �7 �8

IMPLIED AF 08

BC

DE D9

HL

DE EB

REG.IND.

(SP) E3 DDE3

FDE3

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 75: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

*������#�/0����������������=�����D���:����0���-�����0���(����)�I0%���#I N #8 )���������������0��������:������%�����������������%�����%���������������!���������=����0���-�����0��������((����0����������������������������������������������������������(����

2���LDD�����LDDR�����������������%�������������LDI�����LDIR��2������%���::�������������������(����1������63�����������������:�������%�������������0���-����:������:��������������������:�������������0���-���������������� ��

2�0�� ��(���:�������(������:������:����0���-�����������������2���:��=�CPI�����(���������������������(���������������������������� �������������:���������%���������(��������0%��������1���2���������:�������(�������������������:����:����0���������1���������(����������������������������0%�����������������(����*�����������������

2������������CPIR��������%�����4�������:����CPl������������� �����������(��������(�������������������������:�����������0%�����������������(����*���0������D�����2��=�������������������������������������������%�:�����%�5/0�����������

2���CPD�����(��������6�������������CPDR�����(���=�6�������=�������(�����������������������=���������%���::��������������%����������1���:�������%����(�����������%���������������%��������((��������������2����������������������������������������������%�0���-�

2����0���-����:����������(������������������4�����%�(� ��:���������������(��������((��������

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 76: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���<2�*���/�� ��#�9��%

9 ��������� "���

Reg. Indir. (DE) Reg. Indir.

(HL)

(ED)A0

LDI - Load (DE) ��(HL)Inc HL and DE, Dec BC

(ED)B0

LDIR, - Load (DE) �(HL)Inc HL and DE, Dec BC, Repeat until BC = 0

(ED)A8

LDD - Load (DE) � (HL)Inc HL and DE, Dec BC

(ED)B8

LDDR - Load (DE) � (HL)Dec HL and DE, Dec BC, Repeat until BC = 0

Note: Reg HL points to sourceReg DE points to destinationReg BC is byte counter

� ���B2�*���/�" ���9��%

" ���.�� ����

Reg. Indir.

(HL)

(ED)A1

CPIInc HL, Dec BC

(ED)B1

CPRI. Inc HL, Dec BCRepeat until) BC = 0 or find match

(ED)A9

WD Dec HL and BC

(ED)B9

CPDR Dec HL and BCRepeat until BC = 0 or find match

Note: HL points to location in memory to be compared with accumulator contentsBC Is byte counter

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 77: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����$���� ���.���� �

2�0�� "�����������5/0������������(��������������0��(��:������ ����������������=���������������������������INC����������������DEC�������������������������������=��4��(�INC�����DEC=����(���:����5/0���(���������(��:������0� ����������������������������������������������2���������:�����(���������(����������������������� �������4��(�����:����(�����CP���������������������������������������������(��������::������:���������������������:����(���:�����(��������INC�����DEC����������(���:%��������������������%�����������0�����������������������:����������&��������������(����������������������������4�������=������(�����������:���� �������%��&��������������������=�����������(������:���� �������%��!����4��(��=������������ AND�07H �C

������������������������������������������!'1=����������:�03H���(����������������������C

�����������0�:�����(������1111 0011�N�F3H

�(����� 0000 0111�N�07H

�����������������0000 0011�N�03H

2�����������������ADD��(��:������0����%�����0� ������������������������������������������������������������2���9�0�����SUB��(��:������0����%��0��������&����������� �������%���(���:���=��ADC��������9�0���� �������%��SBC�=������������%�:��������������������0��������(������%��2���:������������������F������������DAA��������;58����� �����������(�������:��C

• Multiprecision packed BCD numbers

• Multiprecision signed or unsigned binary numbers

• Multiprecision two’s complement signed numbers

Address A

A+1

E6

07

Op Code

Operand

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 78: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

������������������������(������������������AND�=�������������OR�=��4�����������XOR�=��������(�����CP��

!�����������/(��(����������������������(�����������������������������%�:�����2����:����������������2�0�� 5��2�������������F�����������������F��:����0��������� �������������=���-����*�6�����������(���������(����.������������ �:�������(����������:����.��������2���:���������:�����������������(������� �����0�����2���������������������NEG�����������:������� �K����(�������:�������0���������������������!�����%=��������������������%������������������������������;58�0����������(�����������0������%������������������������������������������������.6��:��������������� ������:�

2�0�� 7�����������#�/0������������(�������0� ����#�/0����������2���������:��������(��:������������������������ �������%������0���� �������%��ADC�����SBC��::����������:�����2���� ������(���(��:%�������������������(���������������#�/0������������(�������

� ���@2��4*�������$���� ���.����

6RXUFH

�5HJLVWHU�$GGUHVVLQJ 5HJ�,QGLU� ,QGH[HG ,PPHG�

A B C D E F L (HL) (IX+d) (lY+d) n

ADD 87 80 81 82 83 84 85 88 DD86d

FD86d

C6n

ADD W CARRY ADC

8F 88 89 8A 8B 8C 8D 8E DD8Ed

FD8Ed

CEn

SUBTRACTSUB

97 90 91 92 93 94 95 96 DD96d

FD96d

D6n

SUB w CARRSBC

9F 98 99 9A 9B 9C 9D 9E DD9Ed

FD9Ed

DEn

AND A7 A0 A1 A2 A3 A4 A5 A6 DDA6d

FDA6d

E6n

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 79: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

XOR AF A8 A9 AA AB AC AD AE DDAEd

FDAEd

EEn

OR B7 B0 B1 B2 B3 B4 B5 B6 DDB6d

FDB6d

F6n

COMPARECP

BF B8 B9 BA BB BC BD BE DDBEd

FDBEd

FEn

INCREMENTINC

3C 04 0C 14 1C 24 2C 34 DD34d

FD34d

DECREMENTDEC

3D 05 0D 15 1D 25 2D 35 DD35d

FD35d

� ����2�9� �4��%����+��% ����

Decimal Adjust Acc, DAA 27

Complement Acc, CPL 2F

Negate Acc, NEG(2’s complement

ED44

Complement Carry Flag, CCF 3F

Set Carry Flag, SCF 37

� ���@2��4*�������$���� ���.����

6RXUFH

�5HJLVWHU�$GGUHVVLQJ 5HJ�,QGLU� ,QGH[HG ,PPHG�

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 80: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

'�� �� ���"��#�

����F���:�������:����;58���������������:���������������������=���%��������/(��(���������=������%������%����������������������������:��(������������(��������!����� #8���������������������;58����������������������������:��(��������2�����(�������������:�������� �����������:��((�����������������������������(���������������������2 ��*�6���������������������RRD�����RLD������ ���������������������������0�������� ������ �����������������%���������(��������0%��������(����1���9���!����� #8���2����������������� �:����::������*�6����������

� ���D2�1B4*�������$���

"���

BC DE HL SP IX IY

Destination HL 09 19 29 39

ADD IX DD09

DD19

DD39

DD29

IY FD09

FD19

FD39

FD29

ADD with carry and set flags ADC

HL ED4A

ED5A

ED6A

ED7A

SUB with carry and set flags SBC

HL ED42

ED52

ED62

ED72

Increment INC 03 13 23 33 DD23

FD23

Decrement DEC DB 1B 2B 3B DD2B

FD2B

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 81: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

*���� ��%�� ����

2����0���%����=����=������������������0����������������������%������������������������������%�(��������2����0����%�0��:����������������/(��(����: ����������=������������:��4�������������

� ���1�2�'�� ��� ���"��#��

6RXUFH

Type ofRotateShift

A B C D E F L (HL) (IX+d) (lY+d) A

RCL CB07

CB00

CB01

CB02

CB03

CB04

CB06

CB0E

DDCBd06

FDCBd06

RLCA D7

RRC CB0F

CB08

CB09

CB0A

CB06

CB0C

CB0D

CB0E

DDCBd0E

FDCBd0E

RRCA 0F

RL CB17

CB10

CB11

CB12

CB13

CB14

CB15

CB16

DDCBd16

FDCBd16

RLA 17

RR CB1F

CB18

CB19

CB1A

CB1B

CB1C

CB1D

CB1E

DDCBd1E

FDCBd1E

RRA 1F

SLA CB27

CB20

CB21

CB22

CB23

CB24

CB25

CB26

DDCBd26

FDCBd26

SRA CB2F

CB28

CB29

CB2A

CB2B

CB2C

CB2D

CB2E

DDCBd2E

FDCBd2E

SRL CB3F

CB38

CB39

CB3A

CB3B

CB3C

CB3D

CB3E

DDCBd3E

FDCBd3E

ED6F

ED67

CY

CY

0

ACC

ACC

RotateLeft Circular

RotateRight Circular

RotateLeft

RotateRight

ShiftLeft Arithmetic

ShiftRight Arithmetic

ShiftRight Logical

(HL)

(HL)

b7 b0

b7-b4 b3-b0b3-b0

RotateDigitRight

RotateDigitLeft

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 82: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

��������=��������(��-������������%��������=���-���������%�����D�����������::������

2���;58������=����=��������%�0������������������=���%��������/(��(���������������%������%��������� ���������������������2�0�� ##������� )8�����������������������0���:������(��(������������������������(���:%��������������������%��������/(��(������������� ���������(�����������0��(��:������������������������������4����������������������0������(���������4�����������%����������*�����(������������;����:�����;���:��������0������D�����

I�$%E�� ��E� ���'���

2�0�� # �����������F��(=�����=����������������������(��������������;58��������F��(�����0�����������(������� ��������(����������������������� ������#�/0����������(���:����0%������:���������������0���������������������������34�����=��������=���������������������.�����������F��(�����(���������������������������0��(���:����0�:�������F��(����������:�����������������������=����(������������%��������� ��������4��+�����������������2����������������������(����������������������:������������2�������������4�����������������������F��(�����%��������������������%��2��������������+����������0%��� ����(���:%����#�/0��������� �������� �������������0%��:��=�:���� ���0%���������������������0%��

!����4��(��=�����������������F��(��������%���������3E32H��C

2�����������F��(����������������%� ��0%�=����������0%������������ �K����(��������(��������:��������4���������2�����(������������0���������������:�@# 7���/# ����������������:��������������:��������������(������

Op CodeAddress A

A+1

A+2

C3

32

3E

Low Order Address

High Order Address

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 83: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2�����%(���:����������������F��(�������������������2�������������������(��������0%�������������������(����1����������:��������4��������#?�����A�������%������������2���:���������� �:���(�������F��(���0����:��������:�(������������������

�����������(������:�����:���F��(� ���������������:����0%��:���� �����������������������(��������������-�0�:�������F��(���������������������������������������:��������0��������������������(��:������-���(�((���������%�������������:������F��(��������2������������������������������� �:�����(����0�����������������(�����������2 ��(����������������������������������������;58�:����%��:����(������2���������:����������(�����������RETI���������������:���������-�0���������(��RETN�������������������������������������������������������������(������C9H��2�����::�������������RETI������0����������������:����������(����������������;58�(���(���������(��������D������4��������:�������������:���(��(�����������:������(�����%�������(�����������2�����������=����(���� ������;58�(���(���������������(���������=���(��:�������������������:���������������(��&��������:�����=����:���� �����: �����+��������������%�����:�������������(�����������������������(�������������(����C

2��������0%���+����������0����(������ ����������0%��EI����������������� ��0%��RETI����������������;58��2�������(�����0������������(�������������:������0��������D���

Disable Interrupt Prevent interrupt before routine is exited.

LD A, n Notify peripheral that service

OUT n, A routine is complete.

Enable Interrupt

Return

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 84: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���112�*���� ��%�� �����9��%�

5HJLVWHU�$GGUHVVLQJ 5HJ��,QGLU� ,QGH[HG

A 8 C D E H L (HL) (IX+d) (IY+d)

Bit DD FD

TestBit

0 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

47 40 41 42 43 44 45 46 d d

46 46

DD FD

1 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

4F 48 49 4A 48 4C 4D 4E d d

4E 4E

DD FD

2 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

57 50 51 52 53 54 55 56 d d

56 56

DD FD

3 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

5F 58 59 5A 5B 5C 5D 5E d d

46 46

DD FD

4 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

67 60 61 62 63 64 65 66 d d

66 66

DD FD

5 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

6F 68 69 6A 68 6C 6D 6E d d

6E 6E

DD FD

6 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

77 70 71 72 73 74 75 76 d d

76 76

DD DD

7 C8 C8 C8 C8 C8 C8 CS C8 C8 C8

7F 78 79 7A 78 7C 7D 7E d d

46 46

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 85: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

RestBitRES

DD FD

0 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

87 80 81 82 83 84 85 86 d d

86 86

DD FD

1 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

8F 88 89 8A 88 8C 8D 8E d d

8E 8E

DD FD

2 C8 C8 CS C8 C8 C8 C8 C8 C8 C8

97 90 91 92 93 94 95 96 d d

96 96

DD FD

3 C8 C8 C8 C8 CS C8 C8 C8 C8 C8

9F 98 99 9A 98 90 90 9E d d

9E 9E

DD FD

4 C8 C8 C8 C8 C6 C8 C8 C8 C8 C8

A7 AO AI A2 A3 A4 A5 A6 d d

A6 A6

DD FD

5 C8 C8 C8 C8 08 C8 C8 C8 C8 C8

AF A8 A9 AA AB AC AD AE d d

AE AE

DD FD

6 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

B7 B0 B1 82 B3 B4 B5 B6 d d

B6 B6

DD DD

7 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

BF B8 89 8A B8 8C BD 9E d d

BE BE

� ���112�*���� ��%�� �����9��%��5��������6

5HJLVWHU�$GGUHVVLQJ 5HJ��,QGLU� ,QGH[HG

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 86: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

SetBitSET

DD FD

0 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

C7 C0 C1 C2 C3 C4 C5 C6 d d

C6 C6

DD FD

1 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

CF C8 C9 CA C8 CC CD CE d d

CE CE

DD FD

2 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

D7 DO D1 D2 D3 D4 DS D6 d d

D6 D6

DD FD

3 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

DF D8 09 DA DS DC DD DE d d

DE DE

DD FD

4 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

E7 E0 E1 E2 E3 E4 E5 E6 d d

E6 E6

DD FD

5 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

EF E8 E9 EA EB EC ED EE d d

EE EE

DD FD

6 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

F7 FO F1 F2 F3 F4 FS F6 d d

F6 F6

DD FD

7 C8 C8 C8 C8 C8 C8 C8 C8 C8 C8

FF F8 F9 FA FB FC FD FE d d

FE FE

� ���112�*���� ��%�� �����9��%��5��������6

5HJLVWHU�$GGUHVVLQJ 5HJ��,QGLU� ,QGH[HG

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 87: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2������������DJNZ���������:��������(����������(���������2��� ��0%�=���������F��(����������������������*���������������F��(��������:����*��������������0�����������������D�����2�������������(�����������4(��������������� �K����(���������0��������(����4��(����:�������C

� ���132�I�$%E�� ��E� ���'����9��%

&RQGLWLRQ

Un-Cond.

Carry NonCarry

Zero NonZero

ParityEven

ParityOdd

SignNeg

SignPos

RegB�0

JUMP JP IMMED.EXT.

nn C3nn

D8nn

D2nn

CAnn

C2nn

EAnn

E2nn

FAnn

F2nn

JUMP JR RELATIVE PC+e 18e-2

38e-2

30e-2

28e-2

20e-2

JUMP JP RegisterINDIR.

(HL) EB

(IX) DDE9

(IY) FDE9

CALL IMMED.EXT.

nn CDnn

DCnn

D4nn

CCnn

C4nn

ECnn

E4nn

FCnn

F4nn

Decrement B, Jump If Non Zero DJNZ

RELATIVE PC+e 10e-2

Return RE REGISTERINDIR.

(SP)(SP+1)

C9 D8 D0 C8 C0 E8 E0 F8 F0

Return FromINT RETI

ED4D

Return FromNon MaskableINT RETN

ED45

����� ���������� ��$$���

N, N+1 LD B, 7 : set B register to count of 7

N+2 to N+9 (Perform a sequence of instructions) : loop to be performed 7 times

N+10,N+11 DJNZ -8 : to jump from N+12 to N+2

N + 12 (Next Instruction)

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 88: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

2�0�� #'�������������(������:���������������������2����������������������0%�����������%��:����������������������2�����(������������:�����������������������������2����������������:���:���:��+����%/�����������0�����������%������(������������D���

��%��;���%��

2���;58��������4���������:���(��������(��������������� �����2�0�� #)�����2�0�� #���2�������������:������(�������(�������������0���������0����������������������=�����������������������������������������������������=���������0�����:������0� ��������,���������������%��:������������������������������=������0���-����:�����������������0������(���������2����������������������������������%�0���-����:����4��(������%�����������(����1��:�����(����������������%����������(��������������������������(����������� ������������*�����������0%����������������������������������:����(���:��� ����������(�������(��������������+�������*�������������*��������0����������=�����,��0���-����:�������������������(��� ���0%��

� ���1:2�'�� ��9��%

�%����

CALL Address

0000H C7 RST 0

0008H CF RST 8

0010H D7 RST 16

0018H DF RST 24

0020H E7 RST 32

0028H EF RST 40

0030H F7 RST 48

0038H FF RST 56

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 89: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

���������������IN�A=�����OUT�n=�A=�����,������������������((������������ ������:��:����������0����"/�8�� ������������������������������:�������������((������:��:����������0���������������������������(����(����������=�����������0���-��,�����:��=�����������:���������������:������������� ������:��:����������0����������������� ���������������:��������*������:������������((������:��:����������0��

�����������9��%

2�0�� #��������������4��������/(��(������������������������2���NOP�������/�����������������2���HALT�����������(���������(���������������0�+����������(�����������=� ��������DI�����E1��������������-�����������0���������(��2��������������(���������������������������%��:���������������0���������(���(�����������:���� ���:�$����8����=����������(����������������������%��������������������0���������� �����������4��������$����#�������(��:��������� ����������������������%��4�������������RST������������0038H����������4���������� ��������+�������������������������(��������������-���$���� ���������(� ��:���0������������ �:�����������������������%�����������������%��&����������=��������:������#�/0�������%������� ���������((��������0����������������:������������������� ��������0�������((�����0%����������(������������2���������(���������:����:� ���+�������0%��������0��� ���������������:����������������������������2�����������������%��0�����������������������(��:������CALL���������������������

Pointer to Interrupt Table,

Address of InterruptService Routine

Register I is Upper Address,Peripheral SuppliesLower Address

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 90: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���1A2���%���9��%

�$$�2'��������2

(n) (c)

InputDestination

Input IN RegisterAddress

A DBn

ED7B

B ED40

C ED48

D ED50

E ED58

H ED60

L ED68

INI - input &inc HL, Dec B

RegisterIndir

(HL) EDA2

Block InputCommandsINIR - INP, Inc HL,

Dec B, repeat IF B�0EDB2

IND - input & IncDec HL, Dec B

EDAA

INDR - input, Dec HL,Dec B, repeat IF B�0

EDBA

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 91: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� ���1<2��4*�������$���� ���.����

"���

Register Register Indir.A B C D E H L (HL)

11OUT Immed.

(n) D3n

RegInd.

(c) ED79

ED41

ED49

ED51

ED59

ED61

ED69

11OUT - outputinc HL, dec B

EDA3

BlockOutputCommand11OUT - output

dec B, repeat if B�0EDB3

11OUT - outputdec HL and B

EDAB

11OUTDR - output, dec HL and B, repeat IF B�0

EDBB

PortDestinationAddress

� ���1B2������� ���������������

NOP 00HALT 76Disable INT (EI) F3Enable INT (EI) FBSet INT mode 0IM0

ED46

8080A mode

Set INT mode 1IM1

ED56

Call to location 0038H

Set INT mode 2IM2

ED5E

indirect call using register I and Bbits from INTER device as a pointer

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 92: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

/0))*))�#)�)� �*)��8/�3����������9 ���&����

Page 93: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

� !��������� �����

�������$��-�. ��� �

2������0�%�������������� ���������� ������(������� �������������:��������%����������������������������:�����������%�0�������������������:%������%�����������������������������(�����������(�����������(��������������������0����%�0�������������������(�������������������(������������(��������������:%�����(���������%�(����:����������0�+���������������(������:���� ��������������������(������������������=�������=�����������������2������0�%�������������������������0�����������������((�����������������������������(����/�(=�:����4��(��=�����������������������������������������������=�0��������������(����������������������������������0�%�(�����

��(������� �����������0�%���������������������������(������=� �����������:�%�0���������������������������3������������ ���������������������������%�������:�:����������:���������C�����0���:����=�����(�������:����=�����(������:����=��������������:������2���������(���������(�������0%�������0�������0�����������������������(���������0F���(���������������0���4������������%�0%����;58�����

;���<�(�����������������0���������::���������:�������::������*����0����������������0������0��������������0��� ������6�����(��������$����/���(����9%����2����0��������0������������������0����������: �����(������������#�I������%�(���=� ���������������������0������(����:��������������������(������������' I������%�(����

/0))*))�#)�)� �*)�3����������� �

Page 94: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

����"� ��������� ���+� ��

2���:������������!�����!B���((�%���:������������������0����������:����;58�����%������������2���0��(������:��������:�����������0��� C

3�����:���� ��:��������������������0���:������:����������������������������0%������(���������*��'��������������������!�����:�����0����=��,J=�;=�����9����%�0������:������ ��������������JUMP=�CALL=����RETURN�����������2 ��:������%����0�������1=�.��������������:���*�6����������

� -�+� �

2�������%�!�������������������������(��������������(�������(��:�������!���ADD���������������������������%=�����SUB�����������������������*���� =��������%�!�������2�������%�!����������0%����ADD����������������������������������%=�����0%���SUB������������������������������*���� ��2������������%�:���������: �����������

@ B < A : 3 1 �

S Z X N X P/V N C

"-$��� +����) $

C Carry Flag

N Add/Subtract

P/V Parity/Overflow Flag

H Half Carry Flag

Z Zero Flag

S Sign Flag

X Not Used

/0))*))�#)�)� �*)�3����������� �

Page 95: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

:����4������(���������������������=����DAA�������������������%�!�����:�������������:�����-�����������������F������������

!������������RLA= RRA=�RLS=�����RRS=��������%�0���������������-�0� ���������������:�����0%����9*�������������:�����0%���$9*��:�����%����������������%����������6���������������RLCA=�RLC=�����SLA=��������%����������������������:�������:�*��"��:���%����������������%����������6���������������RRCA=�RRC=�SRA=�����SRL=��������%����������������������:�������:�*��0��:���%����������������%���������

!�����������������������AND=�OR=�����XOR=��������%�������

2�������%�!������������0����0%����9������%�!�����SCF���������(��������0%�������(����������%�!�����CCF�����������

���;"��� ���+� �

2������,9�0����!�����.��������0%����Decimal�Adjust�Accumulator�����������6���������������0� ����ADD�����SUB�����������!���ADD���������=�.�������������8��!���9�*���������=�.�������#�

���;"��� ���+� ��

2���Decimal�Adjust�Accumulator�����������DAA��������:���������������0� ����ADD�����SUBTRACT�����������!�������ADD���������=�.�����8��!�������SUBTRACT���������=�.�����#�

� ��-;��#�� �+� ��5�;,6

2���:������������(���:��������(��������������(�������(��:������

!�������������(������=����:�������������������:�� ���������� �����������������������������������������������4�����(��0������0���

/0))*))�#)�)� �*)�3����������� �

Page 96: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�+127�������������������������(��0������0����O128���2�������:�� ����������������������0%��4���������������0���:�����(������

!����������=��(������ �����::������������������������:�� ��&������������(������ �����-�������������������������::��������=��������:�� �!�������=�:����4��(��C

2��� �����0�������������������������������0�������4�����+127�������� ��(�������(����������������������������������0����/95�=� �����������������2�������:�� �!����������:������

!����0������=�����:�� �����������:����(�������:�����-��������(�������:���-���������������������:�� ��!����4��(��C

2��������������������������:������������������������=����������������������::������������:�� �����

�������������:��������:%�����������:�� ������0������������%�����������:��������0����:��������������%���������������%���=�����:���������������%��������������%���=���������:�� �������������

2���:�������������� ������������(����������������������������������������������(���%���3�����2������0����:�1�0�������0%���������������:�������������=��66�(���%���:����������N�0����:����������3���=�3J3.�(���%���:����������N�1��

6����������������������CPI=�CPIR=�CPD=�CPDR������0���-����:�������������LDI=�LDIR=�LDD=�LDDR�=�����,J�!������������������:����

+120 = 0111 1000 ADDEND

+105 = 0110 1001 AUGEND

+225 = 1110 0001 (-95) SUM

+127 0111 1111 MINUEND

(-) -64 1100 0000 SUBTRAHEND

+191 1011 1111 DIFFERENCE

/0))*))�#)�)� �*)�3����������� �

Page 97: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

*%���������������BC���&���������������=��:����0%��������������������0=����:����������������0=����� ������:���������1�

6������LD�A,�I�����LD�A,�R���������=�����,J�!�������� �������������:����������(����0���:��(/:��(��IFF2��:�����������������

&������(�������0%��:��������,��������� ������IN r=��C�=���������=�����,J�!��������F���������������������(���%�

! �#�� -�+� ��

2���1��:/����%�!�����1�������1��������������0����(�����������������%�����*���� ����0� ����*��'�����)��:����5/0������������(��������2���:����������0%����Decimal�Adjust�Accumulator�����������DAA��������������������:���(��-���*�6���������0�����(��������2���1�!���������1��������������0�����������������:���� �����0��C

���+� ��

2���;����!�����;�������#��������������8���:������������������0%�����4��������:�������������������8�

!���5/0������������������������(������=����;�:������������1��:������������0%���������������������0���:����0%�������0=����;�:������������0�

!������(�����9���������������=����;�:����������1��:������������������������������+��������������������������%������������������0%�����������:�����������(����1��

&�����������0����������������������%��������=����;�:�����������������(������������:�������������0������P*��0=�Q��

!�+� � ��� "��� ��

1 A Carry occurs from Bit 3 to Bit 4 A Borrow from Bit 4 occurs

0 No Carry occurs from Bit 3 to Bit 4 No Borrow from Bit 4 occurs

/0))*))�#)�)� �*)�3����������� �

Page 98: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

&������(����������(�������0%��0� �����������%�����������������,����������INI=�IND=�OUTI=�����OUTD�=��:����������:����������������B����������0=����;�:������1=����� ������;�:������0������:���0%����(��:�����,��������������IN r=��C�=����;�:��������������������8/0%����(��

"����+� ��

2���9����!�����9�������������:������/����:�����0���:����������������0��"���&�������;58�(��:��������������(�������������������0��=����0����%� �/���(�����������������������(���������(���������������:�����������(���������0����������:����0%���0����*��"���������������0����������:����0%���#��2���0����%��+���������:��������������:���(���������0�������������0��8�����:����������������:�:����0���127���������������0�������(�������0%���� �����(�������:�����+��������(���������0����2�������������:��������������0�����:����O1 � O128�

&������(�������0%��:��������,�����������������������������.��=�������������=����9�!������������������(�������9�N�8��������������9�N�#������

���������������&���%����

34������������3�2���:���������������������������������������:������������)�$1D�����-��2�������������%�����$��������������� �����������-�(�������2�9����������������������������0����:�2�9���:��������$��%�����!����4��(��C

$��%���C� 2�9��C�"�)='��)�$1D3�2�C�#�"�

�����������������������������:� ����������%�����2���:����%�����������)�����-�(�������2�9�����2����������%�����������'�����-�(������:����������:�"�����-�(���������2�9����2�������������4��������#�"�������������

�������:����������������:����������������� ��������/����:�����0���������:�����������/����:�����0������������

/0))*))�#)�)� �*)�3����������� �

Page 99: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

�4*���.� ��9��%

.&�E�H

������ �� �=����B

����� �� �6

��� ��� �=��B

!�"����� �� 2����������:���%���������B����������������%�����������������=��B������:�����%��:������������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� E��A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� �!��02�21 4 1.0

�� ���� �#����$%%"� ��.���

&��'���� �:����1���������������������0���8AH=��������3���������������10H=�������������LD�H=�E ��������0��������������������10H�

0 1 r r�

/0))*))�#)�)� �*)�3����������� �

Page 100: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�E�

������ �� �����

����� �� �6

��� ��� �=��

!�"����� �� 2���5/0������������������������%���������=� ������������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� ���4��������:�LD�E=�A5H ����������:��������3�����A5H�

0 0 r 1 01

n

/0))*))�#)�)� �*)�3����������� �

Page 101: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�E�5!.6

������ �� �����1��

����� �� �6

��� ��� �=��1��

!�"����� �� 2���5/0���������:������%����������1������������������������=� ������������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������(����1���������������0���75A1H=����������%�������"��#1��������0%���51=�����4��������:�LD�C=�(HL) ��������58H�������������

0 1 r 1 01

/0))*))�#)�)� �*)�3����������� �

Page 102: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�E�5�7J�6

������ �� ������?@��

����� �� �6

��� ��� �=���?@��

!�"����� �� 2����(��������?@��=������������:��������4���������?������� ����� �K����(��������(�������������������������������������=� ������������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?��������������0���25AFH=�������������LD�B, (IX+19H) ��������������������:�������25AFH�@�19H=� �����(�����������%���������25C8H���:�����������������0%��39H=����������������������������*���������������39H�

d

0 1 r 1 01

1 1 1 0 110 1 DD

/0))*))�#)�)� �*)�3����������� �

Page 103: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�E�5�8J�6

������ �� ������A@6�

����� �� �6

��� ��� �=���A@��

!�"����� �� 2����(��������A@��������������:��������4���������A������� ����� �K����(��������(��������������������������������������=� ������������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������A��������������0��� ��!1=�������������LD B=�(IY+19H) ��������������������:�������25AFH�@�19H=� �����(�����������%���������25C8H���:�����������������0%��39H=����������������������������*���������������39H�

d

0 1 r 1 01

1 1 1 1 111 1 FD

/0))*))�#)�)� �*)�3����������� �

Page 104: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5!.6E�

������ �� �1������

����� �� �6

��� ��� �1��=��

!�"����� �� 2����������:�������������������������������%���������(���:����0%�����������:����1���������(�����2���%�0����������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(����1��(���:��������%���������2146H=��������*���������������0%��29H=����4��������:�LD�(HL)=�B �����%�������2146H������������29H�

0 1 1 r1 0

/0))*))�#)�)� �*)�3����������� �

Page 105: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5�7J�6E�

������ �� ��?@������

����� �� �6

��� ��� ��?@��=��

!�"����� �� 2����������:�������������������������������%�������(���:����0%�����������:�����4���������?������� ����=��� �K����(��������(����������������2���%�0����������:�����������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������������������0%��1CH=������������4���������?��������3100H=�����������������LID�(IX+6H)=�C (��:����������3100H�@�6H����������1CH��������%���������3106H�

d

1 1 1 0 110 1 DD

0 1 1 r1 0

/0))*))�#)�)� �*)�3����������� �

Page 106: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

/0))*))�#)�)� �*)�3����������� �

.&�5�8J�6E�

������ �� ��A@������

����� �� �6

��� ��� ��A@��=��

!�"����� �� 2����������:������������������������������%�������(���:����0%��������:�����������:��������4���������A������=��� �K����(��������(����������������2���%�0�������(���:�������������������:���� �����0���

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������������������0%��48H=������������4���������A��������2A11H=�����������������LD�(IY+4H)=�C (��:����������2A11H�@�4H=����������48H��������%���������2A15�

d

1 1 1 0 111 1 FD

0 1 1 r1 0

Page 107: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5!.6E��

������ �� �1������

����� �� �6

��� ��� �1��=��

!�"����� �� �������n��������������������%�������(���:����0%�����������:����1���������(����

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:����1���������(�����������4444H=������������ LD (HL), 28H ����������������%���������4444H�����������0%��28H�

n

0 0 1 1 011 0 36

/0))*))�#)�)� �*)�3����������� �

Page 108: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5�7J�6E��

������ �� ��?@������

����� �� �6

��� ��� ��?@��=��

!�"����� �� 2���n��(�������������������������%�������(���:����0%��������:��������4���������?�������� �K����(��������(���������(��������

���-��� ��"� �� A��!��02�25 19 (4, 4, 3,5,3) 4.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?��������������0���219AH=������������ LD�(IX+5H)=�5AH ��������0%��5AH������������%�������219FH�

d

1 1 1 0 110 1 DD

n

0 0 1 1 011 0 36

/0))*))�#)�)� �*)�3����������� �

Page 109: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5�8J�6E��

������ �� ��A@������

����� �� �6

��� ��� ��A@��=��

!�"����� �� ����������������������������%���������(���:����0%�����������:��������4�������������� ������ �K����(��������(�����������������

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������A��������������0���A940H=������������ LD�(IY+10H)=�97H ��������0%��97H���������%���������A950H�

d

1 1 1 0 111 1 FD

n

0 0 1 1 011 0 36

/0))*))�#)�)� �*)�3����������� �

Page 110: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&��E�5*�6

������ �� �����*��

����� �� �6

��� ��� �=��*��

!�"����� �� 2����������:���������%���������(���:����0%�����������:����*���������(�������������������������������

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:����*���������(�����������������0���4747H=����������%�������4747H��������0%��12H=���������������� LD�A=�(BC) ��������0%��12H�������������

0 0 0 1 000 1 0A

/0))*))�#)�)� �*)�3����������� �

Page 111: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&��E�5&06

������ �� �����63�

����� �� �6

��� ��� �=��63�

!�"����� �� 2����������:���������%���������(���:����0%�����������(����63����������������������������

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:����63��������(�����������������0���30A2H����������%�������30A2H��������0%��22H=���������������� LD�A=�(DE) ��������0%��22H�������������

0 0 1 1 000 1 1A

/0))*))�#)�)� �*)�3����������� �

Page 112: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&��E�5��6

������ �� ��������

����� �� �6

��� ��� �=�����

!�"����� �� 2����������:���������%���������(���:����0%�����(������nn�����������������������������2���:���n��(�������:�������(������������� �������0%���:��� /0%�������%�������

���-��� ��"� �� A��!��02�24 13 (4, 3, 3, 3) 3.25

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�nn������0���8832H=���������������:������%�������8832H���0%��04H=������������LD�A=�(nn)�0%��04H��������������������

n

0 0 1 1 001 1 3A

n

/0))*))�#)�)� �*)�3����������� �

Page 113: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5*�6E��

������ �� �*������

����� �� �6

��� ��� �*��=��

!�"����� �� 2����������:������������������������������������%���������(���:����0%�����������:�����������(����*��

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:����������������������7AH��������*���������(�����������1212H�������������LD�(BC)=�A ��������7AH���������%���������1212H�

0 0 0 1 000 0 02

/0))*))�#)�)� �*)�3����������� �

Page 114: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5&06E��

������ �� �63�����

����� �� �6

��� ��� �63�=��

!�"����� �� 2����������:������������������������������������%���������(���:����0%�����������:����63��������(����

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(����63�����1128H=��������������������������0%��A0H=�������������LD�(DE),�A ��������A0H���������%���������1128H�

0 0 1 1 000 0 12

/0))*))�#)�)� �*)�3����������� �

Page 115: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&�5��6E��

������ �� ��������

����� �� �6

��� ��� ����=��

!�"����� �� 2����������:������������������������������������%�������(���:����0%�����(������nn��2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�24 13 (4, 3, 3, 3) 3.25

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�������������������0%��D7H=����4��������: LD�(3141�H)=�AD7H �������������%���������3141H�

n

0 0 1 1 001 0 32

n

/0))*))�#)�)� �*)�3����������� �

Page 116: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&��E��

������ �� ����#

����� �� �6

��� ��� �=��

!�"����� �� 2����������:����������(�J�����������������������������������������

���-��� ��"� �� �!��02�22 9 (4, 5) 2.25

�� ���� �#����$%%"� ��

9������:��/����������������M��������� ��

;������:��/���������D���M��������� ��

1������

�,J���������������:��!!

.������

��������::����

If an interrupt occurs during execution of this instruction, the Parity flag contains a 0.

1 1 0 0 111 1 ED

0 1 1 1 110 0 57

/0))*))�#)�)� �*)�3����������� �

Page 117: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

��

.&��E�'

������ �� �=����

����� �� �6

��� ��� �=��

!�"����� �� 2����������:�$����%���:����������������������������������������

���-��� ��"� �� �!��02�22 9 (4, 5) 2.25

�� ���� �#����$%%"� ��

9������:=��/����������������M��������� ��

;������:��/���������D���M��������� ��

1������

�,J���������������:��!!

.������

��������::����

If an interrupt occurs during execution of this instruction, the parity flag contains a 0.

1 1 0 0 111 1 ED

0 1 1 1 110 1 5F

/0))*))�#)�)� �*)�3����������� �

Page 118: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&��E�

������ �� �����

����� �� �6

��� ��� �=��

!�"����� �� 2����������:�������������������������������������(��������J�����������=���

���-��� ��"� �� �!��02�22 9 (4, 5) 2.25

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 0 1 110 0 47

/0))*))�#)�)� �*)�3����������� �

Page 119: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�'E��

������ �� �����

����� �� �6

��� ��� �=��

!�"����� �� 2����������:�������������������������������$����%���:�������������

���-��� ��"� �� �!��02�22 9 (4, 5) 2.25

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 0 1 110 1 4F

/0))*))�#)�)� �*)�3����������� �

Page 120: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

1B4*���.� ��9��%

.&���E���

������ �� �������

����� �� �6

��� ��� ��=���

!�"����� �� 2��� /0%���������nn���������������dd��������(���=� ����������:�������*�=�63=�1�=����9���������(���=����0������:���� ��������0F�������C

� � ��BC 00DE 01HL 10SP 11

2���:���n��(�������:�������(������������� �������0%��

���-��� ��"� �� A��!��02�22 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� ���4��������:�LD�HL=�5000H ����������:����1���������(������5000H�

n

0 0 d 0 10d 0

n

/0))*))�#)�)� �*)�3����������� �

Page 121: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&��7E���

������ �� �4�����

����� �� �6

��� ��� �?=���

!�"����� �� �������nn�������������������4���������?��2���:���n��(�������:�������(������������� �������0%��

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� �����������LD�IX=�45A2H �������4����������������������45A2H�

1 1 1 0 110 1 DD

0 0 0 0 101 0 21

n

n

/0))*))�#)�)� �*)�3����������� �

Page 122: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&��8E���

������ �� �A�����

����� �� �6

��� ��� �A=���

!�"����� �� �������nn�������������������4���������A��2���:���n��(�������:�������(������������� �������0%��

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� �����������LD�IY=�7733H �������4���������A������������������7733H�

1 1 1 0 111 1 FD

0 0 0 0 101 0 21

n

n

/0))*))�#)�)� �*)�3����������� �

Page 123: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�!.E�5��6

������ �� 1������@#�=���������

����� �� �6

��� ��� 1�=�����

!�"����� �� 2����������:������%��������nn�������������������� �������(�������:��������(����1������������=���������������:������4������������%��������nn@#�����������������������������(�������:�1����������1���2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�25 16 (4, 3, 3, 3, 3) 4.00

�� ���� �#����$%%"� ��.���

&��'���� �:�������4545H��������37H=�����������4546H��������A1H=������������LD�HL=�(4545H) ���1���������(�����������A137H�

0 0 0 1 001 1 2A

n

n

/0))*))�#)�)� �*)�3����������� �

Page 124: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&���E�5��6

������ �� ���������@#������������

����� �� �6

��� ��� ��=�����

!�"����� �� 2����������:��������nn�������������������� �������(�������:��������(������=���������������:������4������������%��������nn@#�����������������������������(�������:������������(���������:����*�=�63=�1�=����9���������(���=����0������:���� ��������0F�������C

� � ��BC 00DE 01HL 10SP 11

2���:���n��(�������:�������(������������� �������0%���:��nn��

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:�������2130H��������65H=�����������2131M��������78H=������������LD�BC=�(2130H) ���*���������(�����������7865H�

1 1 0 0 111 1 ED

0 1 d 1 10d 1

n

n

/0))*))�#)�)� �*)�3����������� �

Page 125: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&��7E�5��6

������ �� �?�������@#�=��?��������

����� �� �6

��� ��� �?=�����

!�"����� �� 2����������:�����������nn�������������������� �������(�������:�����4���������?=���������������:������4������������%��������nn@#�����������������������������(�������:��?��2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:�������6666H��������92H=�����������6667H��������DAH=������������LD�IX=�(6666H) �������4���������?��������DA92H�

1 1 1 0 110 1 DD

0 0 0 1 001 1 2A

n

n

/0))*))�#)�)� �*)�3����������� �

Page 126: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&��8E�5��6

������ �� �A�������@#�=��A�������

����� �� �6

��� ��� �A=�����

!�"����� �� 2����������:��������nn�������������������� �������(�������:�����4���������A=���������������:������4������������%��������nn@#�����������������������������(�������:��A��2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:�������6666H��������92H=�����������6667H��������DAH=������������LD�IY=�(6666H) �������4���������A��������DA92H�

1 1 1 0 111 1 FD

0 0 0 1 001 1 2A

n

n

/0))*))�#)�)� �*)�3����������� �

Page 127: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�5��6E�!.

������ �� ���@#����1=���������

����� �� �6

��� ��� ����=�1�

!�"����� �� 2����������:������ �������(�������:��������(����1�������������������������������%��������nn�=���������������:���������������(�������:�1����������1��������������������4������������%��������nn@#���2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�25 16 (4, 3, 3, 3, 3) 4.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(����1����483AH=����������� LD (B2291-1), HL ������B229H��������3AH=�����������B22AH��������48H�

0 0 0 1 001 0 22

n

n

/0))*))�#)�)� �*)�3����������� �

Page 128: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�5��6E���

������ �� ���@#�������=�����������

����� �� �6

��� ��� ����=���

!�"����� �� 2����� �������0%���:��������(�����������������������%��������nn�M�����((���0%������������������%��������nn@#����������(���������:����������*�=�63=�1�=����9�=����0������:���� ��������0F�������C

� � ��BC 00DE 01HL 10SP 11

2���:���n��(�������:�������(������������� �������0%���:��� ��0%�������%�������

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:��������(����*���������������0���4644H=�������������LD��1000H�=�*����������44H���������%���������1000H=�����46H���������%���������1001H�

1 1 0 0 111 1 ED

0 0 d 1 10d 0

n

n

/0))*))�#)�)� �*)�3����������� �

Page 129: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�5��6E��7

������ �� ���@#�����?�=���������?�

����� �� �6

��� ��� ����=��?

!�"����� �� 2����� �������0%���������4���������?�����������������%��������nn�M�����((���������0%������������������4��������������nn@#���2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?��������5A30H=����������� LD�(4392H)=�IX �����%���������4392H�����������0���30H=�������������4393H��������5AH�

1 1 1 0 110 1 DD

0 0 0 1 001 0 22

n

n

/0))*))�#)�)� �*)�3����������� �

Page 130: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�5��6E��8

������ �� ���@#�����A�=���������A�

����� �� �6

��� ��� ����=��A

!�"����� �� 2����� �������0%���������4���������A�����������������%��������nn�M�����((���������0%������������������%����������nn@#���2���:���n��(�������:�������(������������� �������0%���:�nn�

���-��� ��"� �� A��!��02�26 20 (4, 4, 3, 3, 3, 3) 5.00

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������A��������4174H����������� LD�(8838H)=�IY �����%���������8838H�����������0���74H=����������%���������8839H��������41H�

1 1 1 0 111 1 FD

0 0 0 1 001 0 22

n

n

/0))*))�#)�)� �*)�3����������� �

Page 131: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�"�E�!.

������ �� 9����1�

����� �� �6

��� ��� 9�=�1�

!�"����� �� 2����������:�����������(����1������������������9��-���������9���

���-��� ��"� �� A��!��02�21 6 1.5

�� ���� �#����$%%"� ��.���

&��'���� �:�����������(����1���������442EH=������������LD�SP=�HL ���9��-�������������������442EH�

1 1 r 0 101 1 F9

/0))*))�#)�)� �*)�3����������� �

Page 132: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�"�E��7

������ �� 9����/��?

����� �� �6

��� ��� 9�=�#?

!�"����� �� 2��� /0%���������:�����4���������?�����������������9��-���������9���

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������4���������?�����98DAH=����������� LD�SP=�IX ����������:����9��-����������������98DAH�

1 1 1 0 110 1 DD

1 1 1 0 101 1 F9

/0))*))�#)�)� �*)�3����������� �

Page 133: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�"�E��8

������ �� 9�����A

����� �� �6

��� ��� 9�=��A

!�"����� �� 2��� /0%���������:�����4���������A�����������������9��-��������9��

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����4���������A������������������A227H=����������� LD�SP=�IY ���9��-�������������������A227H�

1 1 1 0 111 1 FD

1 1 1 0 101 1 F9

/0))*))�#)�)� �*)�3����������� �

Page 134: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��"!�CC

������ �� �9�/ ����++�=��9�/#����++1

����� �� ��91

��� ��� ++

!�"����� �� 2����������:�����������(����++�����(�����������4�����������%���!�����/��=�:��/����9��-��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:������������9�������������������������0%���:��������(����++�����������%�������(���:����0%����9���2���9����������������������������������� �������0%���:�++�����������%��������������(�������������� �������������9���2����(������++������:����������(����*�=�63=�1�=�����!=����0������:���� ��������0F�������C

� � CCBC 00DE 01HL 10AF 11

���-��� ��"� �� A��!��02�23 11 (5, 3, 3) 2.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����!��������(�����������2233H��������9��-���������������#88"1=������������PUSH�AF������%�������1006H��������22H=������%�������1005H��������33H=��������9��-���������������1005H�

1 1 q 0 11q 0

/0))*))�#)�)� �*)�3����������� �

Page 135: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��"!��7

������ �� �9�/ �����?�=��9�/#�����?1

����� �� ��91

��� ��� �?

!�"����� �� 2����������:��������4���������?�����(�����������4�����������%���!�����/��=�:��/����9��-��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:������������9�������������������������0%���:��?�����������%�������(���:����0%�9�M��������������9���������������������� �������0%������������%��������������(�������������� ����������9��

���-��� ��"� �� A��!��02�24 15 (4, 5, 3, 3) 3.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?��������2233H��������9��-���������������1007H=������������PUSH�IX������%�������1006H��������22H=������%�������1005H��������33H=��������9��-���������������1005H�

1 1 1 0 110 1 DD

1 1 0 0 111 0 E5

/0))*))�#)�)� �*)�3����������� �

Page 136: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��"!��8

������ �� �9�/ �����A�=��9�/#�����A1

����� �� ��91

��� ��� �A

!�"����� �� 2����������:��������4���������A�����(�����������4�����������%���!�����/��=�:��/����9��-��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:���������������9�������������������������0%���:��A�����������%�������(���:����0%�9�M��������������9���������������������� �������0%������������%��������������(�������������� ����������9��

���-��� ��"� �� A��!��02�24 15 (4, 5, 3, 3) 3.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������A��������2233H��������9��-���������������1007H=������������PUSH�IY������%�������1006H��������22H=������%�������1005H��������33H=��������9��-���������������#88�1�

1 1 1 0 111 1 FD

1 1 0 0 111 0 E5

/0))*))�#)�)� �*)�3����������� �

Page 137: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����CC

������ �� ++1����9�@#�=�++�����9��

����� �� ���

��� ��� ++

!�"����� �� 2����(� ��0%���:�����4�����������%���!�����/��=�:��/����9��-�����(�((������������(����++��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:��������������� �������(�������:�++=����0%���������%��������������(�������������������:�9�M�����9������������������������������:���������(���������F����������%������������������������������������(�������:�++��������9������ ��������������������2����(������++������:����������(����*�=�63=�1�=�����!=����0������:���� ��������0F�������C

� � BC 00DE 01HL 10AF 11

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:����9��-���������������1000H=������%���������1000H��������55H=�������������1001H��������33H=�������������POP�HL����������������(����1������������3355H=��������9��-������������������1002H�

1 1 q 0 10q 0

/0))*))�#)�)� �*)�3����������� �

Page 138: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�����7

������ �� �?1����9�@#�=��?�����9��

����� �� ���

��� ��� �?

!�"����� �� 2����(� ��0%���:�����4�����������%���!�����/��=�:��/����9��-�����(�((���������4���������?��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:��������������� �������(�������:��?����0%������������%��������������(�������������������:�9�M�����9�����������������������������:���������(���������F����������%������������������������������������(�������:��?��2���9���������������������

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� �:����9��-���������������1000H=������%���������1000H��������55H=�������������1001H��������33H=�������������POP�IX�������������4���������?�����������3355H=��������9��-������������������1002H�

1 1 1 0 110 1 DD

1 1 0 0 101 0 E1

/0))*))�#)�)� �*)�3����������� �

Page 139: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�����8

������ �� �A1����9�/?#�=��A�����9��

����� �� ���

��� ��� �A

!�"����� �� 2����(� ��0%���:�����4�����������%���!�����/��=�:��/����9��-�����(�((���������4���������A��2���9��-���������9����������(������������#�/0���������:������������(��:����9��-��2������������:��������������� �������(�������:��A����0%������������%��������������(�������������������:�9�M�����9�����������������������������:���������(���������F����������%������������������������������������(�������:��A��2���9���������������������

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� �:����9��-���������������1000H=������%���������1000H��������55H=�������������1001H��������33H=�������������POP�IY�������������4���������A�����������3355H=��������9��-������������������1002H�

1 1 1 0 110 1 DD

1 1 1 0 111 1 FD

/0))*))�#)�)� �*)�3����������� �

Page 140: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

0��� ��E�*���/�� ��#E� ���" ���9��%

07�&0E�!.

������ �� 63��1�

����� �� 3?

��� ��� 63=�1�

!�"����� �� 2��� /0%���������:��������(����63�����1�������4��������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(����63���������0���2822H=���������������:�����������(����1�������0���499AH=������������EX�DE=�HL ����������:��������(����63���499AH=���������������:��������(����1����2822H�

1 1 0 1 101 1 EB

/0))*))�#)�)� �*)�3����������� �

Page 141: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

07��+E��+H

������ �� �!���!B

����� �� 3?

��� ��� �!=��!B

!�"����� �� 2��� /0%���������:�����������(�����!������!������4��������

�������(�����!�������:���������B�����!B�

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(�����!������0���9900H=���������������:��������(�����!������0���5944H=������������EX�AF=�AF’�����������:��!���5944H=���������������:��!B���9900H�

0 0 0 0 000 1 08

/0))*))�#)�)� �*)�3����������� �

Page 142: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

077

������ �� �*�����*�B�=��63����63B�=��1�����1�B�

����� �� 3??

��� ��� R

!�"����� �� 3���� /0%������������������(����*�=�63=�����1�����4�������� ������ /0%�����������*�B=�63B=�����1�B=���(������%�

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������(����*�=�63=�����1������������0���445AH=�3DA2H=�����8859H=���(������%=���������������:��������(����*�B=�63B=�����1�B�����0988H=�9300H=�����00E7H=���(������%=������������EXX ����������:�����������(����������:���� C�*�B��������87551M�63B��������9300HM�1���������00E7HM�*�B��������445AHM�63B��������3DA2HM�����1�B��������8859H�

1 1 1 0 000 1 D9

/0))*))�#)�)� �*)�3����������� �

Page 143: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

07�5"�6E�!.

������ �� 1���9�@#�=�����9��

����� �� 3?

��� ��� �9��=�1�

!�"����� �� 2����� �������0%���������������������(����1�����4�������� �������������:���������%�������(���:����0%�����������:��������(����9���9��-��������=�������������������0%���:�1�����4�������� ��������4������������%��������9�@#��

���-��� ��"� �� A��!��02�25 19 (4, 3, 4, 3, 5) 4.75

�� ���� �#����$%%"� ��.���

&��'���� �:����1���������(�����������7012H=����9���������(�����������8856H=���������%���������8856H��������0%��11H=����������%���������8857H��������0%��22H=�����������������EX�(SP)=�HL������������1���������(�����������������0���2211H=������%���������8856H�����������0%��12H=������%���������8857H�����������0%��70H�����9��-������������������8856H�

1 1 0 1 101 0 E3

/0))*))�#)�)� �*)�3����������� �

Page 144: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

07�5"�6E��7

������ �� �?1���9�@#�=��?����9��

����� �� 3?

��� ��� �9��=��?

!�"����� �� 2����� �������0%���������4���������?����4�������� �������������:���������%�������(���:����0%�����������:��������(����9���9��-��������=�������������������0%���:��?����4�������� ��������4������������%��������9�@#��

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 4, 3, 5) 5.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?��������3988H=����9���������(�����������0100H=������%���������0100H��������0%��90H=����������%���������0101H��������0%��48H=�����������������EX�(SP)=�IX�������������?��������(�����������������0���4890H=������%���������0100H�����������88H=������%���������0101H�����������39H=��������9��-������������������0100H�

1 1 1 0 110 1 DD

1 1 0 1 101 0 E3

/0))*))�#)�)� �*)�3����������� �

Page 145: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

07�5"�6E��8

������ �� �A1���9�@#�=��A����9��

����� �� 3?

��� ��� �9��=��A

!�"����� �� 2����� �������0%���������4���������A����4�������� �������������:���������%�������(���:����0%�����������:��������(����9���9��-��������=�������������������0%���:��A����4�������� ��������4������������%��������9�@#��

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 4, 3, 5) 5.75

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������A��������3988H=����9���������(�����������0100H=������%���������0100H��������0%��90H=����������%���������0101H��������0%��48H=�����������������EX�(SP)=�IY�������������A��������(�����������������0���4890H=������%���������0100H�����������88H=������%���������0101H�����������39H=��������9��-������������������0100H�

1 1 1 0 111 1 FD

1 1 0 1 101 0 E3

/0))*))�#)�)� �*)�3����������� �

Page 146: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�

������ �� �63�����1��=�63���63�@�#=�1����1��@�#=�*����*��/#

����� �� �6�

��� ��� �9��=�1�

!�"����� �� ��0%���:����������:������:������������%����������������=�0%�����������:����1���������(��������������%�����������������0%�����������:����63��������(�����2����0��������������(��������������������������*���*%�����������������(�����������������

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J������:�*��/#���8M��������� ��.��������������::����

&��'���� �:����1���������(�����������1111H=������%���������1111H��������0%��88H=����63��������(�����������2222H=���������%���������2222H��������0%��66H=��������*���������(�����������7H=���������������� LDI �����������:���� ��������������������(�������������%�������C

1�� �������1112H�####1�� �������88H63� �������2223H� 1�� ��������88H*�� ��������6H

1 1 0 0 111 1 ED

1 0 0 0 001 0 A0

/0))*))�#)�)� �*)�3����������� �

Page 147: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&�'

������ �� �63�����1��=�63���63�@�#=�1����1��@�#=�*��!�*��/#

����� �� �6��

��� ��� *5

!�"����� �� 2��� /0%��������������:�����0%���:�����:������������%�����������������0%�����������:����1���������(��������������%�����������������0%����63��������(�����*��������������(��������������������������*���*%�����������������(�������������������:���������������������*���������D���=��������������������������:�*�������D���=����(���������������������������0%� ����������������������(������������(������������D������� ����:�����%���������4�������:���������������:����&����*��������D����(�����������������4������=����������������(���������)�I0%��

!���*�����8C

���-��� ��"� �� A��!��02�25 21 (4, 4, 3, 5, 5) 5.25

!���*��N�8C

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��9�������::����;�������::����1�������,J������.��������������::����

1 1 0 0 111 1 ED

1 0 1 0 001 0 B0

/0))*))�#)�)� �*)�3����������� �

Page 148: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:����1���������(�����������11111H=����63��������(�����������2222H=����*���������(�����������0003H=����������%�����������������������C

�####1�� ������� 88H� � 1���������66H�### 1�� ������� 36H� � '1���������59H�###'1�� ������� A5H� � )1���������C5H

�������4��������: LDIR ����������:��������(�������������%������������C

1�� ������� 1114H63� ������� 2225H*�� ������� 0000H�####1�� ������� 88H� � 1� ��������88H�### 1�� ������� 36H� � '1� ��������36H�###'1�� ������� A5H� � )1� ��������A5H

/0))*))�#)�)� �*)�3����������� �

Page 149: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

/0))*))�#)�)� �*)�3����������� �

.&&

������ �� �63�����1��=�63���63�/#=�1����1�/#=�*����*�/#

����� �� �66

��� ��� R

!�"����� �� 2��� /0%��������������:�����0%���:�����:������������%�����������������0%�����������:����1���������(��������������%�����������������0%�����������:����63��������(�����2����0����:������������(�����������������*���*%�����������������(�������������������

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J������:�*��/#����8M��������� ��.��������������::����

&��'���� �:����1���������(�����������1111H=������%���������1111H��������0%��88H=����63��������(�����������2222H=������%���������2222H��������0%��66H=��������*���������(�����������7H=������������� LDD �����������:���� ��������������������(�������������%�������C

1�� �������1110H�####1�� �������88H63� �������2221H� 1�� �������88H*�� �������6H

1 1 0 0 111 1 ED

1 0 0 0 001 1 A8

Page 150: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.&&'

������ �� �63�����1��=�63���6���#=�1����1�/#=�*����*�/#

����� �� �66�

��� ��� R

!�"����� �� 2��� /0%��������������:�����0%���:�����:������������%�����������������0%�����������:����1���������(��������������%�����������������0%�����������:����63��������(�����2����0����:�����������=��� ���������*���*%���������=������������������:������������������*���������D���=��������������������������:�*�������D���=����(���������������������������0%� ����������������������(������������(������������D������� ����:�����%�����4������:���������������:����

&����*��������D���=�(�����������������4������=����������������(���������)�I0%��

!���*�����8C

���-��� ��"� �� A��!��02�25 21 (4, 4, 3, 5, 5) 5.25

!���*��N�8C

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J������.������

1 1 0 0 111 1 ED

1 0 1 0 001 1 B8

/0))*))�#)�)� �*)�3����������� �

Page 151: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:����1���������(�����������1114H=����63��������(�����������2225H=����*���������(�����������0003H=����������%�����������������������C

�1114H�� ������� A5H� �2225H�� ������� �C5H�1113H�� ������� 36H� �2224H�� ������� �59H�1112H�� ������� 88H� �2223H�� ������� �66H

2�������4��������: LDDR ����������:��������(�������������%������������C

1�� ������ 1111H63� ������� 2222H6�� ������� 0000H�1114H�� ������� A5H� �2225H�� ������� �A5H�1113H�� ������� 36H� �2224H�� ������� �36H�1112H�� ������� 88H� �2223H�� ������� �88H

/0))*))�#)�)� �*)�3����������� �

Page 152: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���

������ �� �/��1��=�1����1��@#=�*����*��/#

����� �� ���

��� ��� R

!�"����� �� 2����������:���������%�����������������0%����1��������������(����� �������������:������������������������:����������(���=������������0�������2����1����������������������*%�����������������(����*����������������

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:������1��M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�*��/#������8M��������� ��.������������::����

&��'���� �:����1���������(�����������1111H=������%���������1111H��������3BH=����������������������3BH=��������*%����������������0001H�����4��������: CPI ���*%����������������0000H=����1���������(�����������1112H=����;�:����������!���������=���������,J�:����������!�������������2�����������::����������������:������������������������1111H�

1 1 0 0 111 1 ED

1 0 0 0 001 0 A1

/0))*))�#)�)� �*)�3����������� �

Page 153: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

/0))*))�#)�)� �*)�3����������� �

���'

������ �� �/�1��=�1����1�@#=�*����*�/#

����� �� ����

��� ��� R

!�"����� �� 2����������:���������%�����������������0%����1���������(���������(����� �������������:������������������������:����������(���=������������0�������1����������������������*%�����������������(����*������������������:������������������*���������D��������:���N��1��=��������������������������:�*�������D�������������1��=����(���������������������������0%� ����������������������(������������(������������D������� ����:�����%���������4�������:���������������:���

�:�*��������D����0�:��������������4������=����������������(���������)�I0%���:�����������:�����

!���*�����8�����������1��C

���-��� ��"� �� A��!��02�25 21 (4, 4, 3, 5, 5) 5.25

!���*��N�8�������N��1��C

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:����+�����1��M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�*��/#���������+����8M��������� ��.������������::����

1 1 0 0 111 1 ED

1 0 1 0 101 0 B1

Page 154: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:����1���������(�����������1111H=����������������������F3H=����*%����������������0007H=����������%�����������������������C

�1111H�� ������� 52H�1112H�� ������� 00H�1113H�� ������� F3H

2���=����4��������: CPIR ����������:��������(����1����1114H=�����������:����*%�����������0004H=�����,J�:����������!���������=��������;�:����������!����������

/0))*))�#)�)� �*)�3����������� �

Page 155: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��&

������ �� ��/�1��=�1����1��/#=�*����*��/#

����� �� ��6

��� ��� R

!�"����� �� 2����������:���������%�����������������0%����1���������(���������(����� �������������:������������������������:����������(���=������������0�������2���1������*%�����������������(����*������������������

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:����+�����1��M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�*��/#�4�8M��������� ��.������������::����

&��'���� �:����1���������(�����������1111H=������%���������1111H��������3BH=����������������������3BH=��������*%����������������0001H�����4��������: CPD ���*%����������������0000H=����1���������(�����������1110H=����:����������!���������=���������,J�:����������!�������������2�����������::����������������:������������������������1111H�

1 1 0 0 111 1 ED

1 0 0 0 101 1 A9

/0))*))�#)�)� �*)�3����������� �

Page 156: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��&'

������ �� ��/�1��=�1����1��/#=�*����*��/#

����� �� ��6�

��� ��� R

!�"����� �� 2����������:���������%�����������������0%����1���������(���������(����� �������������:������������������������:����������(���=������������0�������2���1������*���*%�����������������(���������������������:���������������������*���������D��������:���N��1��=��������������������������:�*�������D����������N��1��=����(���������������������������0%� ����������������������(������������(������������D������� ����:�����%�����4������:���������������:����&����*��������D���=�(�����������������4������=����������������(���������)�I0%���:�����������:�����

!���*�����8�����������1��C

���-��� ��"� �� A��!��02�25 21 (4, 4, 3, 5, 5) 5.25

!���*��N�8�������N��1��C

���-��� ��"� �� A��!��02�24 16 (4, 4, 3, 5) 4.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:���N��1��M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�*��/#���8M��������� ��.������������::����

1 1 0 0 111 1 ED

1 0 1 0 101 1 B9

/0))*))�#)�)� �*)�3����������� �

Page 157: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:����1���������(�����������1118H=����������������������F3H=����*%����������������0007H=����������%������������������������

�1118H���������52H�1117H���������00H�1116H���������F3H

2���=����4��������: CPDR ����������:��������(����1������1115H=�����������:����*%�������������0004H=�����,J�:����������!���������=��������;�:����������!����������

/0))*))�#)�)� �*)�3����������� �

Page 158: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�4*�������$����9��%

�&&��E�

������ �� ������@��

����� �� �66

��� ��� �=��

!�"����� �� 2����������:��������������������������������:��������������=��������������������������������������2���%�0����������:��������������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F�������C

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��

;������:��������D���M��������� ��

1������:�����%�:����0��'M��������� ��

�,J������:�����:�� M��������� ��

.������

�������:�����%�:����0��"M��������� ��

1 0 0 r0 0

/0))*))�#)�)� �*)�3����������� �

Page 159: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:�������������������44H=���������������:��������������11H=����4��������: ADD A,C ����������:�������������������55H�

/0))*))�#)�)� �*)�3����������� �

Page 160: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��E��

������ �� ������@��

����� �� �66

��� ��� �=��

!�"����� �� 2��������������������������������:��������������=���������������������������������������

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ���;������:��������D���M��������� ���1������:�����%�:����0��'M��������� ����,J������:�����:�� M��������� ���.��������������:�����%�:����0��"M��������� ��

&��'���� �:�����������:�������������������23H=����4��������: ADD A, 33H ����������:�������������������56H�

n

1 1 0 1 010 0 C6

/0))*))�#)�)� �*)�3����������� �

Page 161: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��E�5!.6

������ �� ������@��1��

����� �� �66

��� ��� �=��1��

!�"����� �� 2���0%������������%�������(���:����0%�����������:����1���������(������������������������:��������������=�������������������������������������

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:�����:�� M��������� ��.�������������:�����%�:����0��"M��������� ��

&��'���� �:�����������:�������������������A0H=���������������:�����������(����1����2323H=����������%���������2323H��������0%��08H=����4��������:�ADD�A=�(HL) ���������������������A8H�

1 0 0 1 010 0 86

/0))*))�#)�)� �*)�3����������� �

Page 162: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��E�5�7�J��6

������ �� ������@���?@��

����� �� �66

��� ��� �=���?�@���

!�"����� �� 2����������:��������4����������������(�����?�������������� �K����(��������(������������(�����������������������%��2����������:����������������������������������:���������������������������������������������������

���-��� ��"� �� A��!��02�25 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:�����:�� M��������� ��.�������������:�����%�:����0��"M��������� ��

&��'���� �:�������������������������11H=��������4���������?��������#8881=������:�����������:������%���������1005H���22H=����4��������:�ADD�A=�(IX + 5H) ����������:�������������������33H�

1 1 1 0 110 1 DD

1 0 0 1 010 0 86

d

/0))*))�#)�)� �*)�3����������� �

Page 163: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��E�5�8�J��6

������ �� ������@���6@��

����� �� �66

��� ��� �=���A�@���

!�"����� �� 2����������:��������4����������������(�����A�������������� �K����(��������(������������(�����������������������%��2����������:����������������������������������:��������������=�������������������������������������

���-��� ��"� �� A��!��02�25 19(4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'C��������� ���,J������:�����:�� M��������� ��.�������������:�����%�:����0��"M��������� ��

&��'���� �:�������������������������##1=��������4��������������A��������1000H=������:�����������:������%���������1005H���22H=����4��������: ADD A, (IY + 5H) ����������:�������������������33H�

1 1 1 0 111 1 FD

1 0 0 1 010 0 86

d

/0))*))�#)�)� �*)�3����������� �

Page 164: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&���E��

������ �� ������@��@��A

����� �� �6�

��� ��� �=�

2�����(����������%��:��=��=��1��=���?@��=������A@�������:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

1 0 00 1 r*

1 1 0 1 010 1 CE

n

1 0 0 1 010 1 8E

1 1 1 1 010 1 DD

1 0 0 1 010 1 8E

d

1 1 1 0 111 1 FD

1 0 0 1 010 1 8E

d

ADC A,r

ADC A,n

ADC A, (HL)

ADC A, (IX+d)

ADC A, (IY+d)

/0))*))�#)�)� �*)�3����������� �

Page 165: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2�����(�����=������� ����������%�!�������������!�����������������������������:��������������=�������������������������������������

���������� ���-�� ��"� �� A��!��02�2

ADC A, r 1 4 1.00ADC A, n 2 7 (4, 3) 1.75ADC A, (HL) 2 7 (4, 3) 1.75ADC A, (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75ADC A, (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:�����:�� M��������� ��.�������������:�����%�:����0��"C��������� ��

&��'���� �:�������������������������#�1=��������%�!�������=����1���������(�����������6666H=�����������6666H��������10H=����4��������: ADC�A,�(HL) ���������������������27H�

/0))*))�#)�)� �*)�3����������� �

Page 166: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"�*��

������ �� ������/�

����� �� 9�*

��� ���

2�����(����������%��:��=��=��1��=���?@��=������A@�������:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

1 0 10 0 r*

1 1 1 1 010 0 D6

n

1 0 1 1 010 0 96

1 1 1 0 110 1 DD

1 0 1 1 010 0 96

d

1 1 1 0 111 1 FD

1 0 1 1 010 0 96

d

SUB r

SUB n

SUB (HL)

SUB (IX+d)

SUB (IY+d)

/0))*))�#)�)� �*)�3����������� �

Page 167: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2�����(���������0������:��������������:��������������=�������������������������������������

���������� ���-�� ��"� �� A��!��02�2

SUB r 1 4 1.00SUB n 2 7 (4, 3) 1.75SUB (HL) 2 7 (4, 3) 1.75SUB (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75SUB (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�����:�� M��������� ��.�����������:�0���� M��������� ��

&��'���� �:�������������������������29H=������������6��������11H=����4��������: SUB D ���������������������18H�

/0))*))�#)�)� �*)�3����������� �

Page 168: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"*���E��

������ �� ������/��/��A

����� �� 9*�

��� ��� �=�

2�����(����������%��:��=��=��1��=���?@��=������A@�������:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

1 0 10 1 r*

1 1 1 1 010 1 DE

n

1 0 1 1 010 1 9E

1 1 1 0 110 1 DD

1 0 1 1 010 1 9E

d

1 1 1 0 111 1 FD

1 0 1 1 010 1 9E

d

SBC A, r

SBC A, n

SBC A, (HL)

SBC A, (IX+d)

SBC A, (IY+d)

/0))*))�#)�)� �*)�3����������� �

Page 169: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2�����(�����=������� ����������%�:�������������!������������0������:��������������:��������������=�������������������������������������

���������� ���-��� ��"� �� A��!��02�2

SBC A, r 1 4 1.00SBC A, n 2 7(4, 3) 1.75SBC A, (HL) 2 7 (4, 3) 1.75SBC A, (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75SBC A, (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�0���� �:����0��)M��������� ���,J��������:�����:�� M��������� ��.�����������:�0���� M��������� ��

&��'���� �:����������������������16H=��������%�:�������=����1���������(�����������3433H=�����������3433H��������05H=����4��������: SBC A, (HL) ���������������������10H�

/0))*))�#)�)� �*)�3����������� �

Page 170: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)&��

������ �� �������

����� �� �.6

��� ���

2�����(����������%��:��=��=��1��=���?@��=������A@��=�����:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=������(���:������:���� ����������0�����0F��������:������0���C

1 0 01 0 r*

1 1 0 1 011 0 E6

1 0 0 1 011 0 A6

1 1 1 0 110 1 DD

1 0 0 1 011 0 A6

1 1 1 0 111 1 FD

1 0 0 1 011 0 A6

AND r*

AND n

AND (HL)

AND (IX+d)

AND (IY+d)

nn

d

d

/0))*))�#)�)� �*)�3����������� �

Page 171: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� �����������.6��(���������(��:������0� �������0%��(���:����0%������(�������������0%���������������������������M���������������������������������

���������� ���-��� ��"� �� A��!��02�2

AND r 1 4 1.00AND n 2 7 (4, 3) 1.75AND (HL) 2 7 (4, 3) 1.75AND (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75AND (IX+d) 5 19 (4, 4, 3. 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�����,J��������:�����:�� M��������� ��.�������������

&��'���� �:����*���������������7BH��0111�1011�=��������������������������C3H��1100�0011�=����4��������: AND B ���������������������43H��0100�0011��

/0))*))�#)�)� �*)�3����������� �

Page 172: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�'��

������ �� ���������

����� �� ��

��� ���

2�����(����������%��:��=��=��1��=���?@��=������A@��=�����:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��/=�6=�3=�1=��=������(���:������:���� ����������0�����0F��������:������0���C

1 0 11 0 r*

1 1 1 1 011 0 F6

1 0 1 1 011 0 B6

1 1 1 0 110 1 DD

1 0 1 1 011 0 B6

1 1 1 0 111 1 FD

1 0 1 1 011 0 B6

OR r*

OR n

OR (HL)

OR (IX+d)

OR (IY+d)

n

d

d

/0))*))�#)�)� �*)�3����������� �

Page 173: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� ��������������(���������(��:������0� �������0%��(���:����0%������(�������������0%���������������������������M���������������������������������

���������� ���-��� ��"� �� A��!��02�2

OR r 1 4 1.00OR n 2 7 (4, 3) 1.75OR (HL) 2 7 (4, 3) 1.75OR (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75OR (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�����:�� M��������� ��.�������������

&��'���� �:����1���������������48H��0100�0100�=��������������������������12H��0001�0010�=����4��������: OR H ���������������������5AH��0101�1010��

/0))*))�#)�)� �*)�3����������� �

Page 174: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

7�'��

������ �� ���������

����� �� ?��

��� ���

2�����(����������%��:��=��=��1��=���?@��=������A@��=�����:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=������(���:������:���� ����������0�����0F��������:������0���C

1 0 11 0 r*

1 1 1 1 011 0 F6

1 0 1 1 011 0 B6

1 1 1 0 110 1 DD

1 0 1 1 011 0 B6

1 1 1 0 111 1 FD

1 0 1 1 011 0 B6

OR r*

OR n

OR (HL)

OR (IX+d)

OR (IY+d)

n

d

d

/0))*))�#)�)� �*)�3����������� �

Page 175: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 1l1

!�"����� �� 2������������4������/����(���������(��:������0� �������0%��(���:����0%������(�������������0%���������������������������M���������������������������������

���������� ���-��� ��"� �� A��!��02�2

XOR r 1 4 1.00XOR n 2 7 (4, 3) 1.75XOR (HL) 2 7 (4, 3) 1.75XOR (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75XOR (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.�������������

&��'���� �:����������������������96H��1001�0110�=����4��������: XOR 5DH �5DH�N�0101�1101�����������������������CBH��1100�1011��

/0))*))�#)�)� �*)�3����������� �

Page 176: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����

������ �� ��/�

����� �� ��

��� ���

2�����(����������%��:��=��=��1��=���?@��=������A@��=�����:�����:����������������66�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=������(���:������:���� ����������0�����0F��������:������0���C

1 0 11 1 r*

1 1 1 1 011 1 FE

1 0 1 1 011 1 BE

1 1 1 0 110 1 DD

1 0 1 1 011 1 BE

1 1 1 0 111 1 FD

1 0 1 1 011 1 BE

CP r*

CP n

CP (HL)

CP (IX+d)

CP (IY+d)

n

d

d

/0))*))�#)�)� �*)�3����������� �

Page 177: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2����������:������(�������������(����� �������������:�����������������:�����������������(���=����;�:���������2����4��������:���������������������::�������������:���������������

���������� ���-��� ��"� �� A��!��02�2

CP r 1 4 1.00CP n 2 7(4, 3) 1.75CP (HL) 2 7 (4, 3) 1.75CP (IX+d) 5 19 (4, 4, 3, 5, 3) 4.75CP (lY+d) 5 19 (4, 4, 3, 5, 3) 4.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�0���� �:����0��)M��������� ���,J������:�����:�� M��������� ��.�����������:�0���� M��������� ��

&��'���� �:����������������������63H=����1���������(�����������6000H=����������%���������6000H��������60H=������������ CP�(HL) ������������.�:����������!���������������

/0))*))�#)�)� �*)�3����������� �

Page 178: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)��

������ �� ������@�#

����� �� �.�

��� ��� �

!�"����� �� ����������������������������������������:�����%��:������������=�*=��=�6=�3=�1=�����=����0������:���� ��������0F��������

'���� A 111B 000C 001D 010E 011H 100L 101

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:��� ��"!1�0�:�����(������M��������� ��.��������������::����

&��'���� �:�����������:��������6�����28H=����4��������: INC�D ����������:��������6�����29H�

0 0 r 0 01

/0))*))�#)�)� �*)�3����������� �

Page 179: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)��5!.6

������ �� �1������1���@�#

����� �� �.�

��� ��� �1��

!�"����� �� 2���0%�����������������������(���:����0%�����������:����1���������(�����������������

���-��� ��"� �� A��!��02�23 11 (4, 4, 3) 2.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ���;������:��������D���M��������� ���1������:�����%�:����0��'M��������� ����,J������:��1��� ��"!1�0�:�����(������M��������� ���.���������������::����

&��'���� �:�����������:����1���������(��������3434H=���������������:�������3434H�����82H=����4������ of�INC�(HL)������%���������3434H��������83H�

0 0 1 0 011 0 34

/0))*))�#)�)� �*)�3����������� �

Page 180: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)��5�7J�6

������ �� ��?@�������?@���@�#

����� �� �.�

��� ��� ��?@��

!�"����� �� 2����������:��������4���������?���������(�����?���������������� �K����(��������(�������������������(�����������������������%��2����������:�����������������������������

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:���?@��� ��"!1�0�:�����(������M��������� ��.��������������::����

&��'���� �:�����������:��������4��������(�����?�����2020H=�������������%���������2030H��������0%��34H=����4��������:�INC�(IX+10H) ����������:������%���������2030H���35H�

1 1 1 0 110 1 DD

0 0 1 0 011 0 34

d

/0))*))�#)�)� �*)�3����������� �

Page 181: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)��5�8J�6

������ �� ��A@�������A@���@�#

����� �� �.�

��� ��� ��A@��

!�"����� �� 2����������:��������4���������A���������(�����A���������������� �K����(��������(�������������������(�����������������������%��2����������:�����������������������������

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�����%�:����0��'M��������� ���,J������:���A@��� ��"!1�0�:�����(������M��������� ��.��������������::����

&��'���� �:�����������:��������4��������(�����A�����2020H=�������������%���������2030H��������0%��34H=����4��������:�INC�(IY+10H) ����������:������%���������2030H�����35H�

1 1 1 0 111 1 FD

0 0 1 0 011 0 34

d

/0))*))�#)�)� �*)�3����������� �

Page 182: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&0��$

������ �� �����/�#

����� �� 63�

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:����������������.������������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

0 0 r 0 11

0 0 1 0 111 0 35

1 1 1 0 110 1 DD

0 0 1 0 111 0 35

1 1 1 0 111 1 FD

0 0 1 0 111 0 35

DEC (HL)

DEC (IX+d)

DEC (IY+d)

d

d

DEC r*

/0))*))�#)�)� �*)�3����������� �

Page 183: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

!�"����� �� 2���0%��(���:����0%�������(�������������������

���������� ���-��� ��"� �� A��!��02�2

DEC r 1 4 1.00DEC (HL) 3 11 (4, 4, 3) 2.75DEC (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75DEC (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�0���� �:����0��)=��������� ���,J������:��� ��581�0�:�����(������M��������� ��.������������::����

&��'���� �:����6���������������0%�� �1=����4��������: DEC D �������6�������� 71�

/0))*))�#)�)� �*)�3����������� �

Page 184: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

9� �4��%�������$���� ��������������9��%�

&��

������ ��

����� �� 6��

!�"����� �� 2�����������������������%���F����������������:���*�6��������������0��������(��������!������������ADD=�ADC=�INC������0��������SUB=�SBC=�DEC=�NEG�=����:���� �����0���������������(�������(��:�����C

�% ������*#�&��

!��, �������%%�&�����5����@4A6

!�*#�&��

!��, ������.� �&����5����:4�6

)�$���������*-�

���#�&��

0 9-0 0 0-9 00 0

0 0-8 0 A-F 06 0

0 0-9 1 0-3 06 0

ADD 0 A-F 0 0-9 60 1

ADC 0 9-F 0 A-F 66 1

INC 0 A-F 1 0-3 66 1

1 0-2 0 0-9 60 1

1 0-2 0 A-F 66 1

1 0-3 1 0-3 66 1

SUB 0 0-9 0 0-9 00 0

SBC 0 0-8 1 6-F FA 0

DEC 1 7-F 0 0-9 A0 1

NEG 1 6-7 1 6-F 9A 1

0 0 0 1 111 0 27

/0))*))�#)�)� �*)�3����������� �

Page 185: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9������:���/����:�����0���:��������������#��:����(������M��������� ��;������:��������������D�����:����(������M��������� ��1=�������������,J������:�������������������(���%��:����(������M��������� ��.�������::�����=������������

&��'���� �:�������������(���������(��:������0� ����#���*�6������ "��*�6�=���(��������������������������������C

15+27

42

*�� �������0����%���(�������������������������������������������������������0����%����������

0001 0101+ 0010 0111

0011 1100 = 3C

����������0�������2�� DAA �����������F�������������������������*�6���(������������0�����C

0011 1100+ 0000 0110

0100 0010 = 42

/0))*))�#)�)� �*)�3����������� �

Page 186: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��.

������ �� �����

����� �� ���

!�"����� �� 2����������:������������������������������������������K����(�������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::�����;�������::�����1������,J�������::�����.�������������::����

&��'���� �:�����������:�������������������1011�0100=����4��������: CPL ������������������������0100�1011�

0 0 0 1 111 1 2F

/0))*))�#)�)� �*)�3����������� �

Page 187: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

/0))*))�#)�)� �*)�3����������� �

)09

������ �� ����8�/��

����� �� .3<

!�"����� �� 2����������:��������������������������� �K����(��������2���������������0�����������������:���������������:����D�����.������581�����:�����������

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:�0���� �:����0��)M��������� ���,J������:������������ ��581�0�:�����(������M��������� ��.�����������:������������ �����881�0�:�����(������M��������� ��

&��'���� �:�����������:������������������

���4��������: NEG �����������������������

1 1 0 0 111 1 ED

0 1 0 0 010 0 44

1 0 1 0 000 1

0 1 0 0 001 1

Page 188: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��+

������ �� �A����A

����� �� ��!

!�"����� �� 2�������%�:����������!������������������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1=�(�����������%�����(����,J�������::����.�������������:��A� ��8�0�:�����(������M��������� ��

0 0 1 1 111 1 3F

/0))*))�#)�)� �*)�3����������� �

Page 189: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"�+

������ �� �A���#

����� �� 9�!

!�"����� �� 2�������%�:����������!������������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J�������::����.�����������

0 0 1 1 111 0 37

/0))*))�#)�)� �*)�3����������� �

Page 190: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

)��

������ �� R

����� �� .��

!�"����� �� 2�������(��:��������(��������������������������%����

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

0 0 0 0 000 0 00

/0))*))�#)�)� �*)�3����������� �

Page 191: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

!�.�

������ �� R

����� �� 1��2

!�"����� �� 2���1��2�����������(���������(���������������0�+����������(��������������������&�����������1��2���=����(��������4�����.������������������%���:����������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

0 1 1 1 011 0 76

/0))*))�#)�)� �*)�3����������� �

Page 192: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&�

������ �� �!!���8

����� �� 6�

!�"����� �� 6�����0��������-�0���������(�0%�����������������(����0���:��(/:��(���!!#������!! ���.���������������������0��������-�0���������(�����������4�������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� &������������4���������������� DI �����-�0���������(������0��������������0�+����%���/���0����0%����3������������2����������������(���������������(���+�����.2��������

1 1 1 1 101 0 F3

/0))*))�#)�)� �*)�3����������� �

Page 193: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

0�

������ �� �!!���#

����� �� 3�

!�"����� �� 2������0���������(������������0���������(����0���:��(�:��(���!!�������!! ������������#=����� ����������������:���%���-�0���������(��.�����������������4��������:��������������������:���� ������������=���-�0���������(��������0����

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� &������������4������������� El RETI �����-�0���������(������0�������4��������:����RETI����������

1 1 1 1 101 1 FB

/0))*))�#)�)� �*)�3����������� �

Page 194: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����

������ �� R

����� �� �$

��� ��� 8

!�"����� �� 2����$�8������������������(������8������������=����������(����������������������%��������������������0��:����4�������0%���������2���:���0%���:�������/0%����������������������������������(���-�� �������%�����9�0�+����0%��������������0%���������������%�������+������

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 1 1 010 0 56

/0))*))�#)�)� �*)�3����������� �

Page 195: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���1

������ �� R

����� �� �$

��� ��� #

!�"����� �� 2����$�#������������������(������#������������=����(���������(���������������(�0%��4������������������������88'51�

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 1 1 010 0 56

/0))*))�#)�)� �*)�3����������� �

Page 196: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���3

������ �� R

����� �� �$

��� ���

!�"����� �� 2����$� �����������������������������(������ ��2������������ ���������������������%������%���������0%����5/0���������((�����:�������(���(��������������2�������������0������������/����:����������0���:������������(�����=� ���������������������������(������������/����:����������0���2���������(���������������������������0�����������������������:������������(���������������

���-��� ��"� ��� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 1 1 010 0 56

/0))*))�#)�)� �*)�3����������� �

Page 197: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

1B4*�������$����9��%

�&&�!.E���

������ �� 1����1��@�

����� �� �66

��� ��� 1�=�

!�"����� �� 2����������:��������(��������%��:��������(����*�=�63=�1�=����9�������������������������:��������(����1������������������������1����(���������(���:������:���� ����������0�����0F��������

'����� � ��BC 00DE 01HL 10SP 11

���-��� ��"� �� A��!��02�23 11 (4, 4, 3) 2.75

�� ���� �#����$%%"� ��

9�������::����;�������::����1������:�����%�����:�0��##M��������� ���,J�������::����.�������������:�����%�:����0��#�M��������� ��

&��'���� �:��������(����1�������������������4242H=������������(����63��������1111H=����4��������: ADD HL, DE ���1���������(�����������5353H�

0 0 s 0 10s 1

/0))*))�#)�)� �*)�3����������� �

Page 198: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&��!.E���

������ �� 1����1��@��@��A

����� �� �6�

��� ��� 1�=�

!�"����� �� 2����������:��������(��������%��:��������(����*�=�63=�1�=����9������������� ����������%�:�������:����������!���������������������:��������(����1�=�����������������������1����(���������(���:������:���� ����������0�����0F��������

'������ � ��BC 00DE 01HL 10SP 11

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ���������:�����%�����:�0��##M���������� ���,J������:�����:�� M��������� ��.�������������:�����%�:����0��#�M��������� ��

&��'���� �:�����������(����*���������2222H=��������(����1���������5437H=������������%�!�������=����4��������: ADC HL, BC ����������:�1������765AH�

1 1 0 0 111 1 ED

0 1 s 1 00s 1

/0))*))�#)�)� �*)�3����������� �

Page 199: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"*��!.E���

������ �� 1����1��/��/��A

����� �� 9*�

��� ��� 1�=�

!�"����� �� 2����������:�����������(��������%��:��������(����*�=�63=�1�=����9��������������%�!�������:����������!��������������0������:��������������:��������(����1�=�����������������������1����(���������(���:������:���� ����������0�����0F��������

'����� � ��BC 00DE 01HL 10SP 11

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1������:���0���� �:����0��# M��������� ���,J������:�����:�� M��������� ��.�����������:�0���� M��������� ��

&��'���� �:�����������:����1�=��������(��������9999H=�����������:��������(����63�����1111H=������������%�:������������4��������: SBC HL, DE ����������:�1������8887H�

1 1 0 0 111 1 ED

0 1 s 1 00s 0

/0))*))�#)�)� �*)�3����������� �

Page 200: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��7E�%%

������ �� �?����?�@�((

����� �� �66

��� ��� �?=�((

!�"����� �� 2����������:��������(����((����%��:��������(����*�=�63=��?=����9�������������������������:��������4���������?=��������������������������?���(������((���(���:������:���� ����������0�����0F��������

'����� � %%BC 00DE 01IX 10SP 11

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��

9�������::����;�������::����1������:�����%�����:�0��##M��������� ���,J�������::����.�������������:�����%�:����0��#�M��������� ��

&��'���� �:�����������:�����4���������?�����333H=���������������:��������(����*������5555H=����4��������: ADD IX, BC ����������:��?�����8888H�

1 1 1 0 110 1 DD

0 1 p 0 10p 1

/0))*))�#)�)� �*)�3����������� �

Page 201: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�&&��8E�

������ �� �A����A�@���

����� �� �66

��� ��� �A=���

!�"����� �� 2����������:��������(����������%��:��������(����*�=�63=��A=����9�������������������������:�����4���������A=������������������������A���(�����������(���:������:���� ����������0�����0F��������

'����� � BC 00DE 01IY 10SP 11

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��

9�������::����;�������::����1������:�����%�����:�0��##M��������� ���,J�������::����.�������������:�����%�:����0��#�M��������� ��

&��'���� �:�����������:�����4���������A�����333H=���������������:��������(����*������555H=����4��������: ADD IY, BC ����������:��A�����8888H�

1 1 1 0 111 1 FD

0 0 r 0 10r 1

/0))*))�#)�)� �*)�3����������� �

Page 202: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)����

������ �� ����@�#

����� �� �.�

��� ���

!�"����� �� 2����������:��������(��������%��:��������(����*�=�63=�1�=����9��������������������(���������(���:������:���� ����������0�����0F��������

'����� � ��BC 00DE 01HL 10SP 11

���-��� ��"� �� A��!��02�21 6 1.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������(�����������1000H=��:�������4��������: INC HL, HL �������1001H�

0 0 s 1 10s 0

/0))*))�#)�)� �*)�3����������� �

Page 203: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)���7

������ �� �?����?�@�#

����� �� �.�

��� ��� �?

!�"����� �� 2����������:��������4���������?����������������

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:��������4���������?������������������3300H�����4��������: INC IX ����������:�����4���������?�����3301H�

1 1 1 0 110 1 DD

0 0 0 1 101 0 23

/0))*))�#)�)� �*)�3����������� �

Page 204: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)���8

������ �� �A����A�@�#

����� �� �.�

��� ��� �A

!�"����� �� 2����������:��������4���������A����������������

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������4������������2977H=����4��������: INC IY ����������:�����4���������A�����2978H�

1 1 1 0 111 1 FD

0 0 0 1 101 0 23

/0))*))�#)�)� �*)�3����������� �

Page 205: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&0����

������ �� ����/�#

����� �� 63�

��� ���

!�"����� �� 2����������:��������(��������%��:�����������(����*�=�63=�1�=����9��������������������(������ss���(���:������:���� ����������0�����0F��������

'����� � ��

BC 00DE 01HL 10SP 11

���-��� ��"� �� A��!��02�21 6 1.50

�� ���� �#����$%%"� ��.���

&��'���� �:��������(����1���������1001H=����4��������: DEC HL ����������:�1������1000H�

0 0 s 1 10s 1

/0))*))�#)�)� �*)�3����������� �

Page 206: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&0���7

������ �� �?����?�/�#

����� �� 63�

��� ��� �?

!�"����� �� 2����������:�����4���������?����������������

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����4���������?�����2006H=����4��������: DEC IX ����������:�����4���������?�����2005H�

1 1 1 0 110 1 DD

0 0 0 1 101 1 2B

/0))*))�#)�)� �*)�3����������� �

Page 207: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&0���8

������ �� �A����A�/�#

����� �� 63�

��� ��� �A

!�"����� �� 2����������:��������4���������A����������������

���-��� ��"� �� A��!��02�22 10 (4, 6) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:��������4���������A�����7649H=����4��������: DEC IY ����������:�����4���������A�����7648H�

1 1 1 0 111 1 FD

0 0 0 1 101 1 2B

/0))*))�#)�)� �*)�3����������� �

Page 208: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'�� �� ���"��#��9��%

'.��

������ ��

����� �� ����

��� ��(� R

!�"����� �� 2����������:��������������������������������������:�#/0��(�������2�������0���0��"������(�������������%�:��������������0��8��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J�������::����.��������������:����0��"��:�����������

&��'���� �:�����������:������������������

���4��������: RLCA ����������:�����������������������%�:�������

CY 7 0

A

0 0 0 1 110 0 07

1 0 0 0 000 1

7 6 4 1 025 3

0 0 1 0 100 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 209: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.�

������ ��

����� �� ���

��� ��� R

!�"����� �� 2����������:��������������������������������������:�#/0��(��������������������%�:�����2���(��������������:��������%�:��������(������0��8��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� �����������*���::����

9�������::����;�������::����1�������,J�������::����.��������������:����0��"��:�����������

&��'���� �:�����������:��������������������������%�:�������

���4��������: RLA ����������:��������������������������%�:�������

CY07

A

0 0 1 1 110 0 17

0 1 1 1 011 0

7 6 4 1 025 3C

1

1 1 0 0 111 1

7 6 4 1 025 3C

0

/0))*))�#)�)� �*)�3����������� �

Page 210: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

''��

������ ��

����� �� ����

��� ��� R

!�"����� �� 2����������:�����������������������������������������#/0��(�������*��8�����(�������������%�:��������������0��"��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J�������::����.��������������:����0��8��:�����������

&��'���� �:�����������:������������������

���4��������: RRCA ����������:��������������������������%�:�������

CY07

A

0 0 0 1 110 1 0F

0 0 0 01 0

6 4 1 025 37

0 1

0 0 1 01 0

6 4 1 025 37

1 0 1

C

/0))*))�#)�)� �*)�3����������� �

Page 211: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

''�

������ ��

����� �� ���

��� ��� R

!�"����� �� 2����������:�����������������������������������������#/0��(��������������������%�:�����2���(��������������:��������%�:��������(������0��"��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��

9�������::����;�������::����1�������,J�������::����.��������������:����0��8��:�����������

&��'���� �:�����������:��������������������������%�!�������

���4��������: RRA ����������:��������������������������%�:�������

CY07

A

0 0 1 1 110 1 1F

10011 1 00

7 6 4 1 025 3 C

0

00010 1 01

7 6 4 1 025 3 C

1

/0))*))�#)�)� �*)�3����������� �

Page 212: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.��

������ ��

����� �� ���

��� ��� �

!�"����� �� 2����������:����������������������:�#/0��(�������2����������:�0��"�����(�������������%�:��������������0��8���(����������(���:������:���� ����������0�����0F�������C

'���� B 000C 001D 010E 011H 100L 101A 111

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.��������������:����0��"��:�������������

CY 7 0

r

0 0 00 0 r

1 1 0 1 100 1 CB

/0))*))�#)�)� �*)�3����������� �

Page 213: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:�������������

���4��������: RLC r ����������:���������������������%�:�������

00101 0 00

7 6 4 1 025 3

0 0 1 0 100 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 214: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.��5!.6

������ ��

����� �� ���

��� ��� �1��

!�"����� �� 2����������:���������%�������(���:����0%�����������:��������(����1��������������:�#/0��(�������2����������:�0��"�����(�������������%�:��������������0��8��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.��������������:����0��"��:�������������

&��'���� �:�����������:����1���������(��������2828H=���������������:������%���������2828H�����

CY 7 0

(HL)

1 1 0 1 100 1 CB

0 0 0 1 010 0 06

1 0 0 0 000 1

7 6 4 1 025 3

/0))*))�#)�)� �*)�3����������� �

Page 215: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: RLC(HL) ����������:������%��������� 5 51������������%�:�������

0 0 1 0 100 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 216: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.��5�7J�6

������ ��

����� �� ���

��� ��� ��?@��

!�"����� �� 2����������:���������%�������(���:����0%��������:�����������:��������4���������?������� �K����(��������(����������������=�������������:�#/0��(�������2����������:�0��"�����(�������������%�:��������������0��8��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.��������������:����0��"��:�������������

&��'���� �:�����������:��������4���������?�����1000H=���������������:������%���������1022H����

CY 7 0

(IX+d)

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

0 0 0 1 010 0 06

d

/0))*))�#)�)� �*)�3����������� �

Page 217: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: RLC (IX+2H) ����������:������%���������1002H������������%�:�������

1 0 0 0 000 1

7 6 4 1 025 3

0 0 1 0 100 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 218: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.��5�8J�6

������ ��

����� �� ���

��� ��� ��A@��

!�"����� �� 2����������:���������%�������(���:����0%��������:�����������:��������4���������A������� �K����(��������(�����������������������������:�#/0��(�������2����������:�0��"�����(�������������%�:��������������0��8��*��8���������/����:�����0��

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.��������������:����0��"��:�������������

&��'���� �:�����������:��������4���������A�����1000H=���������������:������%���������1002H����

CY 7 0

(IY+d)

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

0 0 0 1 010 0 06

d

/0))*))�#)�)� �*)�3����������� �

Page 219: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: RLC (IY+2H) ����������:������%���������1002H������������%�:�������

1 0 0 0 000 1

7 6 4 1 025 3

0 0 1 0 100 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 220: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.�$

������ ��

����� �� ��

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F�������C

CY 7 0

m

0 0 10 0 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FB

1 1 0 1 100 1 CB

RL r*

RL (HL)

RL (IX+d)

RL (IY+d)

d

d

0 0 1 1 010 0 16

0 0 1 1 010 0 16

0 0 1 1 010 0 16

/0))*))�#)�)� �*)�3����������� �

Page 221: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2����������:�������(������������������:�#/0��(�������2����������:�0��"�����(�������������%�:�����������(��������������:��������%�:��������(������0��8�

���������� ���-��� ��"� �� A��!��02�2

RL r 2 8 (4, 4) 2.00RL (HL) 4 15(4, 4, 4, 3) 3.75RL (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75RL (IY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��.��������������:����0��"��:�������������

&��'���� �:�����������:��������6������������%�:�������

1 0 0 1 110 1

7 6 4 1 025 3C

0

/0))*))�#)�)� �*)�3����������� �

Page 222: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: RL�D ����������:��������6������������%�:�������

0 0 1 1 010 1

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 223: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

''��$

������ ��

����� �� ���

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F�������C

CY07

m

0 0 00 1 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FB

1 1 0 1 100 1 CB

RRC r*

RRC (HL)

RRC (IX+d)

RRC (IY+d)

d

d

0 0 0 1 010 1 OE

0 0 0 1 010 1 OE

0 0 0 1 010 1 OE

/0))*))�#)�)� �*)�3����������� �

Page 224: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2����������:�������(���������������������#/0��(�������2����������:�0��8�����(�������������%�:��������������0��"��*��8���������/����:�����0��

���������� ���-��� ��"� �� A��!��02�2

RRC r 2 8 (4, 4) 2.00RRC (HL) 4 15 (4, 4, 4, 3) 3.75RRC (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75RRC (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��=.��������������:����0��8��:�������������

&��'���� �:�����������:�������������

0 0 1 0 101 0

7 6 4 1 025 3

/0))*))�#)�)� �*)�3����������� �

Page 225: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: RRC A ����������:���������������������%�:�������

00101 0 01

7 6 4 1 025 3 C

1

/0))*))�#)�)� �*)�3����������� �

Page 226: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

''�$

������ ��

����� �� ��

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F�������C

CY07

m

0 0 00 1 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

RR r*

RR (HL)

RR (IX+d)

RR (IY+d)

d

d

0 0 1 1 010 1 1E

0 0 1 1 010 1 1E

0 0 0 1 010 1 1E

/0))*))�#)�)� �*)�3����������� �

Page 227: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� 2����������:��(�����������������������#/0��(��������������������%�:�����2����������:�0��8�����(�������������%�:�����������(��������������:��������%�:��������(������0��"��*��8���������/����:�����0��

���������� ���-��� ��"� �� A��!��02�2

RR r 2 8 (4, 4) 2.00RR (HL) 4 15 (4, 4, 4, 3) 3.75RR (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75RR (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�����M��������� ��=.��������������:����0��8��:�������������

&��'���� �:�����������:����1���������(��������4343H=���������������:������%���������4343H������������%�:�������

10111 0 11

7 6 4 1 025 3 C

0

/0))*))�#)�)� �*)�3����������� �

Page 228: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������:�RR (HL) ����������:���������)')'1������������%�:�������

01110 1 10

7 6 4 1 025 3 C

1

/0))*))�#)�)� �*)�3����������� �

Page 229: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

".��$

������ ��

����� �� 9��

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F��������

CY 7 0

m

0

0 0 01 0 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

SLA r*

SLA (HL)

SLA (IX+d)

SLA (IY+d)

d

d

0 0 0 1 011 0 26

0 0 0 1 011 0 26

0 0 0 1 011 0 26

/0))*))�#)�)� �*)�3����������� �

Page 230: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� ��������������:���:�#/0��(��������(��:�������������������:��(���������2����������:�0��"�����(�������������%�:�����*��8���������/����:�����0��

���������� ���-��� ��"� �� A��!��02�2

SLA r 2 8 (4, 4) 2.00SLA (HL) 4 15 (4, 4, 4, 3) 3.75SLA (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75SLA (IY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�������M��������� ��.��������������:����0��"

&��'���� �:�����������:�������������

1 0 1 0 101 0

7 6 4 1 025 3

/0))*))�#)�)� �*)�3����������� �

Page 231: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: SLA L ����������:���������������������%�:�������

0 1 0 1 001 0

7 6 4 1 025 3C

1

/0))*))�#)�)� �*)�3����������� �

Page 232: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"'��$

������ ��

����� �� 9��

��� ��� �

2������(����������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F�������C

CY07

m

0 0 01 0 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

SRA r*

SRA (HL)

SRA (IX+d)

SRA (IY+d)

d

d

0 0 0 1 011 1 2E

0 0 0 1 011 1 2E

0 0 0 1 011 1 2E

/0))*))�#)�)� �*)�3����������� �

Page 233: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

'���� B 000C 001D 010E 011H 100L 101A 111

!�"����� �� ��������������:������#/0��(��������(��:�������������������:��(���������2����������:�0��8�����(�������������%�:�����������(��������������:�0��"��������������*��8���������/����:�����0��

���������� ���-��� ��"� �� A��!��02�2

SRA r 2 8 (4, 4) 2.00SRA (HL) 4 15 (4, 4, 4, 3) 3.75SRA (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75SRA (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������:���������������M��������� ��;������:��������D���M��������� ��1�������,J������:�(���%�������M��������� ��.��������������:����0��8��:�������������

&��'���� �:�����������:��������4���������?�����1000H=���������������:������%���������1003H����

1 0 1 0 001 1

7 6 4 1 025 3

/0))*))�#)�)� �*)�3����������� �

Page 234: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���4��������: SRA (IX+3H) ����������:������%���������#88'1������������%�:�������

00111 0 11

7 6 4 1 025 3 C

0

/0))*))�#)�)� �*)�3����������� �

Page 235: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"'.�$

������ ��

����� �� 9��

��� ��� �

2����(������������%��:��=��1��=���?@��=������A@��=�����:�����:�����������������������������2����(��0����(�����,�(���������0�����������(���:������:���� ����������0�����0F�������

CY07

m0

/0))*))�#)�)� �*)�3����������� �

Page 236: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

S�������:����������*=��=�6=�3=�1=��=���������0������:���� ��������0F��������:������0���C

!�"����� �� 2����������:��(��������������:��������#/0��(�������2����������:�0��8�����(�������������%�:���=�����0��"��������*��8���������/����:�����0��

���������� ���-��� ��"� �� A��!��02�2

SRL r 2 8 (4, 4) 2.00SRL (HL) 4 15 (4, 4, 4, 3) 3.75SRL (1X+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

0 0 11 1 r*

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

SRL r*

SRL (HL)

SRL (IX+d)

SRL (IY+d)

d

d

0 0 1 1 011 1 3E

0 0 1 1 011 1 3E

0 0 1 1 011 1 3E

/0))*))�#)�)� �*)�3����������� �

Page 237: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

SRL (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��

9������;������:��������D���M��������� ��1�������,J������:�(���%�������M��������� ��.��������������:����0��8��:�������������

&��'���� �:�����������:��������*����

���4��������: SRL B ����������:��������*������������%�:�������

1 0 0 1 110 1

7 6 4 1 025 3

11010 0 10

7 6 4 1 025 3 C

1

/0))*))�#)�)� �*)�3����������� �

Page 238: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'.&

������ ��

����� �� ��6

��� ��� R

!�"����� �� 2����������:������ �������:����0���0��'=� =�#=�����8���:���������%����������1���������(��������������������:����0���"=��=��=�����)���:�������������%��������M����(��������������:����������������:����0��������(����������� �������:����0���:�������������������������M��������(��������������:������ �������:����0���:���������������������(����������� �������:����0���:������%����������1����2����������:���������������0���:����������������������::�����

Note: (HL) means the memory location specified by the contents of the HL register pair.

���-��� ��"� �� A��!��02�25 18 (4, 4, 3, 4, 3) 4.50

�� ���� �#����$%%"� ��

9������:�����������������������:����(������M��������� ��;������:��������������D�����:����(������M��������� ��1�������,J������:�(���%��:��������������������:����(������M��������� ��.��������������::����

47 03 47 03A

1 1 0 0 111 1 ED

0 1 0 1 111 1 6F

/0))*))�#)�)� �*)�3����������� �

Page 239: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:����1���������(��������5000H=���������������:������������������������%���������5000H����

���4��������: RLD ����������:������������������������%���������5000H����

0 1 1 1 001 1

7 6 4 1 025 3

Accumulator

0 0 1 0 101 0

7 6 4 1 025 3

(5000H)

0 1 1 1 101 0

7 6 4 1 025 3

Accumulator

0 0 1 1 000 1

7 6 4 1 025 3

(5000H)

/0))*))�#)�)� �*)�3����������� �

Page 240: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

''&

������ ��

����� �� ��6

��� ��� R

!�"����� �� 2����������:������ �������:����0���0��'=� =�#=�����8���:������%����������1���������(����������� �������:����0���:���������������������������2���(��������������:������ �������:����0���:���������������������(��������������������:����0���"=��=��=�����)���:����������1��M��������(��������������:���������������:����0���:��1���������(����������� �������:����0���:��1����2����������:���������������0���:����������������������::������

�1����������������%���������(���:����0%�����������:����1���������(����

���-��� ��"� �� A��!��02�25 18 (4, 4, 3, 4, 3) 4.50

�� ���� �#����$%%"� ��

9������:�����������������������:����(������M��������� ��;������:��������������D�����:����(������M��������� ��1�������,J������:�(���%��:��������������������:����(������M��������� ��.��������������::����

47 03 47 03A (HL)

1 1 0 0 111 1 ED

0 1 0 1 111 0 67

/0))*))�#)�)� �*)�3����������� �

Page 241: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:����1���������(��������5000H=���������������:������������������������%���������5000H����

���4��������: RRD ����������:������������������������%���������5000H����

1 0 0 0 010 0

7 6 4 1 025 3

Accumulator

0 0 0 0 001 0

7 6 4 1 025 3

(5000H)

1 0 0 0 000 0

7 6 4 1 025 3

Accumulator

0 1 0 1 000 0

7 6 4 1 025 3

(5000H)

/0))*))�#)�)� �*)�3����������� �

Page 242: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*���"�E�'��E� �������9��%

*����E�

������ �� ;����0

����� �� *�2

��� ��� 0=��

!�"����� �� 2��������������0��0����������������������;�:��������������%���(������0�����������(���:������:���� ����������0�����0F�������C

*������� � '���� 0 000 B 0001 001 C 0012 010 D 0103 011 E 0114 100 H 1005 101 L 1016 110 A 1117 111

���-��� ��"� �� A��!��02�22 8 (4, 4) 4.50

0 1 b r

1 1 0 1 100 1 CB

/0))*))�#)�)� �*)�3����������� �

Page 243: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�� ���� �#����$%%"� ��

9�����-�� �;������:�(���:����0����8M��������� ��1�����,J�����-�� �.��������������::����

&��'���� �:�0�� �����������*��������8=����4��������: BIT 2, B ���;�:����������!���������������#=�����0�� �����������*��������8��*��8�����������*���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 244: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*����E�5!.6

������ �� ;����1��0

����� �� *�2

��� ��� 0=��1��

!�"����� �� 2��������������0��0������������%���������(���:����0%�����������:����1���������(�������������;�:��������������%���(������0���(���:������:���� ����������0�����0F�������C

*������� �0 0001 0012 0103 0114 1005 1016 1101 111

���-��� ��"� �� A��!��02�23 12 (4, 4, 4) 4 3.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�(���:����*����8M��������� ��1�����,J�����-�� �1��������������::����

1 1 0 1 100 1 CB

0 1 b 1 01

/0))*))�#)�)� �*)�3����������� �

Page 245: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:����1���������(�����������4444H=�����0��)������������%���������444H��������#=����4��������: BIT�4,�(HL)����;�:����������!���������������8=�����0��)���������%���������4444H������������#��*��8���������%���������4444H���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 246: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*����E�5�7J�6

������ �� ;�����?@��0

����� �� *�2

��� ��� 0=���?@��

!�"����� �� 2��������������0��0������������%���������(���:����0%�����������:��������(�����?����0����� ������ �K����(��������(�������������������;�:��������������%���(������0���(���:������:���� ����������0�����0F��������

*������� �0 0001 0012 0103 0114 1005 1016 1107 111

���-��� ��"� �� A��!��02�25 20 (4, 4, 3, 5, 4) 5.00

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

d

0 1 b 11 0

/0))*))�#)�)� �*)�3����������� �

Page 247: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�� ���� �#����$%%"� ��

9�����-�� �;������:�(���:����*����8M��������� ��1�����,J�����-�� �.��������������::����

&��'���� �:�����������:�����4���������?�����2000H=�����0������������%���������2004H��������#=����4��������: BIT�6,�(IX+4H)����;�:����������!���������������8=�����0������������%���������2004H������������#��*��8���������%���������2004H���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 248: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*����E�5�8J�6

������ �� ;�����A@��0

����� �� *�2

��� ��� 0=���A@��

!�"����� �� 2��������������0��0������������%���������(���:����0%�����������:��������(�����A����0����� ������ �K����(��������(�������������������;�:��������������%���(������0���(���:������:���� ����������0�����0F��������

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

d

0 1 b 11 0

/0))*))�#)�)� �*)�3����������� �

Page 249: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*������� �0 0001 0012 0103 0114 1005 1016 1107 111

���-��� ��"� �� A��!��02�25 20 (4, 4, 3, 5, 4) 5.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�(���:����*����8M��������� ��1�����,J�����-�� �1��������������::����

&��'���� �:�����������:�����4������������2000H=�����0������������%���������2004H��������#=����4��������: BIT�6=�(IY+4H)����;�:�����������!�������������������8=�����0������������%���������2004H������������#��*��8���������%���������2004H���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 250: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"0���E�

������ �� �0���#

����� �� 932

��� ��� 0=��

!�"����� �� *��0����������������%��:��������*=��=�6=�3=�1=��=�������������(������0�����������(���:������:���� ����������0�����0F�������C

*�� �� '����� �

0 000 B 000 1 001 C 001 2 010 D 010 3 011 E 011 4 100 H 100 5 101 L 101 6 110 A 111 7 111

���-��� ��"� ��A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

&��'���� ���4��������: SET 4, A 0��)����������������*��8���������/����:�����0��

1 1 b r

1 1 0 1 100 1 CB

/0))*))�#)�)� �*)�3����������� �

Page 251: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"0���E�5!.6

������ �� �1��0���#

����� �� 932

��� ��� 0=��1��

!�"����� �� *��0������������%�����������������0%�����������:��������(����1��������(������0���(���:������:���� ����������0�����0F�������C

*������� �0 0001 0012 0103 0114 1005 1016 1107 111

���-��� ��"� �� A��!��02�24 15 (4, 4, 4, 3) 3.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:����1���������(��������3000H=����4��������: SET�4=�(HL)�0��)���������%���������3000H���#��*��8���������%���������3000H���������/����:�����0��

1 1 b r

1 1 0 1 100 1 CB

/0))*))�#)�)� �*)�3����������� �

Page 252: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"0���E�5�7J�6

������ �� ��?@��0���#

����� �� 932

��� ��� 0=���?@��

!�"����� �� *��0������������%�����������������0%��������:�����������:�����?��������(����������� �K����(���������������������(������0���(���:������:���� ����������0�����0F�������C

*������� �0 0001 0012 0103 0114 1005 1016 1107 111

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����4������������2000H=����4��������: SET�0=�(IX�+�3H) 0��8���������%���������2003H���#��*��8���������%���������2003H���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 253: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

"0���E�5�8J�6

������ �� ��A�@����0���#

����� �� 932

��� ��� 0=���A�@���

!�"����� �� *��0������������%�����������������0%��������:�����������:�����A��������(����������� �K����(��������(����������������(������0���(���:������:���� ����������0�����0F�������C

*������� �0 0001 0012 0103 0114 1005 1016 1107 111

���-��� ��"� �� A��!��02�26 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����4���������A�����2000H=����4��������: SET 0, (IY+3H) 0��8���������%���������2003H���#��*��8���������%���������2003H���������/����:�����0��

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

d

1 1 b 11 0

/0))*))�#)�)� �*)�3����������� �

Page 254: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'0"��E�$

������ �� 0���8

����� �� �39

��� ��� 0=��

�(������0�����%�0���"��������8���:�����������:�������(�����=����%��:��=��1��=���?@��=������A@��������:�����:���������������932�����������2����(��0����(�����,�(���������0��������������0������:���� ��������0F�������C

1 1 0 1 100 1 CB

1 1 0 1 100 1 CB

1 1 1 0 110 1 DD

1 1 0 1 100 1 CB

d

1 1 1 0 111 1 FD

1 1 0 1 100 1 CB

d

RES b, rn

RES b, (HL)

RES b, (IX+d)

RES b, (IY+d)

1 0 b 11 0

1 0 b 11 0

1 0 b r

1 0 b 11 0

/0))*))�#)�)� �*)�3����������� �

Page 255: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

*�� � '���� 0 000 B 0001 001 C 0012 010 D 0103 011 E 0114 100 H 1005 101 L 1016 110 A 1117 111

!�"����� �� *��0�����(��������������

���������� ���-��� ��"� �� A��!��02�2

RES r 4 8 (4, 4) 2.00RES (HL) 4 15 (4, 4, 4, 3) 3.75RES (IX+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75RES (lY+d) 6 23 (4, 4, 3, 5, 4, 3) 5.75

�� ���� �#����$%%"� ��.���

&��'���� ���4��������: RES�6=�D=�0��������������8������*��8�����������6���������/����:�����0��

/0))*))�#)�)� �*)�3����������� �

Page 256: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I�$%�9��%

I����

������ �� �������

����� �� >�

��� ��� ��

Note: The first operand in this assembled object code is the low order byte of a two-byte address.

!�"����� �� �(������nn�������������������(�������������������������2�����4������������:������:������������������������0%������ ��������:�������

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

1 1 0 1 100 0 C3

n

n

/0))*))�#)�)� �*)�3����������� �

Page 257: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I����E���

������ �� �!�������=��������

����� �� >�

��� ��� ��=���

2���:���n��(���������������0�����0F��������������� �������0%���:��� /0%�������%�������

!�"����� �� �:����������cc������=�������������������(������nn����������(�����������������������=��������(��������������� ���������������0�����������������nn���:����������cc���:���=��������������������������������������=��������(��������������� ��������4��+��������������������������cc���(�����������������:�����������������(���������������0��������!�������������������!���2������������������:������������0���0��� ��������(���:�����������(�������cc�0��:��������������0�����0F��������

'�� ���� ��������� +� �000 NZ non zero Z001 Z zero Z010 NC no carry C011 C carry C100 PO parity odd P/V101 PE parity even P/V110 P sign positive S111 M sign negative S

n

n

1 1 00 10 0

/0))*))�#)�)� �*)�3����������� �

Page 258: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:��������%�:�������:����������!���������������������������:�������#� 8�����03H=����4��������: JP�C=�1520H �������������������������1520H=�������������4����������%���������6�:�����0%��03H�:����������1520H�

/0))*))�#)�)� �*)�3����������� �

Page 259: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I'�

������ �� ��������@��

����� �� >�

��� ��� �

!�"����� �� 2������������(�������:����������������0�����������������������:���(��������2����������:������(��������e�������������������������������������������4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

���-��� ��"� �� A��!��02�23 12 (4, 3, 5) 3.00

�� ���� �#����$%%"� ��.���

&��'���� 2��F��(�:�� ����:������������:����������)58=����:���� �������0�%��������������������� JR $+5�

2������������0F������������:������������������ ��0��� C

.�� ���� ����������480 18481 03482 -483 -484 -485 � PC after jump

0 0 1 0 000 1 18

e-2

/0))*))�#)�)� �*)�3����������� �

Page 260: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I'��E�

������ �� �:���N�8=��������

�:���N�#=��������@��

����� �� >�

��� ��� �=��

!�"����� �� 2������������(�������:��������������0�����������������������:���(���������(�������������������:���������������%�!������:����:�������+��������#=�����������:������(����������������������������������������������������4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:�/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

�:����:�������+��������8=������4�����������4���������-���:���������������:���� ������������������:��������������

���-��� ��"� �� A��!��02�23 12 (4, 3, 5) 3.00

�:�����������������C

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� 2�������%�:������������������+��������F��(�0��-�:������������:����)58��2������0�%������������������JR�C=�$�-�4

2������������0F������������:������������������ ��0��� C

0 0 1 0 001 1 38

e-2

/0))*))�#)�)� �*)�3����������� �

Page 261: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.�� ����� ����������47C � PC after jump47D -47E -47F -480 38481 FA (two’s complement - 6)

/0))*))�#)�)� �*)�3����������� �

Page 262: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I'�)�E�

������ �� �:���N�#=���������:���N�8=���������@��

����� �� >�

��� ��� .�=��

!�"����� �� 2������������(�������:��������������0�����������������������:���(���������(�������������������:���������������%�!������:����:�������+������8=�����������:������(��������e�������������������������������������������4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:�/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

�:����:�������+��������#=������4�����������4���������-���:���������������:���� ����������������

�:�����������������C

���-��� ��"� �� A��!��02�23 12 (4, 3, 5) 3.00

�:��������������������C

���-��� ��"� �� A��!��02�27 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� 2�������%�!��������������������+����������(������F��(�����������2������0�%������������������JR�NC=�$

2������������0F����������������:������F��(����C

0 0 1 0 001 0 30

e-2

/0))*))�#)�)� �*)�3����������� �

Page 263: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.�� ���� ����������480 30 � PC after jump481 00

/0))*))�#)�)� �*)�3����������� �

Page 264: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I'��E�

������ �� �:�;�N�8=���������:�;�N�#=���������@�

����� �� >�

��� ��� ;=��

!�"����� �� 2������������(�������:��������������0�����������������������:���(���������(�������������������:�����������;����!������:����:�������+��������#=�����������:������(����������������������������������������������������4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:�/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

�:����;����!�������+��������8=������4�����������4���������-���:���������������:���� ������������������:�����������������C

���-��� ��"� �� A��!��02�23 12 (4, 3, 5) 3.00

If the condition is not met;

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� 2���;����!������������������+��������F��(�:�� ����:������������:����������'88��2���:���� �������0�%��������������������� JR�Z�,$�+�5

2������������0F������������:���������������C

0 0 0 0 001 1 28

e-2

/0))*))�#)�)� �*)�3����������� �

Page 265: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.�� ���� ����������300 28301 03302 -303 -304 -305 � PC after jump

/0))*))�#)�)� �*)�3����������� �

Page 266: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I'�)�E�

������ �� �:�;�N�#=���������:�;�N�8=������(��@��

����� �� >�

��� ��� .;=��

!�"����� �� 2������������(�������:��������������0�����������������������:���(���������(�������������������:�����������;����!������:����:�������+��������8=�����������:������(����������������������������������������������������4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:�/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

�:����;����!�������+��������#=������4�����������4���������-���:���������������:���� ����������������

�:�����������������C

���-��� ��"� �� A��!��02�23 12 (4, 3, 5) 3.00

�:��������������������C

���-��� ��"� �� A��!��02�22 7 (4, 3) 1.75

�� ���� �#����$%%"� ��.���

&��'���� 2���;����!��������������������+��������F��(�0��-�:������������:����)58��2������0�%������������������JR�NZ=�$�-�4

2������������0F������������:���������������C

0 0 0 0 001 0 20

e-2

/0))*))�#)�)� �*)�3����������� �

Page 267: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.�� ���� ����������47C � PC after jump47D -47E -47F -480 20481 FA (two’s complement - 6)

/0))*))�#)�)� �*)�3����������� �

Page 268: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I��5!.6

������ �� (������

����� �� >�

��� ��� �1��

!�"����� �� 2��������������������������(����������������� �������������:����1���������(�����2�����4������������:������:������������������������0%������ ��������:�������

���-��� ��"� �� A��!��02�21 4 1.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����������������������1000H=���������������:����1���������(��������4800H=����4��������:�JP�(HL)�����������:�����������������������4800H�

1 1 0 0 101 1 E9

/0))*))�#)�)� �*)�3����������� �

Page 269: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I��5�76

������ �� (�����?

����� �� >�

��� ��� ��?�

!�"����� �� 2��������������������������(����������������� �������������:�����?��������������2�����4������������:������:������������������������0%������ ��������:�������

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����������������������1000H=���������������:�����?�����������������4800H=����4��������:�JP�(IX)�����������:�����������������������4800H�

1 1 1 0 110 1 DD

1 1 0 0 101 1 E9

/0))*))�#)�)� �*)�3����������� �

Page 270: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

I��5�86

������ �� ������A

����� �� >�

��� ��� ��A�

!�"����� �� 2��������������������������(����������������� �������������:�����A��������������2�����4������������:������:������������������������0%������ ��������:�������

���-��� ��"� �� A��!��02�22 8 (4, 4) 2.00

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����������������������#8881=���������������:�����A�����������������)5881=����4��������: JP (IY) ����������:�����������������������)5881�

1 1 1 0 111 1 FD

1 1 0 0 101 1 E9

/0))*))�#)�)� �*)�3����������� �

Page 271: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&I)�E�

������ �� /

����� �� 6>.;

��� ��� �

!�"����� �� 2�������������������������������������F��(�����������4��(������������������������������������0����������2���*��������������������=������:�������D����������������=�����������:������(��������������������������������������������2�����4������������:������:������������������������0%������ ��������:��������2���F��(�����������:��������������:��������������(����������������������:�/# ����@# 7�0%���2������0��������������%���F��:������ ������������������

�:����������:�������������������*� �����D���������=������4�����������4���������-���:���������������:���� ����������������

�:�*���8C

���-��� ��"� �� A��!��02�23 13 (5,3, 5) 3.25

�:�*�N�8C

���-��� ��"� �� A��!��02�22 8 (5, 3) 2.00

�� ���� �#����$%%"� ��.���

0 0 1 0 000 0 10

e2

/0))*))�#)�)� �*)�3����������� �

Page 272: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� ��%(������: �����������������������������������:����6>.;�����������2����������������������:���������(��0�::�����.*�!���������(��0�::������2*�!�������������0%���������:��������=��������������������58�0%�=� ���������������:���

LD 8, 80 ;Set up counterLD HL, Inbuf ;Set up pointersLD DE, Outbuf

LOOP: LID A, (HL) ;Get next byte from;input buffer

LD (DE), A ;Store in output bufferCP ODH ;Is it a CR?JR Z, DONE ;Yes finishedINC HL ;Increment pointersINC DEDJNZ LOOP ;Loop back if 80

;bytes have not;been moved

DONE:

/0))*))�#)�)� �*)�3����������� �

Page 273: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

� �������'����9��%

��..���

������ �� �9�/#������1=��9�/ �������=��������

����� �� ����

��� ��� ��

2���:����:���� �����(���������������0�����0F���������0������������/����:�����0%���:��� /0%�������%�������

!�"����� �� 2�����������������:����������������������������(�������������(��:�����4�����������%���-��2����(������nn��������������������������(�����������������������%� ��������:����(�������:����0�����������0��:�����������������:�����0������=����32�����������������0����������������������������(�������:�� �0%�(�((��������(��:������-�0��-����������2���(����������(������0%�:��������������������������������:����9��-����������������(����9��=����������������/������0%���:�����������������������%��������� �(��������0%����9�M�����������������9�������=������������������ �������0%���:�������������������(��:���-��

*�������������'/0%����������=������������������� �������������0%������0�:�������(������4������

���-��� ��"� �� A��!��02�25 17 (4, 3, 4, 3, 3) 4.25

�� ���� �#����$%%"� ��.���

1 1 0 0 110 1 CD

n

n

/0))*))�#)�)� �*)�3����������� �

Page 274: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:�����������������������1A47H=�����������:����9��-������������3002H=����������%����������������������C

1A47H contains CDHIA48H contains 35H1A49H contains 21H

�:�������������:�����+������0����=����'/0%�����������CD3521H ��:���������������:����4��������2�������������+���������:������CALL�2135H�����4��������:������������=�����������:������%�������3001H���1AH=�����������:�������3000H���4AH=�����������:����9��-����������3000H=���������������:���������������������2135H=�(�������������������:����:����(�������:�����0��������� ���0���4������

/0))*))�#)�)� �*)�3����������� �

Page 275: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��..���E���

������ �� �!�������C��(/#������1

�(/ �������=�(������

����� �� ����

��� ��� ��=���

Note: The first of the two n operands in the assembled object code above is the least-significant byte of the 2-byte memory address.

!�"����� �� �:����������cc������=�������������(���������������������:��������������������������������(��:�����4�����������%���-=��������������(������nn��������(�����������������������%� ��������:����(�������:����0�����������0��:�����������������:�����0������=����32�����������������0����������������������������(�������:�� �0%�(�((��������(��:������-�0��-��������:����������cc���:���=��������������������������������������=��������(��������������� ��������4��+�����������������2�����-�(����������(������0%�:��������������������������������:����9��-���������9��=����������������/������0%���:�����������������������%��������� �(��������0%�9�M�����������������9�������=������������������ �������0%���:�������������������(��:������-�

*�������������'/0%����������=������������������� �������������0%������0�:�������(������4�������

���������cc���(�����������������:�����������������(���������������0��������!�������������������!���2����������������

n

n

1 1 01 0cc

/0))*))�#)�)� �*)�3����������� �

Page 276: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��:������������0���0��� =� ���������(���:�����������(����������0��:��������������0�����0F�������C

'�� ���� ��������� +� �000 NZ non zero Z001 Z zero Z010 NC non carry C011 C carry Z100 PO parity odd P/V101 PE parity even P/V110 P sign positive S111 M sign negative S

�:�cc������C

���-��� ��"� �� A��!��02�25 17 (4, 3, 4, 3, 3) 4.25

�:�cc���:���C

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:������!����������!�������������=�����������:�����������������������1A47H=�����������:����9��-������������3002H=����������%����������������������C

.�� ���� �������1A47H D4H1448H 35H1A49H 21H

�����:�������������:�����+������0����=����'/0%���������� D43521H ��:���������������:����4��������2�������������+���������:�����������.�=�2135H�����4��������:������������=�����������:������%�������3001H���1AH=�����������:�������3000H���4AH=����

/0))*))�#)�)� �*)�3����������� �

Page 277: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�������:����9��-����������3000H=���������������:���������������������2135H=�(�������������������:����:����(�������:�����0��������� ���0���4������

/0))*))�#)�)� �*)�3����������� �

Page 278: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'0�

������ �� (������(�=�(�1����(@#�

����� �� �32

!�"����� �� 2���0%������������%���������(���:����0%�����������:����9��-���������9����������(������������������� ������������0���:�������������������������2���9������ �������������������0%������������%���������(���:����0%������ ��������:���������������:������:������������%���������(���:����0%��������2���������������������%����������������������������(���������������(�������:�����������������0%�����������������

���-��� ��"� �� A��!��02�23 10 (4, 3, 3) 2.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�����������������������3535H=�����������:����9��-������������2000H=�����������:������%���������2000H�����B5H=���������������:������%����������:������%���������2001H�����18H�����4��������: RET ����������:����9��-����������2002H=���������������:���������������������18B5H=�(�������������������:������4�(��������(��������0��:������

1 1 0 0 100 1 C9

/0))*))�#)�)� �*)�3����������� �

Page 279: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'0����

������ �� �:�cc����C��������(�=�(�1����(@#�

����� �� �32

��� ��� ��

!�"����� �� �:������������������=����0%������������%���������(���:����0%�����������:����9��-���������9����������(������������������� ������������0���:�������������������������2���9����������������������0%������������%���������(���:����0%������ ��������:����9���������������������������������0���:��������2���9����������������������2�����4��(������:���� ������������������:������:������������%���������(���:����0%��������2���������������������%����������������������������(���������������(�������:�����������������0%���CALL������������:����������cc���:���=�����������(�%������������������=��������(��������������� ��������4��+�������������������������������(�����������������:�����������������(���������������0��������!�������������������!���2������������������:������������0���0��� =� ���������(���:�����������(�������cc�0��:��������������0�����0F��������

1 1 00 0cc

/0))*))�#)�)� �*)�3����������� �

Page 280: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'�� ���� ��������� +� �000 NZ non zero Z001 Z zero Z010 NC non carry C011 C carry C100 PO parity odd P/V101 PE parity even P/V110 P sign positive S111 M sign negative S

�:�cc������C

���-��� ��"� �� A��!��02�23 11 (5, 3, 3) 2.75

�:�cc���:���C

���-��� ��"� �� A��!��02�21 5 1.25

�� ���� �#����$%%"� ��.���

&��'���� �:����9�:����������!�����������=�����������:�����������������������3535H=�����������:����9��-������������2000H=�����������:������%���������2000H�����B5H=���������������:������%���������2001H�����18H�����4��������: RET M ����������:����9��-����������2002H=���������������:���������������������18B5H=�(�������������������:������4�(��������(��������0��:������

/0))*))�#)�)� �*)�3����������� �

Page 281: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'0��

������ �� ������:����������(

����� �� �32�

!�"����� �� 2����������������������������:�����-�0���������(����������������C

• Restore the contents of the Program Counter (PC) (analogous to the RET instruction)

• Signal an I/O device that the interrupt routine is completed. The RETI instruction also facilitates the nesting of interrupts, allowing higher priority devices to temporarily suspend service of lower priority service routines. However, this instruction does not enable interrupts that were disabled when the interrupt routine was entered. Before doing the RETI instruction, the enable interrupt instruction (EI) should be executed to allow recognition of interrupts after completion of the current service routine.

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� <����C�2 ��������(����������=� ���������*������������������%/���������:�������������������������������(�����%�����*�

1 1 0 0 111 1 ED

0 1 0 0 110 1 4D

A B

IEI IEOIEI IEO

+

INT

/0))*))�#)�)� �*)�3����������� �

Page 282: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

B generates an interrupt and is acknowledged. The interrupt enable out, IEO, of B goes Low, blocking any lower priority devices from interrupting while B is being serviced. Then A gen-erates an interrupt, suspending service of B. The IEO of A goes Low, indicating that a higher priority device is being serviced. The A routine is completed and a RETI is issued resetting the IEO of A, allowing the B routine to continue. A second RETI is issued on completion of the B routine and the IE0 of B is reset (high) allowing lower priority devices interrupt access.

/0))*))�#)�)� �*)�3����������� �

Page 283: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'0�)

������ �� ������:����������-�0���������(

����� �� �32.

!�"����� �� 2����������������������������:������/��-�0���������(���������������������������������:����������������������������������������32������������2�������:��!! �����(����0��-����!!#��������-�0���������(��������0�������������%�:���� ��������32.��:���%� �������0����0�:������������-�0���������(�

���-��� ��"� �� A��!��02�24 14 (4, 4, 3, 3) 3.50

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:����9��-������������1000H=���������������:�����������������������1A45H=� ������������-�0���������(��.$�������������������=��������������������4��������������������������������%�������0066H��2��������������������������������:�1A45H���(�������������4��������-��������:�0FFFH�����0FFEH=�����������/0%��:��=�����0066H���������������������������������2���������0��������������(���������������������� �����RETN������������(�������4��������: RETN ���:�������������������������������(�((����::�����4�����������%���-=��� �������:��=��������������9��-���������������������:�1000H��2���(�������:�� ��������� ���������:��::� �������(������:������������1A45H=������/0%��:��=�����88��1���������������������������������2���������0��������������(���������������������� �����RETN��������������4��������: RETN ���:�������������������������������(�((����::�����4�����������%���-=��� �������:��=��������������9��-���������������������:�

1 1 0 0 111 1 ED

0 1 0 0 110 0 45

/0))*))�#)�)� �*)�3����������� �

Page 284: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

1000H��2���(�������:�� ��������� ���������:��::� �������(������:������������1A45H�

/0))*))�#)�)� �*)�3����������� �

Page 285: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

'"��%

������ �� �9�/#������1=��9�/ �������=���1���8=��������

����� �� �92

��� ��� (

!�"����� �� 2����������������������������������������(�������������4�����������%���-=��������(����D���������%���������������0%��(������(����������������������������4�����������0����� �������(�������������������� �(��������0%�����2���(�����(��:������0%�:�������������������������:����9��-���������9��=����������������/������0%���:��������������%��������� �(��������0%�9�=�������������9�������=������������������ �������0%���:����������������� �(��������0%�9���2��������������������� �:�����F��(��������:�����������������������������0���0��� ��2����(������p������0����������0F���������������������(�������2�����

*������������������������(����D�����:������%=���������������0%���:������������� ���00H��2������0����������:�������(���������:�����0������������������� �������0%���:����

% �00H 00008H 00110H 01018H 01120H 10028H 10130H 11038H 111

���-��� ��"� �� A��!��02�23 11 (5, 3, 3) 2.75

1 1 t 11 1

/0))*))�#)�)� �*)�3����������� �

Page 286: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:�����������������������#�*'1=����4��������: RST 18H ��0F��������1101111���������������0018H=�������������:������4��(������:������

/0))*))�#)�)� �*)�3����������� �

Page 287: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��%��� ������%���9��%

�)��E�5�6

������ �� �������

����� �� �.

��� ��� �=����

!�"����� �� 2����(����������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(����2����������:��������������������((�����������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ ������������������������������������������

���-��� ��"� �� A��!��.�23 11 (4, 3, 4) 2.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�������������������23H=�����0%��7BH���������0��������(���(���������������((������,��(���������01H�����4��������:�INA, (01H) ���������������������7BH�

1 1 1 1 100 1 DB

n

/0))*))�#)�)� �*)�3����������� �

Page 288: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)��5�6

������ �� �������

����� �� �.

��� ��� �=����

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(����2����������:��������*�����(�������������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ �����������������������������������������:�����%��:����������������� ��������:���� �����0��=� �������������������������(�������'/0����:�����:���������2���:���������::����=�����-���������(������

'���� Flag 110 Undefined Op Code, set the flag

B 000C 001D 010E 011H 100L 101A 111

���-��� ��"� �� A��!��02�23 12 (4, 4, 4) 3.00

1 1 0 0 111 1 EB

0 1 r 00 0

/0))*))�#)�)� �*)�3����������� �

Page 289: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�� ���� �#����$%%"� ��

9������:���(���������������M��������� ��;������:���(��������D���M��������� ��1�������,J������:�(���%�������M��������� ��.��������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����10H=�����0%��7BH���������0��������(���(���������������((������,��(���������07H���:����4��������:�IN�D,�(C)��������6��������7BH�

/0))*))�#)�)� �*)�3����������� �

Page 290: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)�

������ �� �1��������=�*���*�/#=�1����1��@�#

����� �� �.�

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*���%�0����������0%��������=�����������������(�������������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ ���������������2����������:����1���������(������������(������������������0�����������(��0%���� ���������������(����������������:������%��!�����%=����0%���������������������������������(����1���������������

���-��� ��"� �� A��!��02�24 16 (4, 5, 3, 4) 4.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�*O#�N�8=��������� ��1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����10H=�����������:����1���������(��������1000H=�����0%��7BH���������0��������(���(���������������((�������,��(���������07H�����4��������:�INI �����%���������1000H��������7BH=����1���������(�����������1001H=������������*��������0FH�

1 1 0 0 111 1 ED

1 0 0 1 001 0 A2

/0))*))�#)�)� �*)�3����������� �

Page 291: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)�'

������ �� �1��������=�*���*�/#=�1����1��@#

����� �� �.��

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*�����������0%��������=�����������������(�������������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ ���������������2����������:����1���������(��������(������������������0�����������(��0%���� ���������������(����������������:������%��2�����������(����1��������������=����0%������������������������:������������������*��������D���=��������������������������:�*������D���=��������������������0%� ��������������������(������������(������������D������� ����:�����%�����4������:���������������:����

Note: if B is set to zero prior to instruction execution, 256 bytes of data are input.

32�:���)(���-��� ��"� �� A��!��02�2

5 21 (4, 5, 3, 4, 5) 5.25

32�:�;�)(���-��� ��"� �� A��!��02�2

4 16 (4, 5, 3, 4) 4.00

�� ���� �#����$%%"� ��

9�����-�� �;����1�����-�� ��,J�����-�� �

1 1 0 0 111 1 ED

1 0 1 1 001 0 B2

/0))*))�#)�)� �*)�3����������� �

Page 292: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����03H=�����������:����1���������(��������1000H=��������:���� �����+�������:�0%������������0��������(���(���������������((������,��(����:�������07HC

51HA9H03H

�������4��������:�INIR ���1� �������(�����������#88'1=��������*��������D���=����������%�������������������:���� ���C

1000H� �������51H1001H� �������A9H1002H� �������03H

/0))*))�#)�)� �*)�3����������� �

Page 293: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)&

������ �� �1��������=�*���*�/#=�1����1��/#

����� �� �.6

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*���%�0����������0%��������=�����������������(�������������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ ���������������2����������:����1���������(��������(������������������0�����������(��0%���� ���������������(����������������:������%��!�����%=����0%��������������������(����1�����������������

1 1 0 0 111 1 ED

1 0 0 1 001 1 AA

/0))*))�#)�)� �*)�3����������� �

Page 294: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���-��� ��"� �� A��!��02�24 16 (4, 5, 3, 4) 4.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�*O#�N�8M��������� ��1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����10H=�����������:����1���������(��������1000H=�����0%��7BH���������0��������(���(���������������((������,��(���������07H�����4��������:�IND �����%���������1000H��������7BH=����1���������(�����������0FFFH=������������*��������0FH�

/0))*))�#)�)� �*)�3����������� �

Page 295: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�)&'

������ �� �1��������=�*���#'#=�1����1�#

����� �� �.6�

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*�����������0%��������=�����������������(�������������(����:���5���������#����:����������0������������2��������0%��:��������������(�����(����������������0������ ���������������2����������:����1���������(��������(������������������0�����������(��0%���� ���������������(����������������:������%��2����1���������0%��������������������������:������������������*��������D���=��������������������������:�*������D���=��������������������0%� ��������������������(������������(������������D������� ����:�����%���������4�������:���������������:����

&����*�������D����(�����������������4������=� ���0%���:�����������(��

32�:���)���-��� ��"� �� A��!��02�2� �!�<$��������$���= �+��

32�:�;�)(���-��� ��"� �� A��!��02�2$ !"�<$��������$= $+))

�� ���� �#����$%%"� ��

9�����-�� �;����1�����-�� ��,J�����-�� �.����

1 1 0 0 111 1 ED

1 0 1 1 001 1 BA

/0))*))�#)�)� �*)�3����������� �

Page 296: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����03H=�����������:����1���������(��������1000H=��������:���� �����+�������:�0%������������0��������(���(���������������((������,��(���������07HC

51HA9H03H

�������4��������:�INDR����1� �������(�����������0FFDH=��������*��������D���=����������%�������������������:���� ���C

0FFEH� �������03H0FFFH� �������A9H1000H� �������51H

/0))*))�#)�)� �*)�3����������� �

Page 297: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����5�6E��

������ �� �������

����� �� ��2

��� ��� ���=��

!�"����� �� 2����(����������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(����2����������:�������������������������������((�����������(����:���5���������#����:����������0������������2�������0%������������������������������(����������������0������ �����������������(���(�������������

���-��� ��"� �� A��!��02�23 11 (4, 3, 4) 2.75

�� ���� �#����$%%"� ��.���

&��'���� �:�����������:�������������������23H=����4��������: OUT �01H�=�0%��23H��� ����������(���(���������������((������,��(���������01H�

1 1 1 1 100 0 D3

n

/0))*))�#)�)� �*)�3����������� �

Page 298: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����5�6E�

������ �� �������

����� �� ��2

��� ��� ���=��

!�"����� �� 2����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(����2����������:��������*�����(�������������(����:���5���������#����:����������0������������2�������0%�������������������������(����������������0������ �����������������(���(����������������������������:�����%��:����������������� ��������:���� �����0��=� ����������� ���������(�����������/0����:�����:������������((�������������0�����0F�������C

'���� B 000C 001D 010E 011H 100L 101A 111

���-��� ��"� �� A��!��02�23 12 (4, 4, 4) 3.00

�� ���� �#����$%%"� ��.���

1 1 0 0 111 1 ED

0 1 r 00 1

/0))*))�#)�)� �*)�3����������� �

Page 299: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

&��'���� �:�����������:��������������01H=���������������:��������6�����5AH=����4��������:�OUT�(C),D�0%��5AH��� ����������(���(���������������((������,��(���������01H�

/0))*))�#)�)� �*)�3����������� �

Page 300: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

����

������ �� �������1��=�*���*�/#=�1����1��@�#

����� �� ��2�

!�"����� �� 2����������:����1���������(��������(������������������0���������������������������%��2���0%����������������������%�������������(������%�����������������2���=��:������0%����������*��������������=�����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*���%�0����������0%��������=��������������������������(�������������(����:���5���������#����:����������0���2���0%����0����(����(����������������0������ ����������������(���(��������������!�����%=�����������(����1���������������

���-��� ��"� �� A��!��02�24 16 (4, 5, 3, 4) 4.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�*O#�N�8M��������� ��1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����10H=�����������:����1���������(��������#888#)=���������������:������%�������1000H������7#)=������:��������4��������:�OUTI��������*��������0FH=����1���������(�����������1001H=�����0%��59H��� ����������(���(���������������((������,��(���������07H�

1 1 0 0 111 1 ED

1 0 0 1 101 0 A3

/0))*))�#)�)� �*)�3����������� �

Page 301: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���'

������ �� �������1��=�*���*�/#=�1����1��@�#

����� �� �2��

!�"����� �� 2����������:����1���������(��������(������������������0���������������������������%��2���0%����������������������%�������������(�/�����%�����������������2���=��:������0%����������*��������������=�����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*���%�0����������0%��������=��������������������������(�������������(����:���5���������#����:����������0������������.�4=����0%����0����(����(����������������0������ �����������������(���(��������������2�����������(����1�����������������:���������������*�������������D���=�������������������������������������0%� ����������������������(�������:�*�����������D���=�������������������������������(������������D������� ����:�����%���������4�������:���������������:����

Note: When B is set to zero prior to instruction execution, the instruc-tion outputs 256 bytes of data.

�:�*���8C

���-��� ��"� �� A��!��02�25 21 (4, 5, 3, 4, 5) 5.25

�:�*�N�8C

���-��� ��"� �� A��!��02�24 16 (4, 5, 3, 4) 4.00

�� ���� �#����$%%"� ��

1 1 0 0 111 1 ED

1 0 1 1 101 0 B3

/0))*))�#)�)� �*)�3����������� �

Page 302: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

9�����-�� �;����1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����03H=�����������:����1���������(��������1000H=����������%�����������������:���� ���������C

1000H� �������51H1001H� �������A9H1002H� �������03H

�������4��������:�OTIR����1���������(�����������1003H=��������*��������D���=�����������(��:�0%���� ����������(���(���������������((������,��(���������07H�������:���� �����+�����C

51HA9H03H

/0))*))�#)�)� �*)�3����������� �

Page 303: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

���&

������ �� �������1��=�*���*�/#=�1����1��/#

����� �� ��26

!�"����� �� 2����������:����1���������(��������(������������������0���������������������������%��2���0%����������������������%�������������(������%�����������������2���=��:������0%����������*��������������=�����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(�����������*���%�0����������0%��������=��������������������������(�������������(����:���5���������#����:����������0������������.�4=����0%����0����(����(����������������0������ �����������������(���(��������������!�����%=�����������(����1���������������

���-��� ��"� �� A��!��02�24 16 (4, 5, 3. 4) 4.00

�� ���� �#����$%%"� ��

9�����-�� �;������:�*O#�N�8M��������� ��1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����10H=�����������:����1���������(��������1000H=���������������:������%���������1000H�����59H=����4��������:�OUTD��������*��������0FH=����1���������(�����������0FFFH=�����0%��59H��� ����������(���(���������������((������,��(���������07H�

1 1 0 0 111 1 ED

1 0 0 1 101 1 AB

/0))*))�#)�)� �*)�3����������� �

Page 304: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

��&'

������ �� �������1��=�*���*�/�#=�1����1��/�#

����� �� �26�

!�"����� �� 2����������:����1���������(��������(������������������0���������������������������%��2���0%����������������������%�������������(�/�����%�����������������2���=��:������0%����������*��������������=�����������:��������������(������������0�������:���8���������"���:����������0�������������,����������������:� ���(��0���(��������/���*���%�0����������0%��������=��������������������������(�������������(����:���5���������#����:����������0������������.�4=����0%����0����(����(����������������0������ �����������������(���(��������������2���=��������(����1��������������������:���������������*�������������D���=�������������������������������������0%� ����������������������(�������:�*�����������D���=�������������������/������������(������������D������� ����:�����%���������4�������:���������������:����

Note: When B is set to zero prior to instruction execution, the instruc-tion outputs 256 bytes of data.

�:�*���8C

���-��� ��"� �� A��!��02�25 21 (4, 5, 3, 4, 5) 5.25

�:�*�N�8C

���-��� ��"� �� A��!��02�24 16 (4, 5, 3, 4) 4.00

1 1 0 0 111 1 ED

1 0 1 1 101 1 BB

/0))*))�#)�)� �*)�3����������� �

Page 305: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

�� ���� �#����$%%"� ��

9�����-�� �;����1�����-�� ��,J�����-�� �.������������::����

&��'���� �:�����������:��������������07H=�����������:��������*�����03H=�����������:����1���������(��������1000H=����������%�����������������:���� ���������C

0FFEH� �������51H0FFFH� �������A9H1000H� �������03H

�������4��������:�OTDR����1���������(�����������0FFDH=��������*��������D���=�����������(��:�0%���� ����������(���(���������������((������,��(���������8"1�������:���� �����+�����C

03HA9H51H

/0))*))�#)�)� �*)�3����������� �

Page 306: Z80 Family CPU - Tiscaliweb.tiscali.it/biogenesis.neuronica/pdf/uPz80.pdf · ZiLOG recommends that the user read and understand everything in this manual before setting up and using

��������� ���� ���

���

/0))*))�#)�)� �*)�3����������� �