Updated the way the mode setting works by allocating an entire byte for it.

This commit is contained in:
Garritt McCune
2024-08-07 16:52:28 -05:00
parent b31c1fbe76
commit 3f78a00be8
+18 -19
View File
@@ -26,13 +26,29 @@ All instructions are a fixed width of 32-bits. There are two basic encoding sche
\draw (-8, 0) -- (-4, 0) node[midway, below=1em] {Opcode};
\draw (-8, -0.25) -- (-8, 0.25) node[above] {7};
\draw (-4, -0.25) -- (-4, 0.25) node[above] {0};
\draw [dashed] (-3.75, 0) -- (0, 0) node[midway, above=1em] {Mode Setting};
\draw (-3.75, 0) -- (0, 0) node[midway, below=1em] {Mode Setting};
\draw (-1.9, -0.25) -- (-1.9, 0.25) node[above] {3};
\draw (-3.75, -0.25) node[below] {7} -- (-3.75, 0.25);
\draw (0, -0.25) node[below] {0} -- (0, 0.25);
\end{tikzpicture}
\caption{Encoding}
\label{fig:opencoding} % https://www.overleaf.com/learn/latex/Referencing_Figures
\paragraph{Note} The dotted line showing the \textit{Mode Setting} byte can be optional in some instructions.
\end{figure}
\begin{figure}
\begin{tabularx}{\textwidth}{ | X | X | X | }
\hline
Operand & Immediate Value & Value As Address \\
\hline
Register & 0000 & 1000 \\
8-Bit & 0001 & 1001 \\
16-Bit & 0010 & 1010 \\
32-Bit & 0100 & 1100 \\
None & 1111 & 1111 \\
\hline
\end{tabularx}
\caption{Operand Modes Bit Pattern}
\label{fig:ModeSettingEncodingFigure} % https://www.overleaf.com/learn/latex/Referencing_Figures
\end{figure}
@@ -63,23 +79,6 @@ All instructions are a fixed width of 32-bits. There are two basic encoding sche
\label{fig:OpArgEncodingFigure} % https://www.overleaf.com/learn/latex/Referencing_Figures
\paragraph{Note} How the \textit{Destination} and \textit{Source} are interpreted is dependent on the opcode and operand mode bits as shown in Figure \ref{fig:AddressingModeBitPattern}.
\end{figure}
\begin{figure}
\begin{tabularx}{\textwidth}{ | X | X | X | }
\hline
Bit Pattern & Destination & Source \\
\hline
0000 & Register & Register \\
0001 & Register & 8 Bit Immediate \\
0010 & Register & 32 Bit Immediate \\
0011 & 8 Bit Immediate & Register \\
0100 & 32 Bit Immediate & Register \\
\hline
\end{tabularx}
\caption{Addressing Mode}
\label{fig:AddressingModeBitPattern}
\paragraph{Note} The \textit{Immediate} values could represent an address (if 8-bit, relative otherwise 32-bit values will represent absolute addresses) or a numeric constant.
\end{figure}
\clearpage
\section{Instructions}
The /r represents a byte that specifies a register. /iX is for the immediate data type, where \textit{X} defines the width, which are 8, 16, or 32 bits.