View on GitHub

Computer Architecture and Operating Systems

Course taught at Faculty of Computer Science of Higher School of Economics

Lecture 12

Memory-Mapped I/O (MMIO)

Lecture

Slides (PDF, PPTX).

Outline

Examples

Workshop

NOTE: The tasks from this workshop may take time. If one workshop is not enough to solve them, you may take some time from the next workshop (if it does not have a lot of practical materials).

  1. Study and run the examples from the lecture.

  2. Input a floating-point number, round it to one digit to the right of decimal point (e.g. 3.5) and display it in the Digital Sim Lab display. Use digit_lab1.s as a starting program.

  3. Modify the digit_lab2.s program to display keys pressed in the hexadecimal keyword in the digital display (as decimal values, e.g. F == 15). Use the workshop task as a basis.

  4. Write a program (based on digit_lab2.s) that inputs an integer value X (with he ReadInt system call) and then uses Digital Sim Lab to enter 32-bit integers (8 hexadecimal digits) Y. It repeats entering integers until the entered Y is not equal to X. Then it prints FOUND and exits. If Y equals 0 the program must print STOPPED and exit.

  5. Write a program that draws a square with size 64×64 dots in the middle of Bitmap Display (see the Tools menu of RARS) with size 128×128 dots. The color and the thickness of lines in dots is specified by the user (use the ReadInt system call). See bitmap_display.s as an example.

Homework

TODO: Add descriptions and Ejudge tasks

Solve the following tasks and submit them into Ejudge:

  1. FullRainbow
  2. TheCircle

References