From e8d1501d759676e781f6fcaf111a60ca3268ede6 Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Tue, 18 Feb 2025 16:13:40 -0600 Subject: [PATCH] Updated the text that introduces the ISA. --- chapter 2.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter 2.tex b/chapter 2.tex index 0146b66..f97e9a6 100644 --- a/chapter 2.tex +++ b/chapter 2.tex @@ -1,7 +1,8 @@ \chapter{Instruction Set Architecture} -Instructions are variable width with most instructions' width being determined by the \textit{mode} byte that follows immediately after the opcode byte. The \textit{mode} byte is split into four parts, with the upper nibble describing what the types of source and destination operands the instruction is to deal with. Following those four bits is two reserved bits and finally the final two bits in the least significant half of the lower nibble, the \textit{source width}. Depending on the \textit{source type} bits, the next number of bytes to be read for the source operand can be 8-, 16- or 32-bits and the same applies to the \textit{destination type} bits. A more visual layout of this may be found in Figure \ref{fig:opencoding}. +In general instructions are variable length depending on the number of arguments and their width. The first byte of an instruction is the \textit{opcode} which tells the machine what operation is to be performed. If one or more arguments are required, then the next byte is the \textit{options} byte which describes the type and width of the argument(s). The exact meaning of all the bits in the \textit{options} byte are shown in Figure \ref{fig:opencoding}. The order of the arguments follows the AT\&T syntax, meaning the left hand argument is the \textit{source} and the right hand argument is the \textit{destination}. \section{Instruction Layout} +%Because this machine is little endian, the opcode byte is physically located on the right hand-side of a word. % Placement info here: https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures % Paths: https://tikz.dev/tikz-paths \begin{figure}[ht]