

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Roch; Class: OPERATING SYSTEMS; Subject: Computer Science; University: San Diego State University; Term: Unknown 1989;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Part I must be done individually. Part II may be done with a pair programmer if desired. As with all assignments in this class, qualitative questions should be answered with grammatically correct sentences.
Due, Monday, Feb 18th^ at the beginning of class.
The kernel programming interface for MejorOS states that to print a string to the current output device, the value 0x90 should be loaded into register v and the address of the string in register r4. Upon returning from the exception, register r0 contains the result of the system code (0 if successful, 1 otherwise). In addition to syscall, you will need to use the following instructions:
Fortunately, you are using a C/C++ compiler which has an extension for including assembler instructions. Any block preceded by __asm contains assembly instructions and if the compiler can translate C/C++ variables into addresses. As an example, if the variable foo was declared as a word sized integer, one could write a function void bar(int foo) as follows:
Roch p. 2
void bar(int foo) { /* assembler comments start
While function foo is not particularly useful, your print_string function will be used throughout the world on cable & satellite set top boxes, routers, and other embedded devices, earning you as much fame and fortune as the person who wrote the printf/cout functions that you will be using in Part II.
This is a small programming assignment designed to give you experience in making system calls, and reading manual pages. This program must execute correctly on systems implementing the POSIX standard (e.g. rohan which runs Solaris UNIX, or any modern linux distribution).
Directories are actually special files that contain information about other files. In this programming assignment, you will get your feet wet with system calls and manual pages. In this assignment, you will write your own version of the "ls" command which lists files in a directory. Your version of ls, myls will be significantly simpler than the standard ls. Basic functionality when user executes myls: