# HG changeset patch # User Christian Urban # Date 1385495656 0 # Node ID 0b59588d28d2132615fba88b9adac691d6ce2d95 # Parent fec99c43796551790d184530e358d707c11db1fe updated diff -r fec99c437965 -r 0b59588d28d2 coursework/cw03.pdf Binary file coursework/cw03.pdf has changed diff -r fec99c437965 -r 0b59588d28d2 coursework/cw03.tex --- a/coursework/cw03.tex Sat Nov 23 13:45:55 2013 +0000 +++ b/coursework/cw03.tex Tue Nov 26 19:54:16 2013 +0000 @@ -87,12 +87,29 @@ \end{center} \noindent +If you generated a correct assembler file for Jasmin, for example +\texttt{loops.j}, you can use +\begin{center} +\texttt{java -jar jasmin-2.4/jasmin.jar loops.j} +\end{center} + +\noindent +in order to translate it to Java Byte Code. The resulting class file can be +run with + +\begin{center} +\texttt{java loops} +\end{center} + +\noindent +where you potentially need to give the path to the class file.\bigskip \noindent You need to submit a document containing the answers for the two questions below. You can do the implementation in any programming language you like, but you need -to submit the source code with which you answered the questions. However, the coursework +to submit the source code with which you answered the questions. Otherwise +the submission will not be counted. However, the coursework will \emph{only} be judged according to the answers. You can submit your answers in a txt-file or as pdf.\bigskip @@ -150,6 +167,23 @@ \end{minipage} \end{center} +\noindent +In this question you are supposed to give the assembler instructions for the +for the program + +\begin{center} +\begin{minipage}{6cm} +\begin{lstlisting}[language=While,basicstyle=\ttfamily, numbers=none] +for i := 1 upto 10000 do { + for i := 1 upto 10000 do { + skip + } +} +\end{lstlisting} +\end{minipage} +\end{center} + + \subsection*{Further Information}