diff -r 47acfd7f9096 -r ae9782e62bdd slides/slides08.tex --- a/slides/slides08.tex Fri Nov 17 20:06:43 2023 +0000 +++ b/slides/slides08.tex Tue Nov 28 11:42:31 2023 +0000 @@ -67,7 +67,93 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[t,fragile] -%%\frametitle{CW2} +\mbox{}\\[-20mm]\mbox{} + +\footnotesize +\begin{textblock}{13}(-0.5,0.2) +\begin{lstlisting}[language=JVMIS2,numbers=none] +.method public static main([Ljava/lang/String;)V + .limit locals 200 + .limit stack 200 + invokestatic foo/foo/read()I + istore 0 + ldc 1 + istore 1 +Loop_begin_4: + iload 0 + ldc 0 + if_icmple Loop_end_5 + iload 0 + iload 1 + imul + istore 1 + iload 0 + ldc 1 + isub + istore 0 + goto Loop_begin_4 +\end{lstlisting} +\end{textblock} + +\begin{textblock}{13}(7,8) +\begin{lstlisting}[language=JVMIS2,numbers=none] +Loop_end_5: + iload 1 + invokestatic foo/foo/write(I)V + return +.end method +\end{lstlisting} +\end{textblock} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[t,fragile] +\mbox{}\\[-20mm]\mbox{} + +\footnotesize +\begin{textblock}{13}(-0.5,0.2) +\begin{lstlisting}[language=JVMIS2,numbers=none] +.method public static main([Ljava/lang/String;)V + .limit locals 200 + .limit stack 200 + invokestatic foo/foo/read()I + istore 0 ; n + ldc 1 + istore 1 ; res +Loop_begin_4: + iload 0 ; n + ldc 0 + if_icmple Loop_end_5 + iload 0 ; n + iload 1 ; res + imul + istore 1 ; res + iload 0 ; n + ldc 1 + isub + istore 0 ; n + goto Loop_begin_4 +\end{lstlisting} +\end{textblock} + +\begin{textblock}{13}(7,8) +\begin{lstlisting}[language=JVMIS2,numbers=none] +Loop_end_5: + iload 1 ; res + invokestatic foo/foo/write(I)V + return +.end method +\end{lstlisting} +\end{textblock} + +\end{frame} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{frame}[t,fragile] \small \begin{textblock}{13}(-0.5,1)