tailieunhanh - Hardware and Computer Organization- P17

Hardware and Computer Organization- P17: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 9 Solutions for Odd-Numbered Problems 1. This is an example of the addressing mode known as address register indirect with index and displacement . The effective address is the sum of the address value in A0 the index value D0 and the 2 s complement displacement. Since 84 is a negative number -7C. Thus the effective address EA 2000 0400 - 7C . EA 2384 The program is not relocatable for two reasons 1. There is a jump to an absolute address start 2. An absolute address is loaded into A0. The program could still be relocatable by managing what gets loaded into A0 and D0 but the jump instruction forces it to be absolute. 3. The value in D0 after the highlighted instruction is 0000002A. 5. 00000400 067955550000AAAA 5555 0000AAAA 00000408 06B9AAAA55550000FFFE AAAA5555 0000FFFE 00000412 0640AAAA AAAA D0 7. CSS 422 HW 4 Relocatable Memory test program System equates patternl EQU AAAA First test pattern pattern2 EQU FFFF Second test pattern pattern3 EQU 0001 Third test pattern st_addr EQU 00000400 Starting address of test end_addr EQU 0009FFF0 Ending address of the test stack EQU 000C0000 Location of the stack pointer word EQU 2 Length of a word in bytes byte EQU 1 One byte long NO MAGIC NUMBERS bit EQU 1 Shifting by bits exit_pgm EQU 2700 Simulator exit code data EQU 500 Data storage region start EQU 400 Program starts here 463 Appendix A new_ad pr_cmd EQU EQU 000A0000 00 Relocated program runs here Command to print message Main Program OPT CRE Turn on cross references ORG start Program begins here LEA stack SP Initialize the stack pointer LEA relo A0 Starting address pointer LEA last_addr A1 End pointer LEA new_ad A3 Destination relo_lp A0 A3 Move a word A0 Al Have we moved enough BPL relo_lp JMP new_ad relo LEA test_patt PC A3 A3 points to the test pattern to use LEA bad_cnt PC A4 A4 points to bad memory counter LEA bad_addr PC A5 A5 points to the bad addr location LEA data_read PC A6 A6 points to data storage A4 Clear bad

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.