Computer Science
Week 12 Tutorials
Make sure you have a recent version of the B-- interpreter/compiler. You can obtain it from http://www.cs.auckland.ac.nz/compsci330s1c/resources/330PROGRAMS.tar.gz
Write B-- programs to perform various simple actions, and look at the assembly language generated.
Increment a global variable, an instance variable in the current class, an instance variable in another class, a parameter or local variable in the current method, or a variable accessed via a pointer.
Invoke a global method, an instance method in the current class, or an instance method in another class.
Pass the address of a variable as a parameter, the value of a variable as a parameter, or a constant as a parameter.
Declare several fields and methods in a class, several parameters and local variables in a method, and see how the memory is laid out.
-
Related Programmes