Hardware and Computer Organization- P9

Hardware and Computer Organization- P9:Today, we often take for granted the impressive array of computing machinery that surrounds us and helps us manage our daily lives. Because you are studying computer architecture and digital hardware, you no doubt have a good understanding of these machines, and you’ve probably written countless programs on your PCs and workstations. | Chapter 8 SP A3 D1 D7 Restore the registers exit RTS return to test program The data storage region contains out test patterns and the reserved memory for holding the count and the bad addresses. Notice that the end directive comes at the end of all of the source code not just the program code. The value defined by end_tests is similar to the NULL character that we use to terminate a string in C. Each time through the test loop we check for this character to see if the program is done. Data storage region tests test1 test2 test3 test4 end_tests bad_ _cnt 1 counter for bad bad_ _addr 10 save space for 10 END 400 end of program and Suggested Exercise tests locations locations load address Carefully read the code and then build a flow chart to describe how it works. Next create a source file and run the program in the simulator. In order to test the program change the ending address for the test to something reasonably close to the beginning perhaps 10 or 20 bytes away from the start. Next assemble the program and using the list file set a breakpoint at the instruction in the subroutine where the data value is written to memory. Using the trace instruction write the data value to memory but then change the value stored in memory before starting to trace the program again. In other words force the test to fail. Watch the program flow and confirm that it is behaving the way you would expect it to. If you are unsure about why a particular instruction or addressing mode is used review it in your notes or refer to your Programmer s Reference Manual. Finally using this program as a skeleton see if you can improve on it using other addressing modes or instructions. Please give this exercise a considerable amount of time. It is very fundamental to all of the programming concepts that we ve covered so far. Summary of Chapter 8 Chapter 8 covered How negative and real numbers are represented and manipulated within a computer. Branches and the general .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
12    21    1    27-11-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.