Zilog Z80380 Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Sensores Zilog Z80380. Zilog Z80380 User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 268
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
DC-8297-03
PREFACE
Thank you for your interest in the Z380
Central Processing Unit (CPU) and its
associated family of products. This Technical Manual describes programming
and operation of the Z380
Superintegration
Core CPU, which is found in the
Z380 Microprocessor Unit (MPU), and products built around Z380
CPU core.
This Z380 User's Manual consists of the following Sections:
1. Z380
Architectural Overview
Chapter 1 is an introductory section covering the key features and
giving an overview of the architecture of the device.
2. Address Spaces
Chapter 2 explains the address spaces the Z380 CPU can handle.
Also, this chapter includes a brief description of the on-chip regis-
ters.
3. Native/Extended Mode, Word/Long Word Mode of Operation,
and Decoder Directives
This chapter provides a detailed explanation on the Z380’s unique
features, operation modes, and the Decoder Directives.
4. Addressing Modes and Data Types
Chapter 4 describes the Addressing mode and data types which the
Z380 can handle.
5. Instruction Set
Chapter 5 contains an overview of the instruction set; as well as a
detailed instruction-by-instruction description in alphabetical order.
6. Interrupts and Traps
Chapter 6 explains the interrupts and traps features of the Z380.
7. Reset
Chapter 7 describes the Reset function.
8. Z380 Benchmark Appnote
9. Z380 Questions & Answers
Z80380 CPU
U
SER'S MANUAL
Vista de página 0
1 2 3 4 5 6 ... 267 268

Resumo do Conteúdo

Página 1 - 'S MANUAL

DC-8297-03PREFACEThank you for your interest in the Z380™ Central Processing Unit (CPU) and itsassociated family of products. This Technical Manual de

Página 2

2-2Z380™USER'S MANUALDC-8297-03ZILOG2.2 CPU REGISTER SPACE (Continued)AFBCDEHLIXU IXLIYU IYLA' F'B' C'D' E'H'

Página 3 - CHAPTER 1

5-66Z380™USER'S MANUALDC-8297-03ZILOGININPUT ACCUMULATORIN A,(n)Operation: A ← (n)The byte of data from the selected peripheral is loaded into th

Página 4 - 1.1 INTRODUCTION (Continued)

5-67Z380™USER'S MANUALZILOGDC-8297-03IN0INPUT (FROM PAGE 0)IN0 dst,(n) dst = ROperation: dst ← (n)The byte of data from the selected on-chip peri

Página 5 - 1.2.2 Address Spaces

5-68Z380™USER'S MANUALDC-8297-03ZILOGINAINPUT DIRECT FROM PORT ADDRESS (BYTE)INA A,(nn)Operation: A ← (nn)The byte of data from the selected peri

Página 6 - 1.2.6 Exception Conditions

5-69Z380™USER'S MANUALZILOGDC-8297-03INAWINPUT DIRECT FROM PORT ADDRESS (WORD)INAW HL,(nn)Operation: HL(15-0) ← (nn)The word of data from the sel

Página 7 - 1.3.1 High Throughput

5-70Z380™USER'S MANUALDC-8297-03ZILOGINCINCREMENT (BYTE)INC dstdst = R, RX, IR, XOperation: dst ← dst + 1The destination operand is incremented b

Página 8 - 1.4 SUMMARY

5-71Z380™USER'S MANUALZILOGDC-8297-03INC[W]INCREMENT (WORD)INC[W] dst dst = R, RXOperation: if (XM) then begindst(31-0) < dst(31-0) + 1endelse

Página 9

5-72Z380™USER'S MANUALDC-8297-03ZILOGINDINPUT AND DECREMENT (BYTE)INDOperation: (HL) ← (C)B ← B – 1HL ← HL – 1This instruction is used for block

Página 10 - SER'S MANUAL

5-73Z380™USER'S MANUALZILOGDC-8297-03INDWINPUT AND DECREMENT (WORD)INDWOperation: (HL) ← (DE)BC(15-0) ← BC(15-0) – 1HL ← HL – 2This instruction i

Página 11

5-74Z380™USER'S MANUALDC-8297-03ZILOGINDRINPUT, DECREMENT AND REPEAT (BYTE)INDROperation: repeat until (B=0) begin(HL) ← (C)B ← B – 1HL ← HL – 1e

Página 12 - 2.4 MEMORY ADDRESS SPACE

5-75Z380™USER'S MANUALZILOGDC-8297-03INDRWINPUT, DECREMENT AND REPEAT (WORD)INDRWOperation: repeat until (BC=0) begin(HL) ← (DE)BC(15-0) ← BC(15-

Página 13

2-3Z380™USER'S MANUALZILOGDC-8297-032.2.1 Primary and Working RegistersThe working register set is divided into two register files:the primary fi

Página 14

5-76Z380™USER'S MANUALDC-8297-03ZILOGINIINPUT AND INCREMENT (BYTE)INIOperation: (HL) ← (C)B ← B – 1HL ← HL + 1This instruction is used for block

Página 15 - DC-8297-03

5-77Z380™USER'S MANUALZILOGDC-8297-03INIWINPUT AND INCREMENT (WORD)INIWOperation: (HL) ← (DE)BC(15-0) ← BC(15-0) – 1HL ← HL + 2This instruction i

Página 16 - CHAPTER 2

5-78Z380™USER'S MANUALDC-8297-03ZILOGINIRINPUT, INCREMENT AND REPEAT (BYTE)INIROperation: repeat until (B=0) begin(HL) ← (C)B ← B – 1HL ← HL + 1e

Página 17

5-79Z380™USER'S MANUALZILOGDC-8297-03INIRWINPUT, INCREMENT AND REPEAT (WORD)INIRWOperation: repeat until (BC=0) begin(HL) ← (DE)BC(15-0) ← BC(15-

Página 18

5-80Z380™USER'S MANUALDC-8297-03ZILOGJPJUMPJP [cc,]dst dst = IR, DAOperation: if (cc is TRUE) then beginif (XM) then beginPC(31-0) ← dst(31-0)end

Página 19

5-81Z380™USER'S MANUALZILOGDC-8297-03JRJUMP RELATIVEJR [cc,]dst dst = RAOperation: if (cc is TRUE) then begindst ← SIGN EXTEND dstif (XM) then be

Página 20

5-82Z380™USER'S MANUALDC-8297-03ZILOGLDLOAD ACCUMULATORLD dst,src dst = Asrc = R, RX, IM, IR, DA, Xordst = R, RX, IR, DA, Xsrc = AOperation: dst

Página 21

5-83Z380™USER'S MANUALZILOGDC-8297-03LDLOAD IMMEDIATE (BYTE)LD dst,n dst = R, RX, IR, XOperation: dst ← nThe byte of immediate data is loaded int

Página 22

5-84Z380™USER'S MANUALDC-8297-03ZILOGLDLOAD IMMEDIATE (WORD)LD dst,nn dst = R, RXOperation: if (LW) then begindst(31-0) ← nnendelse begindst(15-0

Página 23 - CHAPTER 3

5-85Z380™USER'S MANUALZILOGDC-8297-03LDWLOAD IMMEDIATE (WORD)LDW dst,nn dst = IROperation: if (LW) then begindst(31-0) ← nnendelse begindst(15-0)

Página 24 - 3.2 DECODER DIRECTIVES

2-4Z380™USER'S MANUALDC-8297-03ZILOG2.2.6 Stack Pointer (Continued)Increment/decrement of the Stack Pointer is affected bymodes of operation (Nat

Página 25

5-86Z380™USER'S MANUALDC-8297-03ZILOGLDLOAD REGISTER (BYTE)LD dst,src dst = Rsrc = R, RX, IM, IR, Xordst = R, RX, IR, Xsrc = ROperation: dst ← sr

Página 26 - CHAPTER 4

5-87Z380™USER'S MANUALZILOGDC-8297-03LD[W]LOAD REGISTER (WORD)LD[W] dst,src dst = Rsrc = R, RX, IR, DA, X, SRordst = R, RX, IR, DA, X, SRsrc = RO

Página 27 - 4.2.3 Indirect Register (IR)

5-88Z380™USER'S MANUALDC-8297-03ZILOGLD[W]LOAD REGISTER (WORD)Load from RegisterAddressing ExecuteMode Syntax Instruction Format Time NoteRX: LD

Página 28 - 4.2.4 Direct Address (DA)

5-89Z380™USER'S MANUALZILOGDC-8297-03LDLOAD STACK POINTERLD dst,src dst = SPsrc = R, RX, IM, DAordst = DAsrc = SPOperation: if (LW) then begindst

