annotate simple16.html @ 45:5338b9affd09

Updated HTML documentation to reflect CPU changes
author Michael Pavone <pavone@retrodev.com>
date Mon, 29 Aug 2016 21:17:41 -0700
parents a64e11e48a41
children 5f30c4d18d79
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 <!doctype html>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 <html>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 <head>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 <style>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 body {
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 font-family: Helvetica, Arial, sans-serif;
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 }
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 </style>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 </head>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 <body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 <h1>Simple 16</h1>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 Simple 16 is a toy 16-bit video game console designed with simplicity of implementation in mind. While it is technically a 16-bit system,
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 it's capabilites are in many ways closer to an 8-bit system. Ultimately, the hope is that Simple 16 is simple enough to provide an easy
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 introduction for the novice emudev while still containing all the essential features of an older game console.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 <h2>Table of Contents</h2>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 <li><a href="#cpu">CPU</a>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 <li><a href="#cpuover">Overview</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 <li><a href="#cpuregs">Registers</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 <li><a href="#instructions">Instructions</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 <li><a href="#execution">Execution Details</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26 <li><a href="#interrupts">Exceptions and Interrupts</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28 </li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
29 <li><a href="#video">Video</a>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
30 <ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
31 <li><a href="#vidover">Overview</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
32 <li><a href="#vidregs">IO Ports</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
33 <li><a href="#vidmem">Memory Map</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
34 <li><a href="#vidrender">Rendering</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
35 </ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
36 </li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37 <li><a href="#audio">Audio</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
38 <ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
39 <li><a href="#audover">Overview</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
40 <li><a href="#audregs">IO Ports</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
41 </ul>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 <li><a href="#timer">Timer</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 <li><a href="#controllers">Controllers</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
44 <li><a href="#serial">Serial Port</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 <li><a href="#cart">Cartridge</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
46 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
47 <h2 id="cpu">CPU</h2>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
48 <h3 id="cpuover">Overview</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
49 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
50 The Simple 16 CPU is a 16-bit RISC design. It has a main register file of 16 16-bit registers. Additionally, there are five special
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
51 purpose registers dedicated to exception processing. It has a flag 16-bit addres space. Instructions are a fixed size and are also 16-bits.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
52 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
53 <h3 id="cpuregs">Registers</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 The first 14 registers in the main file have no fixed function and are named r0 through r13. r14 serves as the program counter and
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
56 points to the next instruction to be fetched. More information about instruction fetch and execution can be found in
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
57 <a href="#execution">Execution Details</a>. r15 serves as the status register. The status register contains bits corresponding
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
58 to the result of the last arithmetic instruction and the interrupt mask. The layout of the status register is given below.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
60 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
61 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 <th>Bit</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63 <th>Use</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 <th>Notes</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
65 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
66 <td>15-5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
67 <td>Unused</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
68 <td>Should be set to zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
69 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
72 <td>Negative Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 <td>Indicates the last result was negative.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
74 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
75 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
76 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
77 <td>Carry Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
78 <td>Generally indicates a carry out of bit 15. Last bit shifted out for shift instructions.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
79 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 <td>Zero fFag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83 <td>Indicates the last result was zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
87 <td>Interrupt 1 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88 <td>Interrupt 1 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
89 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
90 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
91 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
92 <td>Interrupt 0 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
93 <td>Interrupt 0 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
94 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
95 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
96 <h3 id="instructions">Instructions</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98 <li><a href="#ldim">ldim IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 <li><a href="#ldimh">ldimh IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100 <li><a href="#ld8">ld8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
101 <li><a href="#ld16">ld16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
102 <li><a href="#str8">str8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103 <li><a href="#str16">str16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 <li><a href="#add">add rA, rB, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
105 <li><a href="#adc">adc rA, rB, rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106 <li><a href="#and">and rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 <li><a href="#or">or rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
108 <li><a href="#xor">xor rA, rB, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
109 <li><a href="#lsl">lsl rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
110 <li><a href="#lsr">lsr rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
111 <li><a href="#asr">asr rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
112 <li><a href="#bcc">bCC LABEL</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
113 <li><a href="#mov">mov rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
114 <li><a href="#neg">neg rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
115 <li><a href="#not">not rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
116 <li><a href="#cmp">cmp rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
117 <li><a href="#call">call rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
118 <li><a href="#swap">swap rA, rD</a></li>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
119 <li><a href="#longjmp">longjmp</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
120 <li><a href="#ini">ini IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
121 <li><a href="#outi">outi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
122 <li><a href="#addi">addi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
123 <li><a href="#andi">andi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
124 <li><a href="#ori">ori IM, rD</a></li>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
125 <li><a href="#xori">xori IM, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
126 <li><a href="#lsli">lsli IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
127 <li><a href="#lsri">lsri IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
128 <li><a href="#cmpi">cmpi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
129 <li><a href="#reti">reti rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
130 <li><a href="#trapi">trapi IM</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
131 <li><a href="#getepc">getepc rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
132 <li><a href="#setepc">setepc rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
133 <li><a href="#getesr">getesr rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
134 <li><a href="#setesr">setser rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
135 <li><a href="#geteur">geteur rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
136 <li><a href="#seteur">seteur rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
137 <li><a href="#getenum">getenum rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
138 <li><a href="#setenum">setenum rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
139 <li><a href="#getvbr">getvbr rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
140 <li><a href="#setvbr">setvbr rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
141 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142 <h4 id="ldim">ldim IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
144 ldim sign extends an 8-bit immediate value to 16-bits and assigns it to the designated register.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
145 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
146 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
147 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
148 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
149 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
150 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
151 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
152 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
153 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
154 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
155 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
156 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
157 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
158 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
159 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
160 <td>$0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
161 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
162 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
163 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
164 <h4 id="ldimh">lidmh IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
166 ldimh assigns an 8-bit immediate value to the upper 8-bits of rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
167 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
168 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
169 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
170 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
171 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
172 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
173 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
174 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
175 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
176 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
177 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
178 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
179 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
180 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
181 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
182 <td>$1</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
183 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
184 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
185 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
186 <h4 id="ld8">ld8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
187 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
188 Reads a byte from the address indicated by the sum of rA and rB and loads it into rD
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
189 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
190 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
191 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
192 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
193 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
194 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
195 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
196 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
197 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
198 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
199 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
200 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
201 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
202 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
203 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
204 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
205 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
206 <td>$2</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
207 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
208 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
209 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
210 <h4 id="ld16">ld16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
211 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
212 Reads a word from the address indicated by the sum of rA and rB and loads it into rD
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
213 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
214 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
215 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
216 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
217 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
218 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
219 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
220 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
221 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
222 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
223 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
224 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
225 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
226 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
227 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
228 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
229 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
230 <td>$3</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
231 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
232 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
233 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
234 <h4 id="str8">str8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
235 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
236 Writes the byte stored in rD to the address indicated by the sum of rA and rB.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
237 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
238 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
239 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
240 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
241 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
242 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
243 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
244 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
245 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
246 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
247 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
248 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
249 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
250 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
251 <td>Register containing value to write (aka rD)</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
252 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
253 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
254 <td>$4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
255 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
256 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
257 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
258 <h4 id="str16">str16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
259 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
260 Writes the word stored in rD to the address indicated by the sum of rA and rB.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
261 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
262 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
263 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
264 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
265 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
266 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
267 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
268 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
269 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
270 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
271 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
272 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
273 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
274 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
275 <td>Register containing value to write (aka rD)</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
276 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
277 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
278 <td>$5</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
279 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
280 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
281 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
282 <h4 id="add">add rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
283 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
284 Adds rA and rB. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
285 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
286 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
287 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
288 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
289 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
290 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
291 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
292 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
293 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
294 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
295 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
296 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
297 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
298 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
299 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
300 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
301 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
302 <td>$6</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
303 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
304 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
305 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
306 <h4 id="adc">adc rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
307 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
308 Adds rA, rB and the carry flag. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
309 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
310 <p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
311 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
312 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
313 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
314 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
315 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
316 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
317 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
318 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
319 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
320 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
321 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
322 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
323 <td>$7</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
324 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
325 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
326 </p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
327 <p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
328 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
329 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
330 <h4 id="and">and rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
331 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
332 Bitwise and of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
333 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
334 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
335 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
336 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
337 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
338 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
339 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
340 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
341 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
342 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
343 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
344 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
345 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
346 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
347 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
348 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
349 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
350 <td>$8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
351 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
352 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
353 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
354 <h4 id="or">or rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
355 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
356 Bitwise or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
357 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
358 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
359 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
360 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
361 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
362 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
363 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
364 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
365 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
366 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
367 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
368 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
369 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
370 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
371 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
372 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
373 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
374 <td>$9</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
375 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
376 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
377 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
378 <h4 id="xor">xor rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
379 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
380 Bitwise exclusive or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
381 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
382 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
383 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
384 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
385 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
386 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
387 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
388 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
389 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
390 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
391 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
392 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
393 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
394 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
395 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
396 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
397 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
398 <td>$A</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
399 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
400 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
401 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
402 <h4 id="lsl">lsl rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
403 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
404 The value in rA is shifted left by rB bits and stored in rD
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
405 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
406 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
407 <strong>Flags:</strong> C = last bit shifted out of rA, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
408 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
409 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
410 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
411 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
412 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
413 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
414 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
415 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
416 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
417 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
418 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
419 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
420 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
421 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
422 <td>$B</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
423 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
424 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
425 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
426 <h4 id="lsr">lsr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
427 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
428 The value in rA is shifted right by rB bits and stored in rD
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
429 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
430 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
431 <strong>Flags:</strong> C = last bit shifted out of rA, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
432 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
433 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
434 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
435 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
436 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
437 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
438 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
439 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
440 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
441 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
442 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
443 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
444 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
445 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
446 <td>$C</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
447 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
448 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
449 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
450 <h4 id="asr">asr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
451 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
452 The value in rA is arithmetically shifted right by rB bits and stored in rD. The most significant bit of rA is copied
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
453 into the newly shifted bits. This allows asr to be used for signed division by powers of 2 as the sign is preserved.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
454 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
455 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
456 <strong>Flags:</strong> C = last bit shifted out of rA, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
457 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
458 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
459 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
460 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
461 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
462 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
463 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
464 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
465 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
466 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
467 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
468 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
469 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
470 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
471 <td>$D</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
472 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
473 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
474 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
475 <h4 id="bcc">bCC LABEL</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
476 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
477 bCC performs a relative branch if the condition indicated by CC is true. It has a range of 131 instructions forward or
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
478 124 instructions backwards. CC must be one of the following values
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
479 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
480 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
481 <th>CC</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
482 <th>Mnemonic</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
483 <th>Name</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
484 <th>Description</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
485 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
486 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
487 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
488 <td>ra</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
489 <td>bRanch Always</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
490 <td>Unconditionall branch</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
491 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
492 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
493 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
494 <td>rf</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
495 <td>bRanch False</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
496 <td>Effectively a nop</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
497 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
498 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
499 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
500 <td>eq</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
501 <td>EQual</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
502 <td>Branch if zero flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
503 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
504 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
505 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
506 <td>ne</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
507 <td>Not Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
508 <td>Branch if zero flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
509 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
510 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
511 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
512 <td>mi</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
513 <td>MInus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
514 <td>Branch if negative flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
515 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
516 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
517 <td>5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
518 <td>pl</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
519 <td>PLus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
520 <td>Branch if negative flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
521 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
522 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
523 <td>6</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
524 <td>cs</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
525 <td>Carry Set</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
526 <td>Branch if carry flag is 1. Unsigned "less than" when used with cmp</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
527 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
528 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
529 <td>7</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
530 <td>cc</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
531 <td>Carry Clear</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
532 <td>Branch if carry flag is 1. Unsigned "greater or equal" when used with cmp</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
533 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
534 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
535 <td>8</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
536 <td>gr</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
537 <td>Greater</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
538 <td>Branch if carry flag is 0 and the zero flag is zero. Unsigned "greater" when used with cmp</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
539 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
540 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
541 <td>9</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
542 <td>le</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
543 <td>Less or Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
544 <td>Branch if carry flag is 1 or the zero flag is 1. Unsigned "lesser or equal" when used with cmp</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
545 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
546 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
547 Use of CC values greater than 9 will result in an invalid instruction exception.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
548 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
549 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
550 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
551 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
552
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
553 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
554 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
555 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
556 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
557 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
558 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
559 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
560 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
561 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
562 <td>CC</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
563 <td>Signed 8-bit offset. Offset is multiplied by two before being added to PC</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
564 <td>$E</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
565 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
566 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
567 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
568 <h4 id="mov">mov rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
569 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
570 Stores the value of rA in rD. This can be used as a return or jump instruction if rD is PC.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
571 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
572 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
573 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
574 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
575 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
576 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
577 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
578 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
579 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
580 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
581 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
582 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
583 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
584 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
585 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
586 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
587 <td>$0</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
588 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
589 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
590 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
591 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
592 <h4 id="neg">neg rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
593 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
594 Calculates the 2s complement of rA and stores it in rD. This can be used in combination with add to implement subtraction.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
595 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
596 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
597 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
598 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
599 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
600 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
601 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
602 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
603 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
604 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
605 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
606 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
607 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
608 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
609 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
610 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
611 <td>$1</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
612 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
613 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
614 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
615 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
616 <h4 id="not">not rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
617 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
618 Calculates the 1s complement of rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
619 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
620 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
621 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
622 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
623 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
624 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
625 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
626 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
627 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
628 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
629 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
630 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
631 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
632 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
633 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
634 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
635 <td>$2</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
636 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
637 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
638 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
639 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
640 <h4 id="cmp">cmp rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
641 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
642 Subtracts rA from rD and discards the result, but still updates flags.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
643 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
644 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
645 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
646 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
647 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
648 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
649 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
650 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
651 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
652 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
653 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
654 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
655 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
656 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
657 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
658 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
659 <td>$3</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
660 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
661 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
662 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
663 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
664 <h4 id="call">call rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
665 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
666 Stores the address of the next instruction in rD and sets PC to the value in rA. Used for calling subroutines.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
667 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
668 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
669 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
670 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
671 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
672 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
673 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
674 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
675 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
676 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
677 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
678 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
679 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
680 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
681 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
682 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
683 <td>$4</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
684 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
685 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
686 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
687 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
688 <h4 id="swap">swap rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
689 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
690 Swaps the values in rA and rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
691 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
692 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
693 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
694 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
695 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
696 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
697 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
698 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
699 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
700 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
701 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
702 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
703 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
704 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
705 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
706 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
707 <td>$5</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
708 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
709 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
710 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
711 </p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
712 <h4 id="longjmp">longjmp rA, rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
713 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
714 Sets PC to rA and PCH to the low 7-bits of rD
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
715 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
716 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
717 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
718 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
719 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
720 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
721 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
722 <h4 id="ini">ini IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
723 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
724 Reads a word from the IO port indicated by IM and stores it in rD. IM can range from 0 to 15.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
725 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
726 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
727 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
728 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
729 <h4 id="outi">outi</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
730 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
731 Writes the word stored in rD to the IO port indicated by IM. IM can range from 0 to 15.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
732 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
733 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
734 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
735 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
736 <h4 id="addi">addi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
737 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
738 Adds IM to the value in rD and stores the result in rD. IM range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
739 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
740 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
741 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
742 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
743 <h4 id="andi">andi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
744 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
745 Performs a bitwise and of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
746 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
747 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
748 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
749 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
750 <h4 id="ori">ori IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
751 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
752 Performs a bitwise or of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
753 </p>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
754 <h4 id="ori">xori IM, rD</h4>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
755 <p>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
756 Performs a bitwise exclusive or of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
757 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
758 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
759 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
760 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
761 <h4 id="lsli">lsli IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
762 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
763 Shifts the value in rD IM bits to the left. IM can range from 1 to 8.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
764 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
765 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
766 <strong>Flags:</strong> C = last bit shifted out of rA, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
767 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
768 <h4 id="lsri">lsri IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
769 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
770 Shifts the value in rD IM bits to the right. IM can range from 1 to 8.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
771 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
772 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
773 <strong>Flags:</strong> C = last bit shifted out of rA, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
774 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
775 <h4 id="cmpi">cmpi IM, rd</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
776 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
777 Subtracts IM from rD and discards the result, but updates flags. IM can range from -8 to 7.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
778 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
779 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
780 <strong>Flags:</strong> C = carry out of bit 15, N = result is negative, Z = result is zero
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
781 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
782 <h4 id="reti">reti rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
783 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
784 Sets rD to the value storeed in EUR, SR to the value stored in ESR and PC to the value stored in EPC. This instruction is used for returning from an
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
785 exception or interrupt.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
786 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
787 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
788 <strong>Flags:</strong> Updated corresponding to the value in ESR.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
789 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
790 <h4 id="trap">trap rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
791 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
792 Causes an exception to be taken to the vector indicated by rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
793 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
794 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
795 <strong>Flags:</strong> Condition code flags unchanged, interrupt enable bits cleared.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
796 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
797 <h4 id="trapi">trapi IM</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
798 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
799 Causes an exception to be taken to the vector indicated by IM
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
800 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
801 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
802 <strong>Flags:</strong> Condition code flags unchanged, interrupt enable bits cleared.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
803 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
804 <h4 id="getepc">getepc rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
805 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
806 Stores the value of EPC in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
807 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
808 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
809 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
810 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
811 <h4 id="setepc">setepc rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
812 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
813 Stores the vaule of rD in EPC.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
814 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
815 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
816 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
817 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
818 <h4 id="getesr">getesr rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
819 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
820 Stores the value of ESR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
821 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
822 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
823 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
824 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
825 <h4 id="setesr">setesr rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
826 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
827 Stores the value of rD in ESR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
828 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
829 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
830 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
831 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
832 <h4 id="geteur">geteur rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
833 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
834 Stores the value of EUR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
835 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
836 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
837 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
838 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
839 <h4 id="seteur">seteur rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
840 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
841 Stores the value of rd in EUR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
842 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
843 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
844 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
845 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
846 <h4 id="getenum">getenum rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
847 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
848 Stores the value of ENUM in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
849 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
850 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
851 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
852 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
853 <h4 id="setenum">setenum rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
854 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
855 Stores the value of rd in ENUM.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
856 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
857 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
858 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
859 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
860 <h4 id="getvbr">getvbr rD</h4>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
861 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
862 Stores the value of VBR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
863 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
864 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
865 <strong>Flags:</strong> No change
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
866 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
867 <h4 id="setvbr">setvbr rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
868 <p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
869 Stores the valueof rD in VBR.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
870 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
871 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
872 <strong>Flags:</strong> No change
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
873 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
874 <h2 id="video">Video</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
875 <h3 id="vidover">Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
876 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
877 Simple 16 features a tile-based video processor using 8x8 pixel tiles. It supports a single background plane with a fixed width of 64 tiles and configurable height.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
878 64 sprites can be displayed simultaneously and 20 can be displayed on each line. Each sprite can either be 8x8 or 16x16 pixels and can use either of the first two
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
879 16 color palettes. The background plane can make use of all 4 palettes.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
880 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
881 <h2 id="audio">Audio</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
882 <h3 id="audover">Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
883 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
884 Simple 16 has four square-wave tone generators with a 16-bit period and an 8-bit volume. The special value of 0 for the period causes the volume to be output constantly
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
885 allowing the volume register to be used as a simple 8-bit DAC.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
886 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
887 <h2 id="timer">Timer</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
888 <h3 id="timeover">Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
889 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
890 Simple 16 has a single timer with a 16-bit period. Interrupt 0 is triggered on timer expiration.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
891 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
892 <h2 id="controllers">Controllers</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
893 <h3 id="contover">Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
894 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
895 Simple 16 supports 2 controllers, each with a D-pad and 8 buttons configured in either an SNES (4 action buttons on the face + 2 shoulder buttons + Start and Select)
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
896 or Genesis 6-button controller (6 action buttons on the face + Start and Mode) arrangement. In this document, the buttons are given using the Genesis naming scheme.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
897 For a controller following the SNES layout, the right trigger is 'C', the left trigger is 'Z' and 'Select' is 'Mode'.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
898 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
899 <h2 id="serial">Serial Port</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
900 <h3>Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
901 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
902 This port can be thought of a simple UART for debugging purposes. In an emulator, a write should result in a byte being written to stdout and a read should return
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
903 a byte read from stdin. This peripheral can be omitted in which case writes should be ignored and reads should return $FFFF. The primary purpose of this port is
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
904 to enable easy debugging of the CPU core before other, more complicated, peripherals are working.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
905 <h2 id="cart">Cartridge</h2>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
906 <h3>Overview</h3>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
907 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
908 Simple 16 allows for 48KB of flat mapped cartridge ROM. Future revisions may allow banking.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
909 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
910 </body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
911 </html>