1 / 21

SP Mid-Term Exam

SP Mid-Term Exam. Chang-Yu Wu 2006/12/03. Q1. Consider the memory contents shown in the following figure. What would be loaded to register A with the instruction 022030 (hexidecimal)? (10%). Answer. Q2. Briefly answer the following questions (40%).

munin
Download Presentation

SP Mid-Term Exam

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SP Mid-Term Exam Chang-Yu Wu 2006/12/03

  2. Q1. Consider the memory contents shown in the following figure.What would be loaded to register A with the instruction 022030 (hexidecimal)? (10%)

  3. Answer

  4. Q2. Briefly answer the following questions (40%) • 1. Why does Beck's "System Software" textbook design a hypothetical computer SIC to present the concepts in his book? Ans: illustrate the most commonly encountered hardware features and concepts, while avoiding most of the idiosyncrasies. (p.4)

  5. 2. What are the maximum memory size of SIC and SIC/XE, respectively? Ans: 215/220 bytes(p.5/p.7) • 3.How many addressing modes do SIC and SIC/XE support, respectively? Ans: 2/18 (p.6/p.499)

  6. 4.How many instructions are there in the SIC/XE instruction set? Ans: 59 (p.496~498) • 5.How does SIC determine whether the result of a TD instruction is successful? Ans: CC (condition code) = LT means the device is ready (p.7)

  7. 6. What are the two general purpose registers in SIC/XE? Ans: S,T (p.7) • 7. What is the size of F register? Ans: 48bits (p.7)

  8. 8. Why does the assembler need to handle the source files in two passes? Ans: Pass1: assign addresses to all symbol Pass2: generate object code in order to solve the problem of forward reference

  9. Q3. Translate (by hand) the following assembly program to SIC object code. (The output format will look like Figure 2.3, which contains H record, T record, and E record.) (10%)

  10. Answer HSTRCPY00100000002B T0010000F04102550900F54901A2C1028381003 T00100F0B5445535420535453494E47 T0010250600000000000B E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

  11. Q4. Translate (by hand) the following assembly program to SIC/XE object code.

  12. Answer HSTRCP2001000000027 T0010001175000B05000053A00857A010B8503B2FF5 T0010110B5445535420535452494E47 E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

  13. Q5. Disassemble (convert object code back into assembly language) the following SIC/XE program. (10%) HQUIZ 000000000019 T000000130100031320100500006F10001690010F900013 E000000

  14. Answer: QUIZ START 0 FIRST LDA #3 STX THREE LDX #0 +LDS THREE ADDR A,X +STA RESULT,X RESULT RESW 1 THREE RESW 1 END FIRST 0000 0003 0006 0009 000D 000F 0013 0016 010003 132010 050000 6F100016 9001 0F900013

  15. Q6. Simulate (by hand) the execution of the above program and let the breakpoint by 000013. What would be the value of register X when (pc) = 000013? (10%) REGISTER A=3 X=3

  16. Q7. Simulate (by hand) the execution of the object code below. Let the breakpoint be 001011. What is the value of register A when (PC) =001011? (10%) HGAUSS 001000000017 T0010000C01000169200B1B4003232008 T00100C0B6F40009C40000002000064 E001000

  17. Answer

  18. [(1+100)*100]/2=5050 A=13BA

More Related