Página 29 - 4.2.5 Indexed (X)

5-90Z380™USER'S MANUALDC-8297-03ZILOGLDLOAD FROM I OR R REGISTER (BYTE)LD dst,src dst = Asrc = I, ROperation: dst ← srcThe contents of the source

Página 30

5-91Z380™USER'S MANUALZILOGDC-8297-03LDLOAD INTO I OR R REGISTER (BYTE)LD dst,src dst = I, Rsrc = AOperation: dst ← srcThe contents of the accumu

Página 31

5-92Z380™USER'S MANUALDC-8297-03ZILOGLD[W]LOAD I REGISTER (WORD)LD[W] dst,src dst = HLsrc = I ORdst = Isrc = HLOperation: if (LW) then begindst

Página 32

5-93Z380™USER'S MANUALZILOGDC-8297-03LDCTLLOAD CONTROL REGISTER (BYTE)LDCTL dst,src dst = DSR, XSR, YSRsrc = A, IMordst = Asrc = DSR, XSR, YSRord

Página 33

5-94Z380™USER'S MANUALDC-8297-03ZILOGLDCTLLOAD FROM CONTROL REGISTER (WORD)LDCTL dst,src dst = HLsrc = SROperation: if (LW) then begindst(31-0) ←

Página 34 - 4.3 DATA TYPES

5-95Z380™USER'S MANUALZILOGDC-8297-03LDCTLLOAD INTO CONTROL REGISTER (WORD)LDCTL dst,src dst = SRsrc = HLOperation: if (LW) then begindst(31-16)

Página 35 - CHAPTER 5

2-5Z380™USER'S MANUALZILOGDC-8297-0376543210Bits within a byte:16-bit word at address n:Least Significant ByteMost Significant ByteAddress nAddre

Página 36

5-96Z380™USER'S MANUALDC-8297-03ZILOGLDDLOAD AND DECREMENT (BYTE)LDDOperation: (DE) ← (HL)DE ← DE – 1HL ← HL – 1BC(15-0) ← BC(15-0) – 1This instr

Página 37 - 5.2.7 Condition Codes

5-97Z380™USER'S MANUALZILOGDC-8297-03LDDWLOAD AND DECREMENT (WORD)LDDWOperation: if (LW) then begin(DE) ← (HL)(DE+1) ← (HL+1)(DE+2) ← (HL+2)(DE+3

Página 38

5-98Z380™USER'S MANUALDC-8297-03ZILOGLDDRLOAD, DECREMENT AND REPEAT (BYTE)LDDROperation: repeat until BC=0 begin(DE) ← (HL)DE ← DE – 1HL ← HL – 1

Página 39

5-99Z380™USER'S MANUALZILOGDC-8297-03LDDRWLOAD, DECREMENT AND REPEAT (WORD)LDDRWOperation: repeat until (BC=0) beginif (LW) then begin(DE) ← (HL)

Página 40

5-100Z380™USER'S MANUALDC-8297-03ZILOGLDILOAD AND INCREMENT (BYTE)LDIOperation: (DE) ← (HL)DE ← DE + 1HL ← HL + 1BC(15-0) ← BC(15-0) – 1This inst

Página 41 - SWAP, and PUSH/POP Group

5-101Z380™USER'S MANUALZILOGDC-8297-03LDIWLOAD AND INCREMENT (WORD)LDIWOperation: if (LW) then begin(DE) ← (HL)(DE+1) ← (HL+1)(DE+2) ← (HL+2)(DE+

Página 42

5-102Z380™USER'S MANUALDC-8297-03ZILOGLDIRLOAD, INCREMENT AND REPEAT (BYTE)LDIROperation: repeat until (BC=0) begin(DE) ← (HL)DE ← DE + 1HL ← HL

Página 43

5-103Z380™USER'S MANUALZILOGDC-8297-03LDIRWLOAD, INCREMENT AND REPEAT (WORD)LDIRWOperation: repeat until (BC=0) beginif (LW) then begin(DE) ← (HL

Página 44

5-104Z380™USER'S MANUALDC-8297-03ZILOGMLTMULTIPLY UNSIGNED (BYTE)MLT R src = ROperation: R(15-0) ← R(7-0) x R(15-8)The contents of the upper byte

Página 45

5-105Z380™USER'S MANUALZILOGDC-8297-03MTESTMODE TESTMTESTOperation: S ← SR(7)Z ← SR(6)C ← SR(1)The three mode control bits in the Select Register

Página 46 - 5.5.8 Program Control Group

2-6Z380™USER'S MANUALDC-8297-03ZILOG2.5. EXTERNAL I/O ADDRESS SPACEExternal I/O address space is 4 Gbytes in size and ExternalI/O addresses are g

Página 47

5-106Z380™USER'S MANUALDC-8297-03ZILOGMULTWMULTIPLY (WORD)MULTW [HL,]src src = R, RX, IM, XOperation: HL(31-0) ← HL(15-0) x src(15-0)The contents

Página 48

5-107Z380™USER'S MANUALZILOGDC-8297-03MULTUWMULTIPLY UNSIGNED (WORD)MULTUW [HL,]src src = R, RX, IM, XOperation: HL(31-0) ← HL(15-0) x src(15-0)T

Página 49

5-108Z380™USER'S MANUALDC-8297-03ZILOGNEGNEGATE ACCUMULATORNEG [A]Operation: A ← -AThe contents of the accumulator are negated, that is replaced

Página 50 - 5.5.11 CPU Control Group

5-109Z380™USER'S MANUALZILOGDC-8297-03NEGWNEGATE HL REGISTER (WORD)NEGW [HL]Operation: HL(15-0) ← -HL(15-0)The contents of the HL register are ne

Página 51 - 5.5.12 Decoder Directives

5-110Z380™USER'S MANUALDC-8297-03ZILOGNOPNO OPERATIONNOPOperation: NoneNo operation.Flags: S: UnaffectedZ: UnaffectedH: UnaffectedV: UnaffectedN:

Página 52 - 5.7 EXECUTION TIME

5-111Z380™USER'S MANUALZILOGDC-8297-03OROR (BYTE)OR [A,]src src = R, RX, IM, IR, XOperation: A ← A OR srcA logical OR operation is performed betw

Página 53

5-112Z380™USER'S MANUALDC-8297-03ZILOGORWOR (WORD)ORW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) OR src(15-0)A logical OR operatio

Página 54 - ADD WITH CARRY (BYTE)

5-113Z380™USER'S MANUALZILOGDC-8297-03OTDMOUTPUT DECREMENT MEMORYOTDMOperation: (C) ← (HL)C ← C – 1B ← B – 1HL ← HL – 1This instruction is used f

Página 55 - ADD WITH CARRY (WORD)

5-114Z380™USER'S MANUALDC-8297-03ZILOGOTDMROUTPUT, DECREMENT MEMORY REPEATOTDMROperation: repeat until (B=0) begin(C) ← (HL)C ← C – 1B ← B – 1HL

Página 56

5-115Z380™USER'S MANUALZILOGDC-8297-03OTDROUTPUT, DECREMENT AND REPEAT (BYTE)OTDROperation: repeat until (B=0) beginB ← B – 1(C) ← (HL)HL ← HL –

Página 57 - ADD (BYTE)

2-7Z380™USER'S MANUALZILOGDC-8297-03Zilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless

Página 58 - ADD (WORD)

5-116Z380™USER'S MANUALDC-8297-03ZILOGOTDRWOUTPUT, DECREMENT AND REPEAT (WORD)OTDRWOperation: repeat until (BC=0) beginBC(15-0) ← BC(15-0) – 1(DE

Página 59 - ADD TO STACK POINTER (WORD)

5-117Z380™USER'S MANUALZILOGDC-8297-03OTIMOUTPUT INCREMENT MEMORYOTIMOperation: (C) ← (HL)C ← C + 1B ← B – 1HL ← HL + 1This instruction is used f

Página 60

5-118Z380™USER'S MANUALDC-8297-03ZILOGOTIMROUTPUT, INCREMENT MEMORY REPEATOTIMROperation: repeat until (B=0) begin(C) ← (HL)C ← C + 1B ← B – 1HL

Página 61 - AND (BYTE)

5-119Z380™USER'S MANUALZILOGDC-8297-03OTIROUTPUT, INCREMENT AND REPEAT (BYTE)OTIROperation: repeat until (B=0) beginB ← B – 1(C) ← (HL)HL ← HL +

Página 62 - AND (WORD)

