equal
deleted
inserted
replaced
85 \begin{center} |
85 \begin{center} |
86 \url{http://jasmin.sourceforge.net/instructions.html} |
86 \url{http://jasmin.sourceforge.net/instructions.html} |
87 \end{center} |
87 \end{center} |
88 |
88 |
89 \noindent |
89 \noindent |
90 |
90 If you generated a correct assembler file for Jasmin, for example |
|
91 \texttt{loops.j}, you can use |
|
92 |
|
93 \begin{center} |
|
94 \texttt{java -jar jasmin-2.4/jasmin.jar loops.j} |
|
95 \end{center} |
|
96 |
|
97 \noindent |
|
98 in order to translate it to Java Byte Code. The resulting class file can be |
|
99 run with |
|
100 |
|
101 \begin{center} |
|
102 \texttt{java loops} |
|
103 \end{center} |
|
104 |
|
105 \noindent |
|
106 where you potentially need to give the path to the class file.\bigskip |
91 |
107 |
92 \noindent |
108 \noindent |
93 You need to submit a document containing the answers for the two questions |
109 You need to submit a document containing the answers for the two questions |
94 below. You can do the implementation in any programming language you like, but you need |
110 below. You can do the implementation in any programming language you like, but you need |
95 to submit the source code with which you answered the questions. However, the coursework |
111 to submit the source code with which you answered the questions. Otherwise |
|
112 the submission will not be counted. However, the coursework |
96 will \emph{only} be judged according to the answers. You can submit your answers |
113 will \emph{only} be judged according to the answers. You can submit your answers |
97 in a txt-file or as pdf.\bigskip |
114 in a txt-file or as pdf.\bigskip |
98 |
115 |
99 |
116 |
100 \subsection*{Question 1 (marked with 2\%)} |
117 \subsection*{Question 1 (marked with 2\%)} |
147 i := i + 1; |
164 i := i + 1; |
148 } |
165 } |
149 \end{lstlisting} |
166 \end{lstlisting} |
150 \end{minipage} |
167 \end{minipage} |
151 \end{center} |
168 \end{center} |
|
169 |
|
170 \noindent |
|
171 In this question you are supposed to give the assembler instructions for the |
|
172 for the program |
|
173 |
|
174 \begin{center} |
|
175 \begin{minipage}{6cm} |
|
176 \begin{lstlisting}[language=While,basicstyle=\ttfamily, numbers=none] |
|
177 for i := 1 upto 10000 do { |
|
178 for i := 1 upto 10000 do { |
|
179 skip |
|
180 } |
|
181 } |
|
182 \end{lstlisting} |
|
183 \end{minipage} |
|
184 \end{center} |
|
185 |
152 |
186 |
153 |
187 |
154 \subsection*{Further Information} |
188 \subsection*{Further Information} |
155 |
189 |
156 The Java infrastructure unfortunately does not contain an assembler out-of-the-box |
190 The Java infrastructure unfortunately does not contain an assembler out-of-the-box |