Difference between revisions of "CSC231 Final Exam Fall 2017"

From dftwiki3
Jump to: navigation, search
Line 4: Line 4:
 
* Get a fresh copy of 231Lib.asm..
 
* Get a fresh copy of 231Lib.asm..
 
* Make a copy of it under the name 231Lib2.asm
 
* Make a copy of it under the name 231Lib2.asm
* Add a new function to 231Lib2.asm called _cowPrint() that gets a message in ecx, edx (similarly to _printString),  and that prints a message with a cow, similarly to the bash command cowsay.
+
* Add a new function to 231Lib2.asm called _cowPrint() that gets a message in ecx, edx (similarly to _printString),  and that prints a message with a cow, similarly to the bash command cowsay.  See below for an example.
 +
* The message can be at most 80 characters, and will be printed as one line.  The Linux '''cowsay''' command wraps long messages but you are not supposed to implement this feature.
 
::<source lang="text">
 
::<source lang="text">
 
+
cs231a@aurora ~ $ /usr/games/cowsay Hello CSC231
/usr/games/cowsay That\'s all folks\!
+
  ______________
  ___________________
+
< Hello CSC231 >
< That's all folks! >
+
  --------------
  -------------------
 
 
         \  ^__^
 
         \  ^__^
 
         \  (oo)\_______
 
         \  (oo)\_______
Line 16: Line 16:
 
                 ||----w |
 
                 ||----w |
 
                 ||    ||
 
                 ||    ||
 
+
cs231a@aurora ~ $ /usr/games/cowsay Good luck with the exam\!
 
+
  __________________________
/usr/games/cowsay we are here\!
+
< Good luck with the exam! >
  ______________
+
  --------------------------
< we are here! >
 
  --------------
 
 
         \  ^__^
 
         \  ^__^
 
         \  (oo)\_______
 
         \  (oo)\_______
Line 27: Line 25:
 
                 ||----w |
 
                 ||----w |
 
                 ||    ||
 
                 ||    ||
 
+
cs231a@aurora ~ $
 
</source>
 
</source>
 
* Your function should not modify any of the registers.
 
* Your function should not modify any of the registers.

Revision as of 17:14, 10 December 2017


...