5-120Z380™USER'S MANUALDC-8297-03ZILOGOTIRWOUTPUT, INCREMENT AND REPEAT (WORD)OTIRWOperation: repeat until (BC=0) beginBC(15-0) ← BC(15-0) – 1(DE

Página 63 - BIT TEST

5-121Z380™USER'S MANUALZILOGDC-8297-03OUTOUTPUT (BYTE)OUT (C),src src = R, IMOperation: (C) ← srcThe byte of data from the source is loaded into

Página 64 - BANK TEST

5-122Z380™USER'S MANUALDC-8297-03ZILOGOUTWOUTPUT (WORD)OUTW (C),src src = R, IMOperation: (C) ← src(15-0)The word of data from the source is load

Página 65

5-123Z380™USER'S MANUALZILOGDC-8297-03OUTOUTPUT ACCUMULATOROUT (n),AOperation: (n) ← AThe byte of data from the accumulator is loaded into the se

Página 66 - CALL RELATIVE

5-124Z380™USER'S MANUALDC-8297-03ZILOGOUT0OUTPUT (TO PAGE 0)OUT0 (n),src src = ROperation: (n) ← srcThe byte of data from the source register is

Página 67 - COMPLEMENT CARRY FLAG

5-125Z380™USER'S MANUALZILOGDC-8297-03OUTAOUTPUT DIRECT TO PORT ADDRESS (BYTE)OUT (nn),AOperation: (nn) ← AThe byte of data from the accumulator

Página 68 - COMPARE (BYTE)

2-1Z380™USER'S MANUALZILOGDC-8297-032.1 INTRODUCTIONUSER’s MANUALCHAPTER 2ADDRESS SPACESThe Z380 CPU supports five address spaces correspond-ing

Página 69 - COMPARE (WORD)

5-126Z380™USER'S MANUALDC-8297-03ZILOGOUTAWOUTPUT DIRECT TO PORT ADDRESS (WORD)OUT (nn),HLOperation: (nn)← HL(15-0)The word of data from the HL r

Página 70 - COMPARE AND DECREMENT (BYTE)

5-127Z380™USER'S MANUALZILOGDC-8297-03OUTDOUTPUT AND DECREMENT (BYTE)OUTDOperation: B ← B - 1(C) ← (HL)HL ← HL - 1This instruction is used for bl

Página 71

5-128Z380™USER'S MANUALDC-8297-03ZILOGOUTDWOUTPUT AND DECREMENT (WORD)OUTDWOperation: BC(15-0) ← BC(15-0) - 1(DE) ← (HL)HL ← HL - 2This instructi

Página 72 - COMPARE AND INCREMENT (BYTE)

5-129Z380™USER'S MANUALZILOGDC-8297-03OUTIOUTPUT AND INCREMENT (BYTE)OUTIOperation: B ← B - 1(C) ← (HL)HL ← HL + 1This instruction is used for bl

Página 73

5-130Z380™USER'S MANUALDC-8297-03ZILOGOUTIWOUTPUT AND INCREMENT (WORD)OUTIWOperation: BC(15-0) ← BC(15-0) –1(DE) ← (HL)HL ← HL + 2This instructio

Página 74 - COMPLEMENT ACCUMULATOR

5-131Z380™USER'S MANUALZILOGDC-8297-03POPPOP ACCUMULATORPOP dst dst = AFOperation: F ← (SP)A ← (SP+1)SP ← SP + 2if (LW) then beginSP ← SP + 2endT

Página 75 - COMPLEMENT HL REGISTER (WORD)

5-132Z380™USER'S MANUALDC-8297-03ZILOGPOPPOP CONTROL REGISTERPOP dst dst = SROperation: if (LW) then begindst(6-0) ← (SP)dst(15-8) ← (SP+1)dst(23

Página 76 - DECIMAL ADJUST ACCUMULATOR

5-133Z380™USER'S MANUALZILOGDC-8297-03POPPOP REGISTERPOP dst dst = R, RXOperation: if (LW) then begindst(7-0 ) ← (SP)dst(15-8) ← (SP+1)dst(23-16)

Página 77 - DECODER DIRECTIVE

5-134Z380™USER'S MANUALDC-8297-03ZILOGPUSHPUSH ACCUMULATORPUSH src src = AFOperation: if (LW) then beginSP ← SP - 4(SP) ← F(SP+1) ← A(SP+2) ← 00h

Página 78 - DECREMENT (BYTE)

5-135Z380™USER'S MANUALZILOGDC-8297-03PUSHPUSH CONTROL REGISTERPUSH src src = SROperation: if (LW) then beginSP ← SP - 4(SP) ← src(7-0)(SP+1) ← s

Página 79 - DECREMENT (WORD)

2-2Z380™USER'S MANUALDC-8297-03ZILOG2.2 CPU REGISTER SPACE (Continued)AFBCDEHLIXU IXLIYU IYLA' F'B' C'D' E'H'

Página 80 - DISABLE INTERRUPTS

5-136Z380™USER'S MANUALDC-8297-03ZILOGPUSHPUSH IMMEDIATEPUSH src src = IMOperation: if (LW) then beginSP ← SP - 4(SP) ← src(7-0)(SP+1) ← src(15-8

Página 81 - DIVIDE UNSIGNED (WORD)

5-137Z380™USER'S MANUALZILOGDC-8297-03PUSHPUSH REGISTERPUSH src src = R, RXOperation: if (LW) then beginSP ← SP - 4(SP) ← src(7-0)(SP+1) ← src(15

Página 82

5-138Z380™USER'S MANUALDC-8297-03ZILOGRESRESET BITRES b, dst dst = R, IR, XOperation: dst(b) ← 0The specified bit b within the destination operan

Página 83 - ENABLE INTERRUPTS

5-139Z380™USER'S MANUALZILOGDC-8297-03RESCRESET CONTROL BITRESC mode mode = LCK, LWOperation: if (mode = LCK) then beginSR(1) ← 0endelse beginSR(

Página 84

5-140Z380™USER'S MANUALDC-8297-03ZILOGRETRETURNRET [cc]Operation: if (cc is TRUE) then beginif (XM) then beginPC(7-0) ← (SP)PC(15-8) ← (SP+1)PC(2

Página 85

5-141Z380™USER'S MANUALZILOGDC-8297-03RETBRETURN FROM BREAKPOINTOperation: PC (31-0) ← SPC (31-0)This instruction is used to return to a previous

Página 86 - EXCHANGE REGISTER (WORD)

5-142Z380™USER'S MANUALDC-8297-03ZILOGRETIRETURN FROM INTERRUPTRETIOperation: if (XM) then beginPC(7-0) ← (SP)PC(15-8) ← (SP+1)PC(23-16) ← (SP+2)

Página 87

5-143Z380™USER'S MANUALZILOGDC-8297-03RETNRETURN FROM NONMASKABLE INTERRUPTRETNOperation: if (XM) then beginPC(7-0) ← (SP)PC(15-8) ← (SP+1)PC(23-

Página 88

5-144Z380™USER'S MANUALDC-8297-03ZILOGRLROTATE LEFT (BYTE)RL dst dst = R, IR, XOperation: tmp ← dstdst(0) ← CC ← dst(7)dst(n+1) ← tmp(n) for n =

Página 89 - EXCHANGE WITH ACCUMULATOR

5-145Z380™USER'S MANUALZILOGDC-8297-03RLWROTATE LEFT (WORD)RLW dst dst = R, RX, IR, XOperation: tmp ← dstdst(0) ← CC ← dst(15)dst(n+1) ← tmp(n) f

Página 90

2-3Z380™USER'S MANUALZILOGDC-8297-032.2.1 Primary and Working RegistersThe working register set is divided into two register files:the primary fi

Página 91 - EXTEND SIGN (BYTE)

5-146Z380™USER'S MANUALDC-8297-03ZILOGRLAROTATE LEFT (ACCUMULATOR)RLAOperation: tmp ← AA(0) ← CC ← A(7)A(n+1) ← tmp(n) for n = 0 to 6The contents

Página 92 - EXTEND SIGN (WORD)

5-147Z380™USER'S MANUALZILOGDC-8297-03RLCROTATE LEFT CIRCULAR (BYTE)RLC dst dst = R, IR, XOperation: tmp ← dstC ← dst(7)dst(0) ← tmp(7)dst(n+1) ←

Página 93

5-148Z380™USER'S MANUALDC-8297-03ZILOGRLCWROTATE LEFT CIRCULAR (WORD)RLCW dst dst = R, RX, IR, XOperation: tmp ← dstC ← dst(15)dst(0) ← tmp(15)ds

Página 94

