1 / 23

System Programming Mid-Term

System Programming Mid-Term . Date: October 28th, 2005 Time: 09:10-12:00 . Q1 (10%). Consider the memory contents shown in the following figure. What would be loaded to register A with the instruction 022030 (hexidecimal)? . Q1 (10%). Q2 (40%).

amiel
Download Presentation

System Programming Mid-Term

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. System Programming Mid-Term Date: October 28th, 2005 Time: 09:10-12:00

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

  3. Q1(10%)

  4. Q2(40%) • Why does Beck's "System Software" textbook design a hypothetical computer SIC to present the concepts in his book? • illustrate the most commonly encountered hardware features and concepts, while avoiding most of the idiosyncrasies (p.4) • easy to learn • What are the maximum memory size of SIC and SIC/XE, respectively? • 215/220 (p.5/p.7)

  5. Q2(40%) • How many addressing modes do SIC and SIC/XE support, respectively? • 2/18 (p.6/p.499) • How many instructions are there in the SIC/XE instruction set? • 59 (p.496~498) • How does SIC determine whether the result of a TD instruction is successful? • CC (condition code) = LT means the device is ready (p.7)

  6. Q2(40%) • What are the two general purpose registers in SIC/XE? • S,T (p.7) • What is the size of F register? • 48bits (p.7) • Why does the assembler need to handle the source files in two passes? • Pass1 assign addresses to all symbol • Pass2 generate object code • in order to solve the problem of forward reference

  7. Q3(10%) • 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.)

  8. Q3(10%) • 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.)

  9. Q3(10%)

  10. Q3(10%) HSTRCPY00100000002B T0010000F04102550900F54901A2C1028381003 T00100F0B5445535420535453494E47 T0010250600000000000B E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

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

  12. Q4(10%) • Translate (by hand) the following assembly program to SIC/XE object code.

  13. Q4(10%)

  14. Q4(10%) HSTRCP2001000000027 T0010001175000B05000053A00857A010B8503B2FF5 T0010110B544553542053545249 E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

  15. Q5(10%) • Disassemble (convert object code back into assembly language) the following SIC program. HSUM 00100000000E T0010000E01000005000190102D000B3B2FF8 E001000

  16. Q5(10%)

  17. Q5(10%)

  18. Q6(10%) • Simulate (by hand) the execution of the above program and let the breakpoint be 00100E. What would be the value of register A and register X when (PC) = 00100E? • 1+2+3+……+9+10=55 • A=37, X=B

  19. Q7(10%) • 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? HGAUSS 001000000017 T0010000C01000169200B1B4003232008 T00100C0B6F40009C40000002000064 E001000

  20. Q7(10%)

  21. Q7(10%)

  22. Q7(10%) • [(1+100)*100]/2=5050 • A=13BA

  23. Homework • The code can work well  greater than 7 • If I need to correct it  less then 5 • Second chance  23:59 on Nov. 4th (tonight) • Subject of email: [SP HW1v2] ######## • Email to me: s94321517@ncnu.edu.tw

More Related