Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

NCNU System Programming Mid-Term

Date: November 30th, 2006 Time: 09:10-12:00

1. (10%) Consider the memory contents shown in the following figure. What would be loaded to register A with the instruction 022030 (hexidecimal)? 2. (40%) Briefly answer the following questions 1. Why does Beck's "System Software" textbook design a hypothetical computer SIC to present the concepts in his book? 2. What are the maximum memory size of SIC and SIC/XE, respsectively? 3. How many addressing modes do SIC and SIC/XE support, respectively? 4. How many instructions are there in the SIC/XE instruction set? 5. How does SIC determine whether the result of a TD instruction is successful? 6. What are the two general purpose registers in SIC/XE? 7. What is the size of F register? 8. Why does the assembler need to handle the source files in two passes? 3. (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.)
STRCPY FIRST MOVECH START LDX LDCH STCH TIX JLT BYTE RESB WORD WORD END 1000 ZERO STR1,X STR2,X ELEVEN MOVECH C'TEST STRING' 11 0 11 FIRST

STR1 STR2 ZERO ELEVEN

4. (10%) Translate (by hand) the following assembly program to SIC/XE object code.
STRCP2 START 1000

FIRST MOVECH

STR1 STR2

LDT LDX LDCH STCH TIXR JLT BYTE RESB END

#11 #0 STR1,X STR2,X T MOVECH C'TEST STRING' 11 FIRST

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

6. (10%) Simulate (by hand) the execution of the above program and let the breakpoint be 000013. What would be the value of register A and register X when (PC) = 000013? 7. (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

You might also like