8-appendix.tex 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. \arrayrulecolor{black}
  2. \begin{longtable}[h!]{| l | p{.70\textwidth} | c |}
  3. \caption{Instruction set for RISC processor. * Required immediate size in bytes}
  4. \label{table:risc_instructions}\\
  5. \hline
  6. \rowcolor[rgb]{0.82,0.82,0.82}
  7. Instr. & Description & I-size *\\\hline
  8. \endhead
  9. \arrayrulecolor{black}\hline
  10. \endfoot
  11. \multicolumn{3}{|c|}{
  12. \cellcolor[rgb]{0.7,0.7,1}\textit{2 register instructions}} \\\hline
  13. \arrayrulecolor[rgb]{0.82,0.82,0.82}
  14. MOVE & Copy value from one register to other & 0 \\\hline
  15. ADD & Arithmetical addition & 0 \\
  16. SUB & Arithmetical subtraction & 0 \\
  17. AND & Logical AND & 0 \\
  18. OR & Logical OR & 0 \\
  19. XOR & Logical XOR & 0 \\
  20. MUL & Arithmetical multiplication & 0 \\
  21. DIV & Arithmetical division (inc. modulus) & 0 \\
  22. \arrayrulecolor{black}\hline
  23. \multicolumn{3}{|c|}{
  24. \cellcolor[rgb]{0.7,0.7,1}\textit{1 register instructions}} \\
  25. \hline\arrayrulecolor[rgb]{0.82,0.82,0.82}
  26. COPY0 & Copy intimidate to a register 0 & 1 \\
  27. COPY1 & Copy intimidate to a register 1 & 1 \\
  28. COPY2 & Copy intimidate to a register 2 & 1 \\
  29. COPY3 & Copy intimidate to a register 3 & 1 \\\hline
  30. ADDC & Arithmetical addition with carry bit& 0 \\
  31. ADDI & Arithmetical addition with immediate & 1 \\
  32. SUBC & Arithmetical subtraction with carry bit & 0 \\
  33. SUBI & Arithmetical subtraction with immediate & 1 \\\hline
  34. ANDI & Logical AND with immediate & 1 \\
  35. ORI & Logical OR with immediate & 1 \\
  36. XORI & Logical XOR with immediate & 1 \\\hline
  37. CI0 & Replace intimidate value byte 0 for next instruction & 1 \\
  38. CI1 & Replace intimidate value byte 1 for next instruction & 1 \\
  39. CI2 & Replace intimidate value byte 2 for next instruction & 1 \\\hline
  40. SLL & Shift left logical & 1 \\
  41. SRL & Shift right logical & 1 \\
  42. SRA & Shift right arithmetical & 1 \\\hline
  43. LWHI & Load word (high byte) & 3 \\
  44. SWHI & Store word (high byte, reg. only) & 0 \\
  45. LWLO & Load word (low byte) & 3 \\
  46. SWLO & Store word (low byte, stores high byte reg.) & 3 \\\hline
  47. INC & Increase by 1 & 0 \\
  48. DEC & Decrease by 1 & 0 \\
  49. GETAH& Get ALU high byte reg. (only for MUL \& DIV \& ROL \& ROR) & 0 \\
  50. GETIF& Get interrupt flags & 0 \\\hline
  51. PUSH & Push to stack & 0 \\
  52. POP & Pop from stack & 0 \\
  53. COM & Send/Receive to/from com. block & 1 \\\hline
  54. BEQ & Branch on equal & 3 \\
  55. BGT & Branch on greater than & 3 \\
  56. BGE & Branch on greater equal than & 3 \\
  57. BZ & Branch on zero & 2 \\
  58. \arrayrulecolor{black}\hline
  59. \multicolumn{3}{|c|}{
  60. \cellcolor[rgb]{0.7,0.7,1}\textit{0 register instructions}
  61. } \\
  62. \hline\arrayrulecolor[rgb]{0.82,0.82,0.82}
  63. CALL & Call function, put return to stack & 2 \\
  64. RET & Return from function & 0 \\
  65. JUMP & Jump to address & 2 \\
  66. RETI & Return from interrupt & 0 \\
  67. INTRE& Set interrupt entry pointer & 2 \\\hline
  68. \end{longtable}
  69. \arrayrulecolor{black}
  70. \begin{longtable}[h!]{| l | p{0.8\textwidth} |}
  71. \caption{Instructions for OISC processor.}
  72. \label{table:oisc_instructions}\\
  73. \hline
  74. \rowcolor[rgb]{0.82,0.82,0.82}
  75. Name & Description \\\hline
  76. \endhead
  77. \arrayrulecolor{black}\hline
  78. \endfoot
  79. \multicolumn{2}{|c|}{
  80. \cellcolor[rgb]{0.7,0.7,1}\textit{Destination Addresses}} \\\hline
  81. \arrayrulecolor[rgb]{0.82,0.82,0.82}
  82. ACC0 & Set ALU source A accumulator \\
  83. ACC1 & Set ALU source B accumulator \\\hline
  84. BR0 & Set Branch pointer register (low byte) \\
  85. BR1 & Set Branch pointer register (high byte) \\
  86. BRZ & If source value is 0, set program counter to branch pointer \\\hline
  87. STACK& Push value to stack \\
  88. MEM0 & Set Memory pointer register (low byte) \\
  89. MEM1 & Set Memory pointer register (middle byte) \\
  90. MEM2 & Set Memory pointer register (high byte) \\
  91. MEMHI& Save high byte to memory at memory pointer \\
  92. MEMLO& Save low byte to memory at memory pointer \\\hline
  93. COMA & Set communication block address register \\
  94. COMD & Send value to communication block \\\hline
  95. REG0 & Set general purpose register 0 \\
  96. REG1 & set general purpose register 1 \\
  97. \arrayrulecolor{black}\hline
  98. \multicolumn{2}{|c|}{
  99. \cellcolor[rgb]{0.7,0.7,1}\textit{Source Addresses}} \\
  100. \hline\arrayrulecolor[rgb]{0.82,0.82,0.82}
  101. NULL & Get constant 0 \\
  102. ALU0 & Get value at ALU source A accumulator \\
  103. ALU1 & Get value at ALU source B accumulator \\\hline
  104. ADD & Get Arithmetical addition of ALU sources \\
  105. ADDC & Get Arithmetical addition carry \\
  106. ADC & Get Arithmetical addition of ALU sources and carry \\\hline
  107. SUB & Get Arithmetical subtraction of ALU sources \\
  108. SUBC & Get Arithmetical subtraction carry \\
  109. SBC & Get Arithmetical subtraction of ALU sources and carry \\\hline
  110. AND & Get Logical AND of ALU sources \\
  111. OR & Get Logical OR of ALU sources \\
  112. XOR & Get Logical XOR of ALU sources \\\hline
  113. SLL & Get ALU source A shifted left by source B \\
  114. SRL & Get ALU source A shifted right by source B \\
  115. ROL & Get rolled off value from previous SLL instance \\
  116. ROR & Get rolled off value from previous SRL instance \\\hline
  117. MULLO& Get Arithmetical multiplication of ALU sources (low byte) \\
  118. MULHI& Get Arithmetical multiplication of ALU sources (high byte) \\
  119. DIV & Get Arithmetical division of ALU sources \\
  120. MOD & Get Arithmetical modulus of ALU sources \\\hline
  121. EQ & Check if ALU source A is equal to source B \\
  122. GT & Check if ALU source A is greater than source B \\
  123. GE & Check if ALU source A is greater or equal to source B \\
  124. NE & Check if ALU source A is not equal to source B \\
  125. LT & Check if ALU source A is less than source B \\
  126. LE & Check if ALU source A is less or equal to to source B \\\hline
  127. BR0 & Get Branch pointer register value (low byte) \\
  128. BR1 & Get Branch pointer register value (high byte) \\
  129. PC0 & Get Program counter value (low byte) \\
  130. PC1 & Get Program counter value (high byte) \\\hline
  131. MEM0 & Get Memory pointer register value (low byte) \\
  132. MEM1 & Get Memory pointer register value (middle byte) \\
  133. MEM2 & Get Memory pointer register value (high byte) \\
  134. MEMHI& Load high byte from memory at memory pointer \\
  135. MEMLO& Load low byte from memory at memory pointer \\\hline
  136. STACK& Pop value from stack \\
  137. ST0 & Get stack address value (low byte) \\
  138. ST1 & Get stack address value (high byte) \\
  139. COMA & Get communication block address register value \\
  140. COMD & Read value from communication block \\\hline
  141. REG0 & Get value from general purpose register 0 \\
  142. REG1 & Get value from general purpose register 1 \\
  143. \end{longtable}