-
Notifications
You must be signed in to change notification settings - Fork 10
/
chapter-instr-glance-output.tex
129 lines (114 loc) · 2.52 KB
/
chapter-instr-glance-output.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
\section{Output}
\begin{minipage}{\textwidth}
\begin{instrtable}
\begin{instruction}{OUT (n),A}
\Symbol{\SymOUT{n}{A}}
\FlagsOUTna
\OpCode{11}{010}{011}
\Hex{D3}{2}
\Cycles{3}{11}
\Comment{
\multirow{7}{*}{
\tt
\begin{tabular}{ll}
r & \OCT{r} \\
\hline
B & 000 \\
C & 001 \\
D & 010 \\
E & 011 \\
H & 100 \\
L & 101 \\
A & 111 \\
\end{tabular}
}
}
\SkipToOpCode
\OpRange{n}
\Hex{..}{}
\end{instruction}
\begin{instruction}{OUT (C),r}
\Symbol{\SymOUT{BC}{r}}
\FlagsOUTcr
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{3}{12}
\SkipToOpCode
\OpCode{01}{\OCT{r}}{001}
\Hex{..}{}
\end{instruction}
\begin{instruction}{OUT (C),0}
\Symbol{\SymOUT{BC}{0}}
\FlagsOUTc
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{3}{12}
\SkipToOpCode
\OpCode{01}{110}{001}
\Hex{71}{}
\end{instruction}
\begin{instruction}{OUTI}
\Symbol{\SymOUTI[0]}
\FlagsOUTI
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{4}{16}
\SkipToSymbol
\Symbol{\SymOUTI[1]}
\FromSymbolToOpCode
\OpCode{10}{100}{011}
\Hex{A3}{}
\SkipToSymbol
\Symbol{\SymOUTI[2]}
\end{instruction}
\begin{instruction}{OTIR}
\Symbol{\SymOTIR[0]}
\FlagsOTIR
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{4}{16}
\Comment{if {\tt B}=0}
\SkipToSymbol
\Symbol{\SymOTIR[1]}
\FromSymbolToOpCode
\OpCode{10}{110}{011}
\Hex{B3}{}
\Cycles{5}{21}
\Comment{if {\tt B}$\neq$0}
\end{instruction}
\begin{instruction}{OUTD}
\Symbol{\SymOUTD[0]}
\FlagsOUTI
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{4}{16}
\SkipToSymbol
\Symbol{\SymOUTD[1]}
\FromSymbolToOpCode
\OpCode{10}{101}{011}
\Hex{AB}{}
\SkipToSymbol
\Symbol{\SymOUTD[2]}
\end{instruction}
\begin{lastinstruction}{OTDR}
\Symbol{\SymOTDR[0]}
\FlagsOTDR
\OpCode{11}{101}{101}
\Hex{ED}{2}
\Cycles{4}{16}
\Comment{if {\tt B}=0}
\SkipToSymbol
\Symbol{\SymOTDR[1]}
\FromSymbolToOpCode
\OpCode{10}{111}{011}
\Hex{BB}{}
\Cycles{5}{21}
\Comment{if {\tt B}$\neq$0}
\end{lastinstruction}
\end{instrtable}
\begin{notestable}
\NoteItem{\See{1}Flag is {\tt 1} if {\tt B=0} after execution, otherwise {\tt 0}}
\NoteItem{\See{2}On Next this flag is destroyed, for other Z80 computers see section \XRef{z80_undocumented_instructions_io_block}.}
\end{notestable}
\end{minipage}
\pagebreak