5-149Z380™USER'S MANUALZILOGDC-8297-03RLCAROTATE LEFT CIRCULAR (ACCUMULATOR)RLCAOperation: tmp ← AC ← A(7)A(0) ← tmp(7)A(n+1) ← tmp(n) for n = 0

Página 95

5-150Z380™USER'S MANUALDC-8297-03ZILOGRLDROTATE LEFT DIGITRLDOperation: tmp(3-0) ← A(3-0)A(3-0) ← dst(7-4)dst(7-4) ← dst(3-0)dst(3-0) ← tmp(3-0)T

Página 96

5-151Z380™USER'S MANUALZILOGDC-8297-03RRROTATE RIGHT (BYTE)RR dst dst = R, IR, XOperation: tmp ← dstdst(7) ← CC ← dst(0)dst(n) ← tmp(n+1) for n =

Página 97 - INTERRUPT MODE SELECT

5-152Z380™USER'S MANUALDC-8297-03ZILOGRRWROTATE RIGHT (WORD)RRW dst dst = R, RX, IR, XOperation: tmp ← dstC ← dst(0)dst(15) ← Cdst(n) ← tmp(n+1)

Página 98 - INPUT (BYTE)

5-153Z380™USER'S MANUALZILOGDC-8297-03RRAROTATE RIGHT (ACCUMULATOR)RRAOperation: tmp ← AA(7) ← CC ← A(0)A(n) ← tmp(n+1) for n = 0 to 6The content

Página 99 - INPUT (WORD)

5-154Z380™USER'S MANUALDC-8297-03ZILOGRRCROTATE RIGHT CIRCULAR (BYTE)RRC dst dst = R, IR, XOperation: tmp ← dstC ← dst(0)dst(7) ← tmp(0)dst(n) ←

Página 100 - INPUT ACCUMULATOR

5-155Z380™USER'S MANUALZILOGDC-8297-03RRCWROTATE RIGHT CIRCULAR (WORD)RRCW dst dst = R, RX, IR, XOperation: tmp ← dstC ← dst(0)dst(15) ← tmp(0)ds

Página 101 - INPUT (FROM PAGE 0)

2-4Z380™USER'S MANUALDC-8297-03ZILOG2.2.6 Stack Pointer (Continued)Increment/decrement of the Stack Pointer is affected bymodes of operation (Nat

Página 102

5-156Z380™USER'S MANUALDC-8297-03ZILOGRRCAROTATE RIGHT CIRCULAR (ACCUMULATOR)RRCAOperation: tmp ← AC ← A(0)A(7) ← tmp(0)A(n) ← tmp(n+1) for n = 0

Página 103

5-157Z380™USER'S MANUALZILOGDC-8297-03RRDROTATE RIGHT DIGITRRDOperation: tmp(3-0) ← A(3-0)A(3-0) ← dst(3-0)dst(3-0) ← dst(7-4)dst(7-4) ← tmp(3-0)

Página 104 - INCREMENT (BYTE)

5-158Z380™USER'S MANUALDC-8297-03ZILOGRSTRESTARTRST addressOperation: if (XM) then beginSP ← SP - 4(SP) ← PC(7-0)(SP+1) ← PC(15-8)(SP+2) ← PC(23-

Página 105 - INCREMENT (WORD)

5-159Z380™USER'S MANUALZILOGDC-8297-03SBCSUBTRACT WITH CARRY (BYTE)SBC A,src src = R, RX, IM, IR, XOperation: A ← A - src - CThe source operand t

Página 106 - INPUT AND DECREMENT (BYTE)

5-160Z380™USER'S MANUALDC-8297-03ZILOGSBCSUBTRACT WITH CARRY (WORD)SBC HL,src dst = HLsrc = BC, DE, HL, SPOperation: HL(15-0) ← HL(15-0) - src(15

Página 107 - INPUT AND DECREMENT (WORD)

5-161Z380™USER'S MANUALZILOGDC-8297-03SBCWSUBTRACT WITH CARRY (WORD)SBCW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) - src(15-0) -

Página 108

5-162Z380™USER'S MANUALDC-8297-03ZILOGSCFSET CARRY FLAGSCFOperation: C ← 1The Carry flag is set to 1.Flags: S: UnaffectedZ: UnaffectedH: ClearedV

Página 109

5-163Z380™USER'S MANUALZILOGDC-8297-03SETSET BITSET b, dst dst = R, IR, XOperation: dst(b) ← 1The specified bit b within the destination operand

Página 110 - INPUT AND INCREMENT (BYTE)

5-164Z380™USER'S MANUALDC-8297-03ZILOGSETCSET CONTROL BITSETC mode mode = LCK, LW, XMOperation: if (mode = LCK) then beginSR(1) ← 1endelse if (mo

Página 111 - INPUT AND INCREMENT (WORD)

5-165Z380™USER'S MANUALZILOGDC-8297-03SLASHIFT LEFT ARITHMETIC (BYTE)SLA dst dst = R, IR, XOperation: tmp ← dstC ← dst(7)dst(0) ← 0dst(n+1) ← tmp

Página 112

ZILOGDC-8297-03Appendix AAppendix A covers the Z380’s instruction format.Appendix BAppendix B contains all Z380 instructions sorted in AlphabeticalOrd

Página 113

2-5Z380™USER'S MANUALZILOGDC-8297-0376543210Bits within a byte:16-bit word at address n:Least Significant ByteMost Significant ByteAddress nAddre

Página 114

5-166Z380™USER'S MANUALDC-8297-03ZILOGSLAWSHIFT LEFT ARITHMETIC (WORD)SLAW dst dst = R, RX, IR, XOperation: tmp ← dstdst(0) ← 0C ← dst(15)dst(n+1

Página 115 - JUMP RELATIVE

5-167Z380™USER'S MANUALZILOGDC-8297-03SLPSLEEPSLPOperation: if (STBY not enabled) thenCPU HaltselseZ380 enters Standby modeWith Standby mode disa

Página 116 - LOAD ACCUMULATOR

5-168Z380™USER'S MANUALDC-8297-03ZILOGSRASHIFT RIGHT ARITHMETIC (BYTE)SRA dst dst = R, IR, XOperation: tmp ← dstC ← dst(0)dst(7) ← tmp(7)dst(n) ←

Página 117 - LOAD IMMEDIATE (BYTE)

5-169Z380™USER'S MANUALZILOGDC-8297-03SRAWSHIFT RIGHT ARITHMETIC (WORD)SRAW dst dst = R, RX, IR, XOperation: tmp ← dstC ← dst(0)dst(15) ← tmp(15)

Página 118 - LOAD IMMEDIATE (WORD)

5-170Z380™USER'S MANUALDC-8297-03ZILOGSRLSHIFT RIGHT LOGICAL (BYTE)SRL dst dst = R, IR, XOperation: tmp ← dstC ← dst(0)dst(7) ← 0dst(n) ← tmp(n+1

Página 119

5-171Z380™USER'S MANUALZILOGDC-8297-03SRLWSHIFT RIGHT LOGICAL (WORD)SRLW dst dst = R, RX, IR, XOperation: tmp ← dstC ← dst(0)dst(15) ← 0dst(n) ←

Página 120 - LOAD REGISTER (BYTE)

5-172Z380™USER'S MANUALDC-8297-03ZILOGSUBSUBTRACT (BYTE)SUB A,src src = R, RX, IM, IR, XOperation: A ← A - srcThe source operand is subtracted fr

Página 121 - LOAD REGISTER (WORD)

5-173Z380™USER'S MANUALZILOGDC-8297-03SUBSUBTRACT (WORD)SUB HL,src src = DAOperation: if (XM) then beginHL(31-0) ← HL(31-0) - src(31-0)endelse be

Página 122

5-174Z380™USER'S MANUALDC-8297-03ZILOGSUBSUBTRACT FROM STACK POINTER (WORD)SUB SP,src src = IMOperation: if (XM) then beginSP(31-0) ← SP(31-0) –

Página 123 - LOAD STACK POINTER

5-175Z380™USER'S MANUALZILOGDC-8297-03SUBWSUBTRACT (WORD)SUBW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) - src(15-0)The source ope

Página 124

2-6Z380™USER'S MANUALDC-8297-03ZILOG2.5. EXTERNAL I/O ADDRESS SPACEExternal I/O address space is 4 Gbytes in size and ExternalI/O addresses are g

Página 125

5-176Z380™USER'S MANUALDC-8297-03ZILOGSWAPSWAP UPPER REGISTER WORD WITH LOWER REGISTER WORDSWAP src src = R, RXOperation: src(31-16) ↔ src(15-0)T

Página 126 - LOAD I REGISTER (WORD)

