home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / win / edu / easi_ps / qs28.sdy < prev    next >
Text File  |  1995-10-31  |  3KB  |  70 lines

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