HW1
This commit is contained in:
@@ -158,6 +158,13 @@ clean:
|
||||
distclean: clean
|
||||
$(RM) -f $(PROGRAMS)
|
||||
|
||||
run: $(PROGRAMS)
|
||||
for i in $(PROGRAMS); do \
|
||||
echo ===== $$i =====; \
|
||||
$(NACHOS) -e $$i; \
|
||||
done
|
||||
|
||||
|
||||
unknownhost:
|
||||
@echo Host type could not be determined.
|
||||
@echo make is terminating.
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
#include "syscall.h"
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
int n;
|
||||
for (n=9;n>5;n--) {
|
||||
int main() {
|
||||
int n;
|
||||
for (n = 9; n > 5; n--)
|
||||
PrintInt(n);
|
||||
}
|
||||
Halt();
|
||||
Halt();
|
||||
}
|
||||
|
||||
|
||||
1
code/test/file1.test
Normal file
1
code/test/file1.test
Normal file
@@ -0,0 +1 @@
|
||||
abcdefghijklmnopqrstuvwxyz
|
||||
2
code/test/os_students.sh
Normal file
2
code/test/os_students.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
make clean
|
||||
make run
|
||||
@@ -186,6 +186,14 @@ ThreadJoin:
|
||||
j $31
|
||||
.end ThreadJoin
|
||||
|
||||
.globl PrintInt
|
||||
.ent PrintInt
|
||||
PrintInt:
|
||||
addiu $2,$0,SC_PrintInt
|
||||
syscall
|
||||
j $31
|
||||
.end PrintInt
|
||||
|
||||
|
||||
/* dummy function to keep gcc happy */
|
||||
.globl __main
|
||||
|
||||
Reference in New Issue
Block a user