5-177Z380™USER'S MANUALZILOGDC-8297-03TSTTEST (BYTE)TST src src = R, IM, IROperation: A AND srcA logical AND operation is performed between the c

Página 127 - LOAD CONTROL REGISTER (BYTE)

5-178Z380™USER'S MANUALDC-8297-03ZILOGTSTIOTEST I/O PORTTSTIO src src = IMOperation: (C) AND srcA logical AND operation is performed between the

Página 128

5-179Z380™USER'S MANUALZILOGDC-8297-03XOREXCLUSIVE OR (BYTE)XOR [A,]src src = R, RX, IM, IR, XOperation: A ← A XOR srcA logical EXCLUSIVE OR oper

Página 129

5-180Z380™USER'S MANUALDC-8297-03ZILOGXORWEXCLUSIVE OR (WORD)XORW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) XOR src(15-0)A logica

Página 130 - LOAD AND DECREMENT (BYTE)

6-1Z380™USER'S MANUALZILOGDC-8297-036.1 INTRODUCTIONUSER’s MANUALCHAPTER 6INTERRUPTS AND TRAPSExceptions are conditions that can alter the normal

Página 131 - LOAD AND DECREMENT (WORD)

6-2Z380™USER'S MANUALDC-8297-03ZILOG6.2 INTERRUPTS (Continued)In an Interrupt acknowledge transaction, address outputsA31-A4 are driven to logic

Página 132

6-3Z380™USER'S MANUALZILOGDC-8297-036.2.2.1 IEF1, IEF2IEF1 controls the overall enabling and disabling of all on-chip peripheral and external mas

Página 133

6-4Z380™USER'S MANUALDC-8297-03ZILOG6.2.2.5 Trap and Break RegisterD7-D2 Reserved. Some of these bits are reserved fordevelopment support functio

Página 134 - LOAD AND INCREMENT (BYTE)

6-5Z380™USER'S MANUALZILOGDC-8297-036.4 NONMASKABLE INTERRUPTThe Nonmaskable Interrupt Input /NMI is edge sensitive,with the Z380 MPU internally

Página 135 - LOAD AND INCREMENT (WORD)

2-7Z380™USER'S MANUALZILOGDC-8297-03Zilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless

Página 136

6-6Z380™USER'S MANUALDC-8297-03ZILOG6.5.4 Interrupt Mode 3 Response forMaskable Interrupt /INT0 (Continued)Native (one word) or Extended mode (tw

Página 137

6-7Z380™USER'S MANUALZILOGDC-8297-03Zilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless

Página 138 - MULTIPLY UNSIGNED (BYTE)

USER'S MANUALZILOG7.1 INTRODUCTIONUSER’s MANUALCHAPTER 7RESETThe Z380 CPU is placed in a dormant state when the/RESET input is asserted. All its

Página 139 - MODE TEST

USER'S MANUALZILOGTable 7-1. Effect of a Reset on Z380 CPU and Related I/O RegistersRegister Reset Value CommentsProgram Counter 00000000 PCz, P

Página 140 - MULTIPLY (WORD)

USER'S MANUALZILOGZilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless a specific writte

Página 141 - MULTIPLY UNSIGNED (WORD)

USER'S MANUALZILOGUSER’s MANUALAPPENDIX AZ380™ CPU INSTRUCTION FORMATSFour formats are used to generate the machine languagebit encoding for the

Página 142 - NEGATE ACCUMULATOR

USER'S MANUALZILOGThe four instruction formats are shown in Tables A-1through A-4. Within each format, several different configu-rations

Página 143 - NEGATE HL REGISTER (WORD)

USER'S MANUALZILOGZilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless a specific writte

Página 144 - NO OPERATION

USER'S MANUALZILOGUSER’s MANUALAPPENDIX BZ380™ INSTRUCTIONS INALPHABETIC ORDERThis Appendix contains a quick reference guide for pro-gramming. It

Página 145 - OR (BYTE)

USER'S MANUALZILOGSource Code Mode Object CodeADC A,(HL) 8EADC A,(IX+12H) I DD 8E 12ADC A,(IY+12H) I FD 8E 12ADC A,A 8FADC A,B 88ADC A,C 89ADC A,

Página 146 - OR (WORD)

3-1Z380™USER'S MANUALZILOGDC-8297-033.1 INTRODUCTIONUSER’s MANUALCHAPTER 3NATIVE EXTENDED MODE, WORD/LONGWORD MODE OF OPERATIONSAND DECODER DIREC

Página 147 - OUTPUT DECREMENT MEMORY

USER'S MANUALZILOGSource Code Mode Object CodeAND IYU FD A4AND L A5ANDW (IX+12H) I DD E6 12ANDW (IY+12H) I FD E6 12ANDW 1234H ED A6 34 12ANDW BC

Página 148

USER'S MANUALZILOGSource Code Mode Object CodeCALL NV, 1234H I X E4 34 12CALL Z,1234H I X CC 34 12CALR 123456H X FD CD 56 34 12CALR 1234H X DD CD

Página 149

USER'S MANUALZILOGSource Code Mode Object CodeDEC IY X FD 2BDEC IYL FD 2DDEC IYU FD 25DEC L 2DDEC SP X 3BDECW BC X 0BDECW DE X 1BDECW HL X 2BDECW

Página 150

USER'S MANUALZILOGSource Code Mode Object CodeINC B 04INC BC X 03INC C 0CINC D 14INC DE X 13INC E 1CINC H 24INC HL X 23INC IX X DD 23INC IXL DD 2

Página 151 - OUTPUT INCREMENT MEMORY

USER'S MANUALZILOGSource Code Mode Object CodeLD (IX+12H),IY I L DD CB 12 2BLD (IX+12H),L I DD 75 12LD (IY+12H),34H I FD 36 34 12LD (IY+12H),A I

Página 152

USER'S MANUALZILOGSource Code Mode Object CodeLD DE,IX L DD 1BLD DE,IY L FD 1BLD E,(HL) 5ELD E,(IX+12H) I DD 5E 12LD E,(IY+12H) I FD 5E 12LD E,12

Página 153

USER'S MANUALZILOGSource Code Mode Object CodeLD L,H 6CLD L,L 6DLD R,A ED 4FLD SP,(1234H) I L ED 7B 34 12LD SP,1234H I L 31 34 12LD SP,HL L F

Página 154

USER'S MANUALZILOGSource Code Mode Object CodeORW DE ED B5ORW HL ED B7ORW HL,(IX+12H) I DD F6 12ORW HL,(IY+12H) I FD F6 12ORW HL,1234H ED B6

Página 155 - OUTPUT (BYTE)

USER'S MANUALZILOGSource Code Mode Object CodeRES 4,E CB A3RES 4,H CB A4RES 4,L CB A5RES 5,(HL) CB AERES 5,(IX+12H) I DD CB 12 AERES 5,(IY+12H) I

Página 156 - OUTPUT (WORD)

USER'S MANUALZILOGSource Code Mode Object CodeRRC H CB 0CRRC L CB 0DRRCA 0FRRCW (HL) ED CB 0ARRCW (IX+12H) I DD CB 12 0ARRCW (IY+12H) I FD CB 12

Página 157 - OUTPUT ACCUMULATOR

3-2Z380™USER'S MANUALDC-8297-03ZILOG3.2 DECODER DIRECTIVESThe Decoder Directive is not an instruction, but rather adirective to the instruction

Página 158 - OUTPUT (TO PAGE 0)

USER'S MANUALZILOGSource Code Mode Object CodeSET 4,B CB E0SET 4,C CB E1SET 4,D CB E2SET 4,E CB E3SET 4,H CB E4SET 4,L CB E5SET 5,(HL) CB EESET 5

Página 159

USER'S MANUALZILOGSource Code Mode Object CodeSUB A,IYU FD 94SUB A,L 95 SUBHL,(1234H) I X ED D6 34 12SUB SP,1234H I X ED 92 34 12SUBW (IX+12H) DD

Página 160

USER'S MANUALZILOGZilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless a specific writte

Página 161 - OUTPUT AND DECREMENT (BYTE)

USER'S MANUALZILOGUSER’s MANUALAPPENDIX CZ380™ INSTRUCTION IN NUMERIC ORDERThe following Appendix has the Z380 instructions sortedby numeric orde

Página 162 - OUTPUT AND DECREMENT (WORD)

USER'S MANUALZILOGObject Code Source Code Mode00 NOP01 34 12 LD BC,1234H I L02 LD (BC),A03 INC BC X03 INCW BC X04 INC B05 DEC B06 12 LD B,12H07 R

Página 163 - OUTPUT AND INCREMENT (BYTE)

USER'S MANUALZILOGObject Code Source Code Mode63 LD H,E64 LD H,H65 LD H,L66 LD H,(HL)67 LD H,A68 LD L,B69 LD L,C6A LD L,D6B LD L,E6C LD L,H6D LD

Página 164 - OUTPUT AND INCREMENT (WORD)

USER'S MANUALZILOGObject Code Source Code ModeB7 OR A,AB8 CP A,BB8 CP BB9 CP A,CB9 CP CBA CP A,DBA CP DBB CP A,EBB CP EBC CP A,HBC CP HBD CP A,LB

Página 165 - POP ACCUMULATOR

USER'S MANUALZILOGObject Code Source Code ModeCB 51 BIT 2,CCB 52 BIT 2,DCB 53 BIT 2,ECB 54 BIT 2,HCB 55 BIT 2,LCB 56 BIT 2,(HL)CB 57 BIT 2,ACB 58

Página 166 - POP CONTROL REGISTER

USER'S MANUALZILOGObject Code Source Code ModeCB BD RES 7,LCB BE RES 7,(HL)CB BF RES 7,ACB C0 SET 0,BCB C1 SET 0,CCB C2 SET 0,DCB C3 SET 0,ECB C4

Página 167 - POP REGISTER

USER'S MANUALZILOGObject Code Source Code ModeDD 23 INC IX XDD 23 INCW IX XDD 24 INC IXUDD 25 DEC IXUDD 26 12 LD IXU,12HDD 27 LD IX,IY LDD 28 34

Página 168 - PUSH ACCUMULATOR

3-3Z380™USER'S MANUALZILOGDC-8297-03The Z380 CPU implements one instruction to switch toExtended mode from Native mode; SETC XM (set Ex-tended mo

Página 169 - PUSH CONTROL REGISTER

USER'S MANUALZILOGObject Code Source Code ModeDD AC XOR IXUDD AD XOR A,IXLDD AD XOR IXLDD AE 12 XOR (IX+12H) IDD AE 12 XOR A,(IX+12H) IDD AF XORW

Página 170 - PUSH IMMEDIATE

USER'S MANUALZILOGObject Code Source Code ModeDD E3 EX (SP),IX LDD E4 34 12 CALR PO,1234H XDD E5 PUSH IX LDD E6 12 ANDW (IX+12H) IDD E6 12 ANDW H

Página 171 - PUSH REGISTER

USER'S MANUALZILOGObject Code Source Code ModeED 52 SBC HL,DEED 53 34 12 LD (1234H),DE I LED 54 NEGW HLED 54 NEGWED 55 reservedED 56 IM 1ED 57 LD

Página 172 - RESET BIT

USER'S MANUALZILOGObject Code Source Code ModeED B5 ORW DEED B5 ORW HL,DEED B6 34 12 ORW 1234HED B6 34 12 ORW HL,1234HED B7 ORW HLED B7 ORW HL,HL

Página 173 - RESET CONTROL BIT

USER'S MANUALZILOGObject Code Source Code ModeED CB BC DIVUW HL,IXED CB BC DIVUW IXED CB BD DIVUW HL,IYED CB BD DIVUW IYED CB BF DIVUW 1234HED CB

Página 174

USER'S MANUALZILOGObject Code Source Code ModeFD 3F LD (HL),HL LFD 44 LD B,IYUFD 45 LD B,IYLFD 46 12 LD B,(IY+12H) IFD 4C LD C,IYUFD 4D LD C,IYLF

Página 175 - RETURN FROM BREAKPOINT

USER'S MANUALZILOGObject Code Source Code ModeFD CB 12 1A RRW (IY+12H) IFD CB 12 1B LD (IY+12H),DE IFD CB 12 1E RR (IY+12H) IFD CB 12 21 LD IY,(S

Página 176 - RETURN FROM INTERRUPT

USER'S MANUALZILOGZilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless a specific writte

Página 177

USER'S MANUALZILOGUSER’s MANUALThis Appendix has two sets of tables. Each table is asubset of the Table in the Appendix B. The Table D-1 hasthe i

Página 178 - ROTATE LEFT (BYTE)

USER'S MANUALZILOGTable D-1. Instructions operating differently inNative or Extended mode of operation.Source Code Object CodeADD HL,BC 09ADD HL

Página 179 - ROTATE LEFT (WORD)

4-1Z380™USER'S MANUALZILOGDC-8297-034.1 INSTRUCTIONUSER’s MANUALCHAPTER 4ADDRESSING MODES AND DATA TYPESAn instruction is a consecutive list of o

Página 180 - ROTATE LEFT (ACCUMULATOR)

USER'S MANUALZILOGSource Code Object CodeRETN ED 45RST 00H C7RST 08H CFRST 10H D7RST 18H DFRST 20H E7RST 28H EFRST 30H F7RST 38H FFTable D-2. In

Página 181 - ROTATE LEFT CIRCULAR (BYTE)

USER'S MANUALZILOGSource Code Object CodeLDCTL HL,SR ED C0LDCTL SR,HL ED C8LDDRW ED F8LDDW ED E8LDIRW ED F0LDIW ED E0LDW HL,I DD 57LDW I,HL DD 47

Página 182 - ROTATE LEFT CIRCULAR (WORD)

USER'S MANUALZILOGUSER’s MANUALAPPENDIX EINSTRUCTIONS AFFECTED BYDDIR IM INSTRUCTIONSThis Appendix has instructions which can be used with theDec

Página 183

USER'S MANUALZILOGTable E-3. Valid with DDIR IB in Long Word mode.XM bit status does not affect the operation. (Eitherwith DDIR IB,LW or DDIR IB

Página 184 - ROTATE LEFT DIGIT

USER'S MANUALZILOGOR (IY+1234H) FD B6 34 12OR A,(IX+1234H) DD B6 34 12OR A,(IY+1234H) FD B6 34 12ORW (IX+1234H) DD F6 34 12ORW (IY+1234H) FD F6 3

Página 185 - ROTATE RIGHT (BYTE)

USER'S MANUALZILOGTable E-5. Valid with DDIR IW in Exteded mode. LWbit status does not affect the operationADD HL,(12345678H) ED C6 78 56 34 12A

Página 186 - ROTATE RIGHT (WORD)

USER'S MANUALZILOGTable E-7. Valid with DDIR IW in Long Word mode.XM bit status does not affect the operation. (Eitherwith DDIR IW,LW or DDIR IW

Página 187 - ROTATE RIGHT (ACCUMULATOR)

USER'S MANUALZILOGSET 4,(IY+123456H) FD CB56 34 12 E6SET 5,(IX+123456H) DD CB56 34 12 EESET 5,(IY+123456H) FD CB56 34 12 EESET 6,(IX+123456H) DD

Página 188 - ROTATE RIGHT CIRCULAR (BYTE)

USER'S MANUALZILOGZilog’s products are not authorized for use as critical compo-nents in life support devices or systems unless a specific writte

Página 189 - ROTATE RIGHT CIRCULAR (WORD)

4-2Z380™USER'S MANUALDC-8297-03ZILOG4.2.2 Immediate (IM) (Continued)InstructionOPERATIONOPERANDThe operand value is in the instructionImmediate

Página 190

4-3Z380™USER'S MANUALZILOGDC-8297-034.2.4 Direct Address (DA)When Direct Address mode is used, the data processed isat the location whose memory

Página 191 - ROTATE RIGHT DIGIT

4-4Z380™USER'S MANUALDC-8297-03ZILOG4.2.5 Indexed (X)When the Indexed addressing mode is used, the dataprocessed is at the location whose address

Página 192

USER'S MANUALZILOG1.1 INTRODUCTIONUSER’s MANUALCHAPTER 1Z380™ ARCHITECTURAL OVERVIEWThe Z380 CPU incorporates advanced architectural fea-tures th

Página 193 - SUBTRACT WITH CARRY (BYTE)

4-5Z380™USER'S MANUALZILOGDC-8297-032. Load accumulator from location (IX-1) in Extended modeSETC XM ;Set Extended modeLD A, (IX-1) ;Load into th

Página 194 - SUBTRACT WITH CARRY (WORD)

4-6Z380™USER'S MANUALDC-8297-03ZILOG4.2.6 Program Counter Relative Mode (RA) (Continued)PCz PCBefore instruction execution 0000 1000After instruc

Página 195

4-7Z380™USER'S MANUALZILOGDC-8297-034.2.7 Stack Pointer Relative Mode (SR)For Stack Pointer Relative addressing mode, the dataprocessed is at the

