home *** CD-ROM | disk | FTP | other *** search
/ 100 Great Kid's Games 2 / 100gamesII.iso / PROGRAMS / EASIQS_5 / SAMPLE06.SDY < prev   
Text File  |  1996-03-09  |  3KB  |  106 lines

  1. "EASI QS v5"
  2. "Computer Organization Chpt 3 - MIPS assembly language"
  3. "MS Sans Serif"
  4. "MS Sans Serif"
  5. 9.75
  6. "name 2 key points about arithmetic instructions on MIPS "
  7. 9.75
  8. " 1.  always have 3 OPERANDS 
  9.  2.  arithmetic operations occur ONLY ON REGISTERS"
  10. 9.75
  11. "Name the 4 underlying principles of hardware design  "
  12. 9.75
  13. " 1. Simplicity favours regularity. 
  14.  2. Smaller is faster. 
  15.  3. Good design demands compromise.
  16.  4. Make the common case fast.
  17.  
  18.  "
  19. 9.75
  20. "Define 'spilling' registers "
  21. 9.75
  22. " The process of putting less commonly used variables
  23.  ( or those needed later ) into memory.
  24.  
  25.  ie. saving regs as procs call procs that call procs etc."
  26. 9.75
  27. "Why use registers ?  "
  28. 9.75
  29. " 1. Faster.   
  30.  2. Easier to use.   
  31.      (arith instr can read 2 regs, operate on them, write result.  
  32.      data xfer instr reads or writes only 1 operand,
  33.      without operating on it) "
  34. 9.75
  35. "What are the 2 principles of the 'stored-program' computer ?   "
  36. 9.75
  37. " 1. the use of instructions that are indistinguishable from numbers.  
  38.  2. the use of alterable memory for programs.    "
  39. 9.75
  40. "Define assembly language    "
  41. 9.75
  42. "A symbolic representation of instructions "
  43. 9.75
  44. "What are pseudoinstructions ? "
  45. 9.75
  46. "
  47.  common variations of machine language instructions
  48.      that are not part of the machine architechture,
  49.  but which the assembler accepts   
  50.      and converts into the machine language equivalent."
  51. 9.75
  52. "What's the difference between a computer and a simple calculator ?    "
  53. 9.75
  54. " The ability to make decisions. (Programmability)"
  55. 9.75
  56. "Describe the 'at' register  "
  57. 9.75
  58. "
  59.  Reg $1 (at) is reserved for the assembler
  60.      to use as a temp reg while working on pseudoinstructions 
  61.      so as not to corrupt regs used by the program."
  62. 9.75
  63. "What is 'lui' ? "
  64. 9.75
  65. " Load Upper Immed 
  66.     - sets the upper 16 bits of a 32-bit const in a reg  
  67.     - fills lower 16 with 0's 
  68.          ( a subsequent 'addi' sets the lower 16 bits )
  69.  
  70.  Note: breaking up large constants is another time the  
  71. assembler makes use of 'at', in addition to expanding   
  72. the set of 'branch' instructions accepted."
  73. 9.75
  74. "What are the MIPS addressing modes ? "
  75. 9.75
  76. " 1. Register - operand is a reg    
  77.  2. Base or Displacement - operand is at mem loc whose  
  78.           addr = addr_field + reg 
  79.  3. Immediate - operand is constant within the instruction
  80.  4. PC-relative - address = PC + constant_in_instruction"
  81. 9.75
  82. "3 General steps in translating 'C' to 'asm'..."
  83. 9.75
  84. " 1. Allocate regs to program variables    
  85.  2. Code the body of the proc 
  86.  3. Preserve regs across proc call "
  87. 9.75
  88. "Describe 'twos complement' representation"
  89. 9.75
  90. "1. MSB is 0 for all positive numbers, 1 for negative    
  91. 2. Only 1 zero
  92. 3. 1000 0000 ... is the most negative number ( -2 e (bits-1) ) 
  93.   ie for a 32-bit 1000 0000 0000 0000 = -2e31    
  94. 4. To read a negative: 
  95.     (b31 * -2e31) + (b30 * 2e30) + (b29 * 2e29) + ...
  96.               ^  
  97.    Note:  ^  ( all others positive )"
  98. 9.75
  99. "2 shortcuts for two's complement numbers  "
  100. 9.75
  101. "1. to negate a binary number: 
  102.    invert every bit, then add 1 to the result    
  103. 2. to convert a binary number of n bits to a bigger representation    
  104.     'sign extension' - copy number to larger field, then
  105.     replicate MSB to all bits left of it.   "
  106.