[SPCA] Update code imports

This commit is contained in:
2026-01-22 07:35:37 +01:00
parent f92b002524
commit 5dffd7391c
18 changed files with 28 additions and 30 deletions

View File

@@ -9,23 +9,23 @@ The compiler may translate it very differently depending on the context of the p
\subsubsection{Conditional statements}
A function using an \verb|if/else| construct to choose the maximum of $2$ numbers might compile like this:
\inputcodewithfilename{gas}{code-examples/01_asm/}{02_max.s}
\inputcodewithfilename{gas}{}{code-examples/01_asm/02_max.s}
A function computing the absolute difference $|x-y|$ using an \verb|if/else| construct, might use a conditional \verb|move| instead:
\inputcodewithfilename{gas}{code-examples/01_asm/}{03_absdiff.s}
\inputcodewithfilename{gas}{}{code-examples/01_asm/03_absdiff.s}
\subsubsection{While Loops}
A recursive factorial function using a \verb|do while| loop may be compiled like this:
\inputcodewithfilename{gas}{code-examples/01_asm/}{04_factorial.s}
\inputcodewithfilename{gas}{}{code-examples/01_asm/04_factorial.s}
\newpage
The same function, using a \verb|while| loop instead may lead to this:
\inputcodewithfilename{gas}{code-examples/01_asm/}{05_factorial.s}
\inputcodewithfilename{gas}{}{code-examples/01_asm/05_factorial.s}
\subsubsection{For Loops \& Switch}