annotate simple16.html @ 42:a64e11e48a41

Added encoding for a bunch of instructions
author Michael Pavone <pavone@retrodev.com>
date Mon, 11 Apr 2016 23:35:51 -0700
parents 413e7b9c0db1
children 5338b9affd09
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>
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
119 <li><a href="#in">in 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
120 <li><a href="#out">out 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
121 <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
122 <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
123 <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
124 <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
125 <li><a href="#ori">ori 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
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="#trap">trap 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
131 <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
132 <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
133 <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
134 <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
135 <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
136 <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
137 <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
138 <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
139 <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
140 <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
141 <li><a href="#setvbr">setvbr rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143 <h4 id="ldim">ldim IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
144 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
145 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
146 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
147 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
148 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
149 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
150 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
151 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
152 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
153 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
154 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
155 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
156 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
159 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
160 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
161 <td>$0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
162 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
163 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
164 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165 <h4 id="ldimh">lidmh IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
166 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
167 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
168 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
169 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
170 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
171 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
172 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
173 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
174 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
175 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
176 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
177 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
178 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
181 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
182 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
183 <td>$1</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
184 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
185 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
186 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
187 <h4 id="ld8">ld8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
188 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
189 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
190 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
191 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
192 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
193 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
194 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
195 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
196 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
197 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
198 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
199 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
200 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
201 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
204 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
205 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
206 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
207 <td>$2</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
208 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
209 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
210 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
211 <h4 id="ld16">ld16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
212 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
213 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
214 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
215 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
216 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
217 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
218 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
219 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
220 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
221 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
222 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
223 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
224 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
225 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
228 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
229 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
230 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
231 <td>$3</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
232 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
233 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
234 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
235 <h4 id="str8">str8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
236 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
237 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
238 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
239 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
240 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
241 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
242 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
243 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
244 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
245 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
246 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
247 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
248 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
249 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
252 <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
253 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
254 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
255 <td>$4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
256 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
257 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
258 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
259 <h4 id="str16">str16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
260 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
261 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
262 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
263 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
264 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
265 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
266 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
267 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
268 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
269 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
270 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
271 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
272 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
273 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
276 <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
277 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
278 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
279 <td>$5</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
280 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
281 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
282 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
283 <h4 id="add">add rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
284 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
285 Adds rA and rB. The result is stored in rD.
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 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
288 <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
289 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
290 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
291 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
292 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
293 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
294 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
295 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
296 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
297 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
300 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
301 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
302 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
303 <td>$6</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
304 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
305 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
306 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
307 <h4 id="adc">adc rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
308 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
309 Adds rA, rB and the carry flag. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
310 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
311 <p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
312 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
313 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
314 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
315 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
316 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
317 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
318 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
321 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
322 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
323 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
324 <td>$7</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
325 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
326 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
327 </p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
328 <p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
329 <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
330 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
331 <h4 id="and">and rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
332 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
333 Bitwise and of rA and rB is stored in rD.
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 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
336 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
337 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
338 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
339 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
340 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
341 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
342 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
343 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
344 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
345 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
348 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
349 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
350 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
351 <td>$8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
352 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
353 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
354 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
355 <h4 id="or">or rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
356 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
357 Bitwise or of rA and rB is stored in rD.
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 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
360 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
361 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
362 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
363 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
364 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
365 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
366 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
367 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
368 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
369 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
372 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
373 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
374 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
375 <td>$9</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
376 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
377 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
378 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
379 <h4 id="xor">xor rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
380 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
381 Bitwise exclusive or of rA and rB is stored in rD.
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 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
384 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
385 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
386 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
387 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
388 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
389 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
390 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
391 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
392 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
393 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
396 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
397 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
398 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
399 <td>$A</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
400 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
401 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
402 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
403 <h4 id="lsl">lsl rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
404 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
405 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
406 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
407 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
408 <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
409 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
410 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
411 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
412 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
413 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
414 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
415 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
416 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
417 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
420 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
421 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
422 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
423 <td>$B</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
424 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
425 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
426 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
427 <h4 id="lsr">lsr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
428 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
429 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
430 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
431 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
432 <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
433 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
434 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
435 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
436 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
437 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
438 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
439 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
440 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
441 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
444 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
445 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
446 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
447 <td>$C</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
448 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
449 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
450 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
451 <h4 id="asr">asr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
452 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
453 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
454 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
455 </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
456 <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
457 <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
458 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
459 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
460 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
461 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
462 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
463 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
464 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
465 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
466 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
469 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
470 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
471 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
472 <td>$D</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
473 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
474 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
475 </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
476 <h4 id="bcc">bCC LABEL</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
477 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
478 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
479 124 instructions backwards. CC must be one of the following values
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
480 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
481 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
482 <th>CC</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
483 <th>Mnemonic</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
484 <th>Name</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
485 <th>Description</th>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
488 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
489 <td>ra</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
490 <td>bRanch Always</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
491 <td>Unconditionall branch</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
494 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
495 <td>rf</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
496 <td>bRanch False</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
497 <td>Effectively a nop</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
500 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
501 <td>eq</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
502 <td>EQual</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
503 <td>Branch if zero flag is 1</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
506 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
507 <td>ne</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
508 <td>Not Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
509 <td>Branch if zero flag is 0</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
512 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
513 <td>mi</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
514 <td>MInus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
515 <td>Branch if negative flag is 1</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
518 <td>5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
519 <td>pl</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
520 <td>PLus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
521 <td>Branch if negative flag is 0</td>
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 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
524 <td>6</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
525 <td>cs</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
526 <td>Carry Set</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
527 <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
528 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
529 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
530 <td>7</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
531 <td>cc</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
532 <td>Carry Clear</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
533 <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
534 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
535 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
536 <td>8</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
537 <td>gr</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
538 <td>Greater</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
539 <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
540 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
541 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
542 <td>9</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
543 <td>le</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
544 <td>Less or Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
545 <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
546 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
547 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
548 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
549 </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
550 <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
551 <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
552 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
553
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
554 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
555 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
556 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
557 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
558 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
559 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
560 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
563 <td>CC</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
564 <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
565 <td>$E</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
566 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
567 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
568 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
569 <h4 id="mov">mov rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
570 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
571 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
572 </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
573 <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
574 <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
575 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
576 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
577 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
578 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
579 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
580 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
581 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
582 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
583 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
586 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
587 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
588 <td>$0</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
589 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
590 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
591 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
592 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
593 <h4 id="neg">neg rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
594 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
595 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
596 </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
597 <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
598 <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
599 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
600 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
601 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
602 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
603 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
604 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
605 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
606 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
607 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
610 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
611 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
612 <td>$1</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
613 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
614 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
615 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
616 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
617 <h4 id="not">not rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
618 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
619 Calculates the 1s complement of rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
620 </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
621 <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
622 <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
623 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
624 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
625 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
626 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
627 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
628 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
629 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
630 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
631 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
634 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
635 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
636 <td>$2</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
637 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
638 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
639 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
640 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
641 <h4 id="cmp">cmp rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
642 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
643 Subtracts rA from rD and discards the result, but still updates flags.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
644 </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
645 <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
646 <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
647 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
648 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
649 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
650 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
651 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
652 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
653 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
654 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
655 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
658 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
659 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
660 <td>$3</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
661 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
662 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
663 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
664 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
665 <h4 id="call">call rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
666 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
667 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
668 </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
669 <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
670 <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
671 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
672 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
673 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
674 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
675 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
676 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
677 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
678 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
679 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
682 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
683 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
684 <td>$4</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
685 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
686 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
687 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
688 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
689 <h4 id="swap">swap rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
690 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
691 Swaps the values in rA and rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
692 </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
693 <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
694 <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
695 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
696 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
697 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
698 <table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
699 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
700 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
701 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
702 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
703 <th>3-0</th>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
706 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
707 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
708 <td>$5</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
709 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
710 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
711 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
712 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
713 <h4 id="in">in rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
714 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
715 Reads a word from the IO port indicated by rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
716 </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
717 <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
718 <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
719 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
720 <h4 id="out">out rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
721 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
722 Writes the word stored in rD to the IO port indicated by rA.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
723 </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
724 <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
725 <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
726 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
727 <h4 id="ini">ini IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
728 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
729 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
730 </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
731 <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
732 <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
733 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
734 <h4 id="outi">outi</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
735 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
736 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
737 </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
738 <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
739 <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
740 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
741 <h4 id="addi">addi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
742 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
743 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
744 </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
745 <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
746 <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
747 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
748 <h4 id="andi">andi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
749 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
750 Performs a logical 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.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
751 </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
752 <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
753 <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
754 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
755 <h4 id="ori">ori IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
756 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
757 Performs a logical 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.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
758 </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
759 <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
760 <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
761 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
762 <h4 id="lsli">lsli IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
763 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
764 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
765 </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
766 <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
767 <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
768 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
769 <h4 id="lsri">lsri IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
770 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
771 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
772 </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
773 <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
774 <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
775 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
776 <h4 id="cmpi">cmpi IM, rd</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
777 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
778 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
779 </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
780 <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
781 <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
782 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
783 <h4 id="reti">reti rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
784 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
785 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
786 exception or interrupt.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
787 </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
788 <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
789 <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
790 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
791 <h4 id="trap">trap rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
792 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
793 Causes an exception to be taken to the vector indicated by rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
794 </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
795 <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
796 <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
797 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
798 <h4 id="trapi">trapi IM</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
799 <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
800 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
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 <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
803 <strong>Flags:</strong> Condition code flags unchanged, interrupt enable bits cleared.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
804 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
805 <h4 id="getepc">getepc rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
806 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
807 Stores the value of EPC in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
808 </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
809 <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
810 <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
811 </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
812 <h4 id="setepc">setepc rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
813 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
814 Stores the vaule of rD in EPC.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
815 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
816 <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
817 <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
818 </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
819 <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
820 <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
821 Stores the value of ESR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
822 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
823 <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
824 <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
825 </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
826 <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
827 <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
828 Stores the value of rD in ESR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
829 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
830 <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
831 <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
832 </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
833 <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
834 <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
835 Stores the value of EUR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
836 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
837 <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
838 <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
839 </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
840 <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
841 <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
842 Stores the value of rd in EUR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
843 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
844 <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
845 <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
846 </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
847 <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
848 <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
849 Stores the value of ENUM in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
850 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
851 <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
852 <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
853 </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
854 <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
855 <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
856 Stores the value of rd in ENUM.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
857 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
858 <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
859 <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
860 </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
861 <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
862 <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
863 Stores the value of VBR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
864 </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
865 <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
866 <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
867 </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
868 <h4 id="setvbr">setvbr rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
869 <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
870 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
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 <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
873 <strong>Flags:</strong> No change
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
874 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
875 <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
876 <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
877 <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
878 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
879 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
880 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
881 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
882 <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
883 <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
884 <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
885 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
886 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
887 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
888 <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
889 <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
890 <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
891 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
892 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
893 <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
894 <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
895 <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
896 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
897 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
898 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
899 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
900 <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
901 <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
902 <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
903 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
904 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
905 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
906 <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
907 <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
908 <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
909 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
910 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
911 </body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
912 </html>