Página 196 - SET CARRY FLAG

4-8Z380™USER'S MANUALDC-8297-03ZILOG4.2.7 Stack Pointer Relative Mode (SR) (Continued)2. Load HL from location (SP – 4) in Extended mode, Long Wo

Página 197

4-9Z380™USER'S MANUALZILOGDC-8297-034.3 DATA TYPESThe Z380 CPU can operate on bits, binary-coded decimal(BCD) digits (four bits), bytes (eight bi

Página 198 - SET CONTROL BIT

5-1Z380™USER'S MANUALZILOGDC-8297-035.1 INTRODUCTIONUSER’s MANUALCHAPTER 5INSTRUCTION SETThe Z380™ CPU instruction set is a superset of the Z80 C

Página 199 - SHIFT LEFT ARITHMETIC (BYTE)

5-2Z380™USER'S MANUALDC-8297-03ZILOG5.2.1 Carry Flag (C)The Carry flag is set or cleared depending on the operationbeing performed. For add instr

Página 200 - SHIFT LEFT ARITHMETIC (WORD)

5-3Z380™USER'S MANUALZILOGDC-8297-035.2.7 Condition CodesThe Carry, Zero, Sign, and Parity/Overflow flags are usedto control the operation of the

Página 201

5-4Z380™USER'S MANUALDC-8297-03ZILOG5.3 SELECT REGISTERThe Select Register (SR) controls the register set selectionand the operating modes of the

Página 202 - SHIFT RIGHT ARITHMETIC (BYTE)

5-5Z380™USER'S MANUALZILOGDC-8297-035.3.8. Long Word Mode (LW)This bit controls the Long Word/Word mode selection forthe Z380 CPU. This bit is se

Página 203 - SHIFT RIGHT ARITHMETIC (WORD)

1-2Z380™USER'S MANUALDC-8297-03ZILOG1.1 INTRODUCTION (Continued)AFBCDEHLIXU IXLIYU IYLA' F'B' C'D' E'H' L&apos

Página 204 - SHIFT RIGHT LOGICAL (BYTE)

5-6Z380™USER'S MANUALDC-8297-03ZILOG5.5 INSTRUCTION SET FUNCTIONAL GROUPSAn Exchange instruction is available for swapping thecontents of the ac

Página 205 - SHIFT RIGHT LOGICAL (WORD)

5-7Z380™USER'S MANUALZILOGDC-8297-035.5.2 16-Bit and 32-Bit Load, Exchange,SWAP, and PUSH/POP GroupThis group of load, exchange, and PUSH/POP ins

Página 206 - SUBTRACT (BYTE)

5-8Z380™USER'S MANUALDC-8297-03ZILOG5.5.2 16-Bit and 32-Bit Load, Exchange,SWAP and PUSH/POP Group (Continued)Table 5-6. Supported Source and De

Página 207 - SUBTRACT (WORD)

5-9Z380™USER'S MANUALZILOGDC-8297-03has to be an even number (D0 = 0) in Word mode transfer,and a multiple of four in Long Word mode (D1 and D0 a

Página 208

5-10Z380™USER'S MANUALDC-8297-03ZILOG5.5.5 16-Bit Arithmetic OperationThis group of instructions (Table 5-10) provide 16-bitarithmetic instructio

Página 209

5-11Z380™USER'S MANUALZILOGDC-8297-035.5.6 8-Bit Manipulation, Rotate and ShiftGroupInstructions in this group (Table 5-11) test, set, and resetb

Página 210

5-12Z380™USER'S MANUALDC-8297-03ZILOG5.5.8 Program Control GroupThis group of instructions (Table 5-13) affect the ProgramCounter (PC) and thereb

Página 211 - TEST (BYTE)

5-13Z380™USER'S MANUALZILOGDC-8297-035.5.9 External Input/Output InstructionGroupThis group of instructions (Table 5-14) are used for trans-ferri

Página 212 - TEST I/O PORT

5-14Z380™USER'S MANUALDC-8297-03ZILOG5.5.9 External Input/Output Instruction Group (Continued)Table 5-14. External I/O Group Instructions.Instru

Página 213 - EXCLUSIVE OR (BYTE)

5-15Z380™USER'S MANUALZILOGDC-8297-035.5.10 Internal I/O Instruction GroupThis group (Table 5-15) of instructions is used to accesson-chip I/O ad

Página 214 - EXCLUSIVE OR (WORD)

1-3Z380™USER'S MANUALZILOGDC-8297-031.2 CPU ARCHITECTUREThe Z380 CPU is a binary-compatible extension of the Z80CPU and the Z180 CPU architecture

Página 215 - CHAPTER 6

5-16Z380™USER'S MANUALDC-8297-03ZILOG5.5.11 CPU Control GroupThe instructions in this group (Table 5-16) act upon theCPU control and status regis

Página 216 - 6.2.2 Interrupt Control

5-17Z380™USER'S MANUALZILOGDC-8297-035.5.12 Decoder DirectivesThe Decoder Directives (Table 5-17) are a special instruc-tions to expand the Z80 i

Página 217

5-18Z380™USER'S MANUALDC-8297-03ZILOG5.6 NOTATION AND BINARY ENCODING (Continued)Condition Codes. The following symbols describe thecondition co

Página 218 - 6.3 TRAP INTERRUPT

5-19Z380™USER'S MANUALZILOGDC-8297-03Table 5-18. Execution TimeOperation Byte Word Word Long Long Long Long LongSequence B W B/B W/W W/B/B B/W/B

Página 219

5-20Z380™USER'S MANUALDC-8297-03ZILOGADCADD WITH CARRY (BYTE)ADC A,src src = R, RX, IM, IR, XOperation: A ← A + src + CThe source operand togethe

Página 220 - 6.7 RETI INSTRUCTION

5-21Z380™USER'S MANUALZILOGDC-8297-03ADCADD WITH CARRY (WORD)ADC HL,src dst = HLsrc = BC, DE, HL, SPOperation: HL(15-0) ← HL(15-0) + src(15-0) +

Página 221

5-22Z380™USER'S MANUALDC-8297-03ZILOGADCWADD WITH CARRY (WORD)ADCW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) + src(15-0) + CThe s

Página 222 - CHAPTER 7

5-23Z380™USER'S MANUALZILOGDC-8297-03ADDADD (BYTE)ADD A,src src = R, RX, IM, IR, XOperation: A ← A + srcThe source operand is added to the accumu

Página 223

5-24Z380™USER'S MANUALDC-8297-03ZILOGADDADD (WORD)ADD dst,src dst = HL; src = BC, DE, HL, SP, DAordst = IX; src = BC, DE, IX, SPordst = IY; src =

Página 224

5-25Z380™USER'S MANUALZILOGDC-8297-03ADDADD TO STACK POINTER (WORD)ADD SP,srcsrc = IMOperation: if (XM) then beginSP(31-0) ← SP(31-0) + src(31-0)

Página 225 - APPENDIX A

1-4Z380™USER'S MANUALDC-8297-03ZILOG1.2.2 Address Spaces (Continued)Each register set includes the primary registers A, F, B, C,D, E, H, L, IX,

Página 226

5-26Z380™USER'S MANUALDC-8297-03ZILOGADDWADD (WORD)ADDW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) + src(15-0)The source operand i

Página 227

5-27Z380™USER'S MANUALZILOGDC-8297-03ANDAND (BYTE)AND [A,]src src = R, RX, IM, IR, XOperation: A ← A AND srcA logical AND operation is performed

Página 228 - APPENDIX B

5-28Z380™USER'S MANUALDC-8297-03ZILOGANDWAND (WORD)ANDW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL(15-0) AND src(15-0)A logical AND oper

Página 229

5-29Z380™USER'S MANUALZILOGDC-8297-03BITBIT TESTBIT b,dst dst = R, IR, XOperation: Z ← NOT dst(b)The specified bit b within the destination opera

Página 230

5-30Z380™USER'S MANUALDC-8297-03ZILOGBTESTBANK TESTBTESTOperation: S ← SR(16)Z ← SR(24)V ← SR(0)C ← SR(8)The Alternate Register bits in the Selec

Página 231

5-31Z380™USER'S MANUALZILOGDC-8297-03CALLCALLCALL [cc,]dst dst = DAOperation: if (cc is TRUE) then beginif (XM) then beginSP ← SP - 4(SP) ← PC(7-

Página 232

5-32Z380™USER'S MANUALDC-8297-03ZILOGCALRCALL RELATIVECALR [cc,]dst dst = RAOperation: if (cc is true) then begindst ← SIGN EXTEND dstif (XM) the

