- 论坛徽章:
- 0
|
这是我的一个作业到现在还没有头绪 求大家帮忙!!!!!!
Making a new SPARC program
1 。Examine the source for the sum program. The comments in the code should be sufficient for you to determine where the addition of the values read from the keyboard occurs.
2。 Create a program 'diff.s' that calculates the difference input1 - input2 rather than the sum input1 + input2. A quick look through 3。 Appendix D in the course text will reveal what opcode you should use to compute the difference. Your program should contain appropriate comments, including your name and your student number at the top of the source file. Your newly created program should use the '*' character as a prompt rather than the angle bracket character.
Assemble and link your program, naming the executable 'difference'.
4。 Enter the following commands to demonstrate that your program works correctly.
script asn1.script
date
whoami
ls -lt
[ The command(s) necessary to assemble and link your program ]
[ A test run of your program with inputs 0 and 17 ]
[ A test run of your program with inputs 12 and -10 ]
[ A test run of your program with inputs 42 and 84 ]
ls -lt
exit
This will create a file 'asn1.script' that contains everything that appeared on the screen between the time that you typed 'script' and the time that you typed 'exit'. Note that you should not use the backspace key or the arrow keys within a script as they will not print correctly even though the file may appear correctly on the screen. If you make an error in your script simple type exit and start the process over. Once you have complete the script print the generated file so that you can hand it in with the rest of your assignment.
5。Print out the source code for your newly created program and submit it for grading with the rest of your assignment.
我实在是没有头绪 谢谢大家啊!!!!
刚才真是对不起没有说清楚 这个程序是用在UNIX平台 感谢大家啊!!! |
|