Add more jump instructions
This commit is contained in:
parent
b4d0f5d108
commit
9044dfc6b6
55
index.html
55
index.html
|
@ -219,22 +219,22 @@
|
|||
<div id="content">
|
||||
<h1 class="title">ocpu</h1>
|
||||
|
||||
<div id="outline-container-orgf884f54" class="outline-2">
|
||||
<h2 id="orgf884f54">GRU ocpu - yet another cpu design</h2>
|
||||
<div class="outline-text-2" id="text-orgf884f54">
|
||||
<div id="outline-container-orgd1abad0" class="outline-2">
|
||||
<h2 id="orgd1abad0">GRU ocpu - yet another cpu design</h2>
|
||||
<div class="outline-text-2" id="text-orgd1abad0">
|
||||
</div>
|
||||
<div id="outline-container-orgc253b03" class="outline-3">
|
||||
<h3 id="orgc253b03">Features</h3>
|
||||
<div class="outline-text-3" id="text-orgc253b03">
|
||||
<div id="outline-container-org2633cef" class="outline-3">
|
||||
<h3 id="org2633cef">Features</h3>
|
||||
<div class="outline-text-3" id="text-org2633cef">
|
||||
<ul class="org-ul">
|
||||
<li>little endian</li>
|
||||
<li>8-bit (maybe will be changed in future)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgd42b4ad" class="outline-3">
|
||||
<h3 id="orgd42b4ad">Registers</h3>
|
||||
<div class="outline-text-3" id="text-orgd42b4ad">
|
||||
<div id="outline-container-org6fd1008" class="outline-3">
|
||||
<h3 id="org6fd1008">Registers</h3>
|
||||
<div class="outline-text-3" id="text-org6fd1008">
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
|
@ -346,9 +346,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4e18f52" class="outline-3">
|
||||
<h3 id="org4e18f52">Instuctions</h3>
|
||||
<div class="outline-text-3" id="text-org4e18f52">
|
||||
<div id="outline-container-org23162a0" class="outline-3">
|
||||
<h3 id="org23162a0">Instuctions</h3>
|
||||
<div class="outline-text-3" id="text-org23162a0">
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
|
@ -485,28 +485,28 @@
|
|||
<tr>
|
||||
<td class="org-left">CMP</td>
|
||||
<td class="org-right">0x25</td>
|
||||
<td class="org-left"> </td>
|
||||
<td class="org-left">Compare</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">PUSH</td>
|
||||
<td class="org-right">0x30</td>
|
||||
<td class="org-left"> </td>
|
||||
<td class="org-left">Push to stack</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">POP</td>
|
||||
<td class="org-right">0x31</td>
|
||||
<td class="org-left"> </td>
|
||||
<td class="org-left">Pop to stack</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">JMP</td>
|
||||
<td class="org-right">0x40</td>
|
||||
<td class="org-left"> </td>
|
||||
<td class="org-left">Jump</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
|
@ -546,8 +546,29 @@
|
|||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">JE</td>
|
||||
<td class="org-right">0x46</td>
|
||||
<td class="org-left">Jump if equal</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">JL</td>
|
||||
<td class="org-right">0x47</td>
|
||||
<td class="org-left">Jump if lower</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">JH</td>
|
||||
<td class="org-right">0x48</td>
|
||||
<td class="org-left">Jump if higher</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">RTS</td>
|
||||
<td class="org-right">0x42</td>
|
||||
<td class="org-right">0x49</td>
|
||||
<td class="org-left">Return from subroutine</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
16
ocpu.org
16
ocpu.org
|
@ -72,13 +72,13 @@
|
|||
|--------------+--------+-------------------------------------------|
|
||||
| NAND | 0x24 | |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| CMP | 0x25 | |
|
||||
| CMP | 0x25 | Compare |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| PUSH | 0x30 | |
|
||||
| PUSH | 0x30 | Push to stack |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| POP | 0x31 | |
|
||||
| POP | 0x31 | Pop to stack |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| JMP | 0x40 | |
|
||||
| JMP | 0x40 | Jump |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| JSR | 0x41 | Jump to subroutine |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
|
@ -90,7 +90,13 @@
|
|||
|--------------+--------+-------------------------------------------|
|
||||
| JNZ | 0x45 | Jump if non-zero |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| RTS | 0x42 | Return from subroutine |
|
||||
| JE | 0x46 | Jump if equal |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| JL | 0x47 | Jump if lower |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| JH | 0x48 | Jump if higher |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| RTS | 0x49 | Return from subroutine |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
| INB | 0x50 | Copies value from I/O port to destination |
|
||||
|--------------+--------+-------------------------------------------|
|
||||
|
|
Loading…
Reference in New Issue