General information

Course description

The course objectives can be found on the University course catalog:

The notes, references and material covered by the theoretical lessons can be found on Prof. Wolper's pages.


The course takes place every Tuesday during the first quarter at the Montefiore Institute (B28), room R3 (to be confirmed). The theoretical lessons are programmed from 14:00 to 16:00 and the practical sessions from 16:00 to 18:00.

The students are advised to come with their theoretical lessons material at each practice sessions.


  • Written exam: Open book for the material covered in the four first lectures (up to and including virtual memory), and closed book for the rest of the material covered.
  • Two programming assignments: These have to be completed during the course period (more details in due time).


Date Information and files.
Tutorial 19 Sept. 2017

Tutorial 1: μ-code (ULG01)

Additional material: ULG01 μ-code reference (coloured), support slides

Tutorial 26 Sept. 2017

Tutorial 2: μ-code (ULG01) and β-assembly

Additional material:

Tutorial 3 Oct. 2017

End of Tutorial 2 and first project presentation

Tutorial 10 Oct. 2017

Tutorial 3: μ-code (ULG02) - User and supervisor modes, support slides

Tutorial 17 Oct. 2017

Tutorial 4: μ-code (ULG03) - Virtual memory, support slides

Tutorial 24 Oct. 2017

Tutorial 5: parallel programming, solution, code source


29 Oct. 2017, 23:59

Project 1: drawing a perfect maze in the dynamic memory

Statement and source code

Project presentation slides

Last update 13 Oct. 2017, 11:35

Tutorial 7 Nov. 2017

Tutorial 6: parallel programming, solution

Tutorial 14 Nov. 2017

Tutorial 7: parallel programming


18 Dec. 2017, 23:59

Project 2: Bounce


Source code

Project presentation slides

Last update 7 Nov. 2017, 16:07

Project 1 FAQ

Is it normal that the maze is partially drawn or not drawn at all while my program ends normally ?

It might not be caused by a bug in your code: there is a bug in the simulator which does not refresh the memory view when it stops on a HALT() instruction. You have several solutions to check the final maze:

  • Refresh the memory view by minimizing then maximizing the window.
  • Make sure the simulator doesn't stop on the HALT() instruction by adding a breakpoint on a NO-OP like in this main.asm file

βSim simulator

βSim is a simulator for the β-assembly language written in Java. It features:

  • An assembler to generate machine code.
  • A debugger featuring instruction per instruction execution, registers, stack and memory visualization.
  • A minimal code editor with error highlighting (when the code is assembled).

The simulator comes as a .jar package you can run in several ways:

  • On modern systems with UI (Windows,...), you can simply double-click on the file.
  • If you prefer using a console, you can run: java -jar bsim-vram.jar [file1 file2 ...].

Because the built-in code editor is minimal, I don't recommend using it for developing programs. For instance, there is no "Undo" nor "Redo" option, so you might lose some work by performing some non-deliberate deletions. It is better to first write your code in another text editor such as NotePad++ or Sublime Text (β-assembly syntax highlighting and snippets, check this forum for installation location), and then load it into the simulator for testing.

Loading and launching code

To execute some code you have written in the simulator, you first have to load this piece of code in the editor. This can be done by clicking on in the upper toolbar and walking through your filesystem for getting the .asm file.

When your code is ready to be executed, the execution can be triggered by clicking on in the upper toolbar. If your code does not contain any syntax error, you will be redirected to the execution window. Otherwise, the syntax error will be described in the bottom of the editor window.


You can indicate to the β-machine you want to pause the execution of your code at a specific instruction by writing the keyword .breakpoint:

    |; Do something
    LD(R1, 0, R5)
    .breakpoint         |; The machine will pause its execution at this step
    ADDC(R5, R2, R6)
    |; ...