230 likes | 356 Views
This mid-term examination focuses on the SIC and SIC/XE computer architecture, memory contents, instruction sets, and assembly programming. Key topics include loading registers, addressing modes, instruction sets, and the role of a two-pass assembler. Students will demonstrate their understanding through hand translations of assembly programs to object code and simulate execution of given SIC programs. This exam also covers disassembly processes and the use of condition codes for successful instruction execution.
E N D
System Programming Mid-Term Date: October 28th, 2005 Time: 09:10-12:00 2005/11/04
Q1(10%) • Consider the memory contents shown in the following figure.What would be loaded to register A with the instruction 022030 (hexidecimal)?
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)
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)
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
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.)
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.)
Q3(10%) HSTRCPY00100000002B T0010000F04102550900F54901A2C1028381003 T00100F0B5445535420535453494E47 T0010250600000000000B E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Q4(10%) • Translate (by hand) the following assembly program to SIC/XE object code.
Q4(10%) • Translate (by hand) the following assembly program to SIC/XE object code.
Q4(10%) HSTRCP2001000000027 T0010001175000B05000053A00857A010B8503B2FF5 T0010110B544553542053545249 E001000 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Q5(10%) • Disassemble (convert object code back into assembly language) the following SIC program. HSUM 00100000000E T0010000E01000005000190102D000B3B2FF8 E001000
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
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
Q7(10%) • [(1+100)*100]/2=5050 • A=13BA
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