Página 233

5-33Z380™USER'S MANUALZILOGDC-8297-03CCFCOMPLEMENT CARRY FLAGCCFOperation: C ← NOT CThe Carry flag is inverted.Flags: S: UnaffectedZ: UnaffectedH

Página 234

5-34Z380™USER'S MANUALDC-8297-03ZILOGCPCOMPARE (BYTE)CP [A,]src src = R, RX, IM, IR, XOperation: A – srcThe source operand is compared with the

Página 235

5-35Z380™USER'S MANUALZILOGDC-8297-03CPWCOMPARE (WORD)CPW [HL,]src src = R, RX, IM, XOperation: HL(15-0) – src(15-0)The source operand is compare

Página 236

1-5Z380™USER'S MANUALZILOGDC-8297-03are handled by a newly added interrupt handing mode,“Assigned Vectored Mode,” which is a fixed vectoredinterr

Página 237

5-36Z380™USER'S MANUALDC-8297-03ZILOGCPDCOMPARE AND DECREMENT (BYTE)CPDOperation: A - (HL)if (XM) then beginHL(31-0) ← HL(31-0) - 1endelse beginH

Página 238

5-37Z380™USER'S MANUALZILOGDC-8297-03CPDRCOMPARE, DECREMENT AND REPEAT (BYTE)CPDROperation: Repeat until (BC=0 OR match) beginA - (HL)if (XM) the

Página 239

5-38Z380™USER'S MANUALDC-8297-03ZILOGCPICOMPARE AND INCREMENT (BYTE)CPIOperation: A - (HL)if (XM) then beginHL(31-0) ← HL(31-0) + 1endelse beginH

Página 240

5-39Z380™USER'S MANUALZILOGDC-8297-03CPIRCOMPARE, INCREMENT AND REPEAT (BYTE)CPIROperation: Repeat until (BC=0 OR match) beginA - (HL)if (XM) the

Página 241

5-40Z380™USER'S MANUALDC-8297-03ZILOGCPLCOMPLEMENT ACCUMULATORCPL [A]Operation: A ← NOT AThe contents of the accumulator are complemented (one&ap

Página 242

5-41Z380™USER'S MANUALZILOGDC-8297-03CPLWCOMPLEMENT HL REGISTER (WORD)CPLW [HL]Operation: HL(15-0) ← NOT HL(15-0)The contents of the HL register

Página 243 - APPENDIX C

5-42Z380™USER'S MANUALDC-8297-03ZILOGDAADECIMAL ADJUST ACCUMULATORDAAOperation: A ← Decimal Adjust AThe accumulator is adjusted to form two 4-bit

Página 244

5-43Z380™USER'S MANUALZILOGDC-8297-03DDIRDECODER DIRECTIVEDDIR modemode = W or LW, IB or IWOperation: None, decoder directive onlyThis is not an

Página 245

5-44Z380™USER'S MANUALDC-8297-03ZILOGDECDECREMENT (BYTE)DEC dst dst = R, RX, IR, XOperation: dst ← dst – 1The destination operand is decremented

Página 246

5-45Z380™USER'S MANUALZILOGDC-8297-03DEC[W]DECREMENT (WORD)DEC[W] dstdst = R, RXOperation: if (XM) then begindst(31-0) ← dst(31-0) - 1endelse beg

Página 247

1-6Z380™USER'S MANUALDC-8297-03ZILOG1.3.3. Enhanced Instruction Set with 16-Bitand 32-Bit Manipulation Capability(Continued) DDIR (Decoder Direc

Página 248

5-46Z380™USER'S MANUALDC-8297-03ZILOGDIDISABLE INTERRUPTSDI [n]Operation: if (n is present) then beginfor i=1 to 4 beginif (n(i) = 1) then beginI

Página 249

5-47Z380™USER'S MANUALZILOGDC-8297-03DIVUWDIVIDE UNSIGNED (WORD)DIVUW [HL,]src src = R, RX, IM, XOperation: HL(15-0) ← HL / srcHL(31-16) ← remain

Página 250

5-48Z380™USER'S MANUALDC-8297-03ZILOGDJNZDECREMENT AND JUMP IF NON-ZERODJNZ dst dst = RAOperation: B ← B-1If (B <> 0) then begindst ← SIGN

Página 251

5-49Z380™USER'S MANUALZILOGDC-8297-03EIENABLE INTERRUPTSEI [n]Operation: if (n is present) then beginfor i=1 to 4 beginif (n(i) = 1) then beginIE

Página 252

5-50Z380™USER'S MANUALDC-8297-03ZILOGEXEXCHANGE ACCUMULATOR/FLAG WITH ALTERNATE BANKEX AF,AF’Operation: SR(0) ← NOT SR(0)Bit 0 of the Select Regi

Página 253

5-51Z380™USER'S MANUALZILOGDC-8297-03EXEXCHANGE ADDRESSING REGISTER WITH TOP OF STACKEX (SP),dst dst = HL, IX, IYOperation: if (LW) then begin(SP

Página 254

5-52Z380™USER'S MANUALDC-8297-03ZILOGEXEXCHANGE REGISTER (WORD)EX dst,src dst = R, RXsrc = R, RXOperation: if (LW) then begindst(31-0) ↔ src(31-0

Página 255

5-53Z380™USER'S MANUALZILOGDC-8297-03EXEXCHANGE REGISTER WITH ALTERNATE REGISTER (BYTE)EX dst,src src = ROperation: dst ↔ srcThe contents of the

Página 256

5-54Z380™USER'S MANUALDC-8297-03ZILOGEXEXCHANGE REGISTER WITH ALTERNATE REGISTER (WORD)EX dst,src src = R, RXOperation: if (LW) then begindst(31-

Página 257

5-55Z380™USER'S MANUALZILOGDC-8297-03EXEXCHANGE WITH ACCUMULATOREX A,src src = R, IROperation: dst ↔ srcThe contents of the accumulator are excha

Página 258 - APPENDIX D

2-1Z380™USER'S MANUALZILOGDC-8297-032.1 INTRODUCTIONUSER’s MANUALCHAPTER 2ADDRESS SPACESThe Z380 CPU supports five address spaces correspond-ing

Página 259

5-56Z380™USER'S MANUALDC-8297-03ZILOGEXALLEXCHANGE ALL REGISTERS WITH ALTERNATE BANKEXALLOperation: SR(24) ← NOT SR(24)SR(16) ← NOT SR(16)SR(8) ←

Página 260

5-57Z380™USER'S MANUALZILOGDC-8297-03EXTSEXTEND SIGN (BYTE)EXTS [A]Operation: L ← Aif (A(7)=0) then beginH ¨ 00hif (LW) then beginHL(31-16) ← 000

Página 261

5-58Z380™USER'S MANUALDC-8297-03ZILOGEXTSWEXTEND SIGN (WORD)EXTSW [HL]Operation: If (HL(15)=0) then beginHL(31-16) ← 0000hendelse beginHL(31-16)

Página 262 - APPENDIX E

5-59Z380™USER'S MANUALZILOGDC-8297-03EXXEXCHANGE REGISTERS WITH ALTERNATE BANKEXXOperation: SR(8) ← NOT SR(8)Bit 8 of the Select Register (SR), w

Página 263

5-60Z380™USER'S MANUALDC-8297-03ZILOGEXXXEXCHANGE IX REGISTER WITH ALTERNATE BANKEXXXOperation: SR(16) ← NOT SR(16)Bit 16 of the Select Register

Página 264

5-61Z380™USER'S MANUALZILOGDC-8297-03EXXYEXCHANGE IY REGISTER WITH ALTERNATE BANKEXXYOperation: SR(24) ← NOT SR(24)Bit 24 of the Select Register

Página 265

5-62Z380™USER'S MANUALDC-8297-03ZILOGHALTHALTHALTOperation: CPU HaltsThe CPU operation is suspended until either an interrupt request or reset re

Página 266

5-63Z380™USER'S MANUALZILOGDC-8297-03IMINTERRUPT MODE SELECTIM p p = 0, 1, 2, 3Operation: SR(4-3) ← pThe interrupt mode of operation is set to o

Página 267

5-64Z380™USER'S MANUALDC-8297-03ZILOGININPUT (BYTE)IN dst,(C) dst = ROperation: dst ← (C)The byte of data from the selected peripheral is loaded

Página 268

5-65Z380™USER'S MANUALZILOGDC-8297-03INWINPUT (WORD)INW dst,(C) dst = ROperation: dst(15-0) ← (C)The word of data from the selected peripheral is

Comentários a estes Manuais

Sem comentários