isa: conditionbits fixed (?), starting with opcode
[calu.git] / 2_isa / conds.tex
1 \section{Conditions}
2
3 \begin{table}[ht]
4         \centering
5         \begin{tabular}{|c|c|c|}\hline
6                 Bitcode & Condition             & Bits to test \\ \hline
7                 0000    & equal / zero          & ZF = 0\\ \hline
8                 0001    & not equal / not zero  & ZF = 1\\ \hline
9                 0010    & not overflow          & OF = 0\\ \hline
10                 0011    & overflow              & OF = 1\\ \hline
11                 0100    & not carry             & CF = 0\\ \hline
12                 0101    & carry                 & CF = 1\\ \hline
13                 0110    & not signed / not neg. & SF = 0\\ \hline
14                 0111    & signed / neg.         & SF = 1\\ \hline
15                 1000    & below (?)             & \\ \hline
16                 1001    & above (?)             & \\ \hline
17                 1010    & greater than or equal & SF == OF\\ \hline
18                 1011    & less than             & SF != OF \\ \hline
19                 1100    & greater than          & (ZF == 0 $\wedge$ SF == OF) \\ \hline
20                 1101    & less than or equal    & (ZF == 1 $\vee$ SF != OF) \\ \hline
21                 1110    & never                 & \\ \hline
22                 1111    & always                & \\ \hline
23         \end{tabular}
24         \caption{codierung von conditions}
25 \end{table}
26
27 \begin{table}
28         \centering
29         \begin{tabular}{|l|c|c|c|c|} \hline
30                 Bit  & 3  & 2  & 1  & 0  \\ \hline
31                 Flag & SF & CF & OF & ZF \\ \hline
32         \end{tabular}
33         \caption{billig PSW bitorder}
34 \end{table}