Difference between revisions of "CSC231 Final Exam Fall 2017"
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 | + | ______________ |
− | + | < Hello CSC231 > | |
− | < | + | -------------- |
− | |||
\ ^__^ | \ ^__^ | ||
\ (oo)\_______ | \ (oo)\_______ | ||
Line 16: | Line 16: | ||
||----w | | ||----w | | ||
|| || | || || | ||
− | + | cs231a@aurora ~ $ /usr/games/cowsay Good luck with the exam\! | |
− | + | __________________________ | |
− | /usr/games/cowsay | + | < Good luck with the exam! > |
− | + | -------------------------- | |
− | < | ||
− | -------------- | ||
\ ^__^ | \ ^__^ | ||
\ (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. |