Presentation on theme: "System Programming Mid-Term Date: October 28th, 2005 Time: 09:10-12:00."— Presentation transcript:
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)?............ (B)=006000 (PC)=003000 (X)=000090 3030003600............ 3600103000............ 639000C303............ C303003030............
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? 2 15 /2 20 (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.) LocSource statementObject code STRCPYSTART 1000 FIRSTLDXZERO MOVECH LDCHSTR1,X STCHSTR2,X TIXELEVEN JLTMOVECH STR1BYTEC’TEST STRING’ STR2RESB11 ZEROWORD0 ELEVENWORD11 ENDFIRST
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.) LocSource statementObject code 1000STRCPYSTART 1000 FIRSTLDXZERO041025 1003MOVECH LDCHSTR1,X50900F 1006STCHSTR2,X54901A 1009TIXELEVEN2C1028 100CJLTMOVECH381003 100FSTR1BYTEC’TEST STRING’544553… 101ASTR2RESB11 1025ZEROWORD0000000 1028ELEVENWORD1100000B 102BENDFIRST
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 Iteration Register 1234567891011 A013610152127364555 X1234567891011
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
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. 4 th (tonight) Subject of email: [SP HW1v2] ######## Email to me: email@example.com@ncnu.edu.tw
Your consent to our cookies if you continue to use this website.