Homework # 9 and 10, Due by class time on Monday, Feb 27 NOTE THAT, UNTIL FURTHER NOTICE, ALL HOMEWORK SUBMITTED MUST BE ENTIRELY YOUR OWN WORK. NO MORE TEAM EFFORTS ON HOMEWORKS. Homework # 9 Rework your exam. Try to do it using just your reference guide, but if you need to use your book and notes feel free to do so. Be honest with yourself about how hard the exam is/was and how prepared you are/were. Homework # 10 1. In addition to a "paper solution" for exam problem #4, you are to submit a Sim68 version, via email to ee347sdsu@gmail.com. Call this routine in2ft 2. For additional practice, generate and submit two additional programs. The first one converts from a double (2-byte) number of inches to 1 byte representing feet and another byte representing the "leftover" inches. For example, 50 inches is 4 ft + 2 inches. Call this routine in2fi. The second routine is the reverse of in2fi, and converts from ft and inches back to inches (2 bytes worth). call this one fi2in. All parameters should be passed on the stack, and all registers preserved (as is becoming the usual). The stack frame before and after each of these routines is shown below. If you encounter a value that is too large to convert, you should return $FF for both bytes. Do this for both programs. This is obviously something specific that should be tested, so I will probably look for this. Note that I HAVE NOT implemented any of these routines on Sim68 myself. I don't anticipate you having any sim68 specific problems, but if you do please contact me ASAP so that I can verify the source of the problem (Sim68 versus operator error) and share your findings with your classmates. To submit: All three subroutines should be in a single file, and should only use memory addresses $3000 and above. The subroutine names should be as specified above, and the file should be named in the usual fashion: XXXhw10.asm where XXX are the first three characters of your last name. Of course your program will be debugged and tested, and will work flawlessly. for in2fi Just before just after BSR or JSR RTS SP-> | | SP-> | | |__________| |___________| | | | | | in_H | | feet | |__________| |___________| | | | | | in_L | | inches | |__________| |___________| | | | | | old stuf | | old stuf | |__________| |___________| | | | | for fi2in SP-> | | | | |__________| |___________| | | | | | feet | | in_Hi | |__________| |___________| | | | | | inches | | in_Low | |__________| |___________| | | | | | old stuff| | old stuff | |__________| |___________| | | | |