annotate simple16.html @ 49:5f30c4d18d79

Updated the HTML documentation a bit
author Michael Pavone <pavone@retrodev.com>
date Tue, 30 Aug 2016 22:04:29 -0700
parents 5338b9affd09
children
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>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
13 Simple 16 is a toy 16-bit video game console designed with simplicity of implementation in mind. The hope is that
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
14 Simple 16 is simple enough to provide an easy introduction for the novice emudev while still containing all the
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
15 essential features of an older game console and providing sufficient capabilities to support compelling games.
39
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
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
51 purpose registers dedicated to exception processing and an additional special register for holding the upper bits of the program counter.
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
52 It has a 23-bit addres space addressable with 16-bit offsets. Instructions are a fixed size and are also 16-bits.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
53 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54 <h3 id="cpuregs">Registers</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 <p>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
56 The first 12 registers in the main file have no fixed function and are named r0 through r11. r12 holds the upper 8-bits of the
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
57 upper and lower data segments and is also named db. r13 holds the stack pointer and is also named sp. r14 serves as the program
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
58 counter and points to the next instruction to be fetched. More information about instruction fetch and execution can be found in
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 <a href="#execution">Execution Details</a>. r15 serves as the status register. The status register contains bits corresponding
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
60 to the result of the last arithmetic instruction and the interrupt mask. It also contains the uppper 7-bits of the stack segment.
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
61 The layout of the status register is given below.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
65 <th>Bit</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
66 <th>Use</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
67 <th>Notes</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
68 <tr>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
69 <td>15</td>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 <td>Unused</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 <td>Should be set to zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
72 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 <tr>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
74 <td>14-8</td>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
75 <td>Stack Segment</td>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
76 <td>Bits 8-14 of the 23-bit address for stack-relative load and stores</td>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
77 </tr>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
78 <tr>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
79 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80 <td>Negative Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 <td>Indicates the last result was negative.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 <td>Carry Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 <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
87 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
89 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
90 <td>Zero fFag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
91 <td>Indicates the last result was zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
92 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
93 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
94 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
95 <td>Interrupt 1 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
96 <td>Interrupt 1 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100 <td>Interrupt 0 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
101 <td>Interrupt 0 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
102 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 <h3 id="instructions">Instructions</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
105 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106 <li><a href="#ldim">ldim IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 <li><a href="#ldimh">ldimh IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
108 <li><a href="#ld8">ld8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
109 <li><a href="#ld16">ld16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
110 <li><a href="#str8">str8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
111 <li><a href="#str16">str16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
112 <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
113 <li><a href="#adc">adc rA, rB, rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
114 <li><a href="#and">and rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
115 <li><a href="#or">or rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
116 <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
117 <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
118 <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
119 <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
120 <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
121 <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
122 <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
123 <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
124 <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
125 <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
126 <li><a href="#swap">swap rA, rD</a></li>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
127 <li><a href="#longjmp">longjmp</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
128 <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
129 <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
130 <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
131 <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
132 <li><a href="#ori">ori IM, rD</a></li>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
133 <li><a href="#xori">xori IM, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
134 <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
135 <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
136 <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
137 <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
138 <li><a href="#trapi">trapi IM</a></li>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
139 <li><a href="#push">push rD</a></li>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
140 <li><a href="#pop">pop rD</a></li>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
141 <li><a href="#getepc">getpch rD</a></li>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
142 <li><a href="#setepc">setpch 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
143 <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
144 <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
145 <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
146 <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
147 <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
148 <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
149 <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
150 <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
151 <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
152 <li><a href="#setvbr">setvbr rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
153 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
154 <h4 id="ldim">ldim IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
155 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
156 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
157 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
158 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
159 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
160 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
161 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
162 <strong>Encoding:</strong>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
165 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
166 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
167 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
168 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
169 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
170 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
171 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
172 <td>$0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
173 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
176 <h4 id="ldimh">lidmh IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
177 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
178 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
179 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
180 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
181 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
182 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
183 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
184 <strong>Encoding:</strong>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
187 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
188 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
189 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
190 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
191 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
192 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
193 <td>8-bit immediate value</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
194 <td>$1</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
195 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
198 <h4 id="ld8">ld8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
199 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
200 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
201 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
202 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
203 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
204 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
205 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
206 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
207 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
210 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
211 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
212 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
213 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
214 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
215 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
216 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
217 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
218 <td>$2</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
219 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
222 <h4 id="ld16">ld16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
223 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
224 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
225 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
226 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
227 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
228 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
229 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
230 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
231 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
234 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
235 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
236 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
237 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
238 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
239 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
240 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
241 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
242 <td>$3</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
243 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
246 <h4 id="str8">str8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
247 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
248 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
249 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
250 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
251 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
252 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
253 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
254 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
255 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
258 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
259 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
260 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
261 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
262 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
263 <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
264 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
265 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
266 <td>$4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
267 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
270 <h4 id="str16">str16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
271 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
272 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
273 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
274 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
275 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
276 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
277 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
278 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
279 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
282 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
283 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
284 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
285 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
286 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
287 <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
288 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
289 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
290 <td>$5</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
291 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
294 <h4 id="add">add rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
295 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
296 Adds rA and rB. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
297 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
298 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
299 <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
300 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
301 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
302 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
303 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
306 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
307 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
308 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
309 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
310 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
311 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
312 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
313 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
314 <td>$6</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
315 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
316 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
317 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
318 <h4 id="adc">adc rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
319 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
320 Adds rA, rB and the carry flag. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
321 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
322 <p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
323 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
324 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
327 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
328 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
329 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
330 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
331 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
332 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
333 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
334 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
335 <td>$7</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
336 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
337 </table>
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 <p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
340 <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
341 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
342 <h4 id="and">and rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
343 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
344 Bitwise and of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
345 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
346 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
347 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
348 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
349 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
350 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
351 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
354 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
355 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
356 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
357 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
358 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
359 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
360 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
361 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
362 <td>$8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
363 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
366 <h4 id="or">or rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
367 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
368 Bitwise or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
369 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
370 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
371 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
372 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
373 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
374 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
375 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
378 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
379 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
380 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
381 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
382 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
383 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
384 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
385 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
386 <td>$9</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
387 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
390 <h4 id="xor">xor rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
391 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
392 Bitwise exclusive or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
393 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
394 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
395 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
396 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
397 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
398 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
399 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
402 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
403 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
404 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
405 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
406 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
407 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
408 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
409 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
410 <td>$A</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
411 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
414 <h4 id="lsl">lsl rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
415 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
416 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
417 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
418 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
419 <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
420 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
421 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
422 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
423 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
426 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
427 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
428 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
429 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
430 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
431 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
432 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
433 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
434 <td>$B</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
435 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
438 <h4 id="lsr">lsr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
439 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
440 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
441 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
442 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
443 <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
444 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
445 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
446 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
447 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
450 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
451 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
452 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
453 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
454 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
455 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
456 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
457 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
458 <td>$C</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
459 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
460 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
461 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
462 <h4 id="asr">asr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
463 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
464 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
465 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
466 </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
467 <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
468 <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
469 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
470 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
471 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
472 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
475 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
476 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
477 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
478 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
479 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
480 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
481 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
482 <td>Source B register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
483 <td>$D</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
484 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
485 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
486 </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
487 <h4 id="bcc">bCC LABEL</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
488 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
489 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
490 124 instructions backwards. CC must be one of the following values
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
491 <table>
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 <th>CC</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
494 <th>Mnemonic</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
495 <th>Name</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
496 <th>Description</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
497 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
498 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
499 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
500 <td>ra</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
501 <td>bRanch Always</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
502 <td>Unconditionall branch</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
503 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
504 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
505 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
506 <td>rf</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
507 <td>bRanch False</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
508 <td>Effectively a nop</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
509 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
510 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
511 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
512 <td>eq</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
513 <td>EQual</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
514 <td>Branch if zero flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
515 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
516 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
517 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
518 <td>ne</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
519 <td>Not Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
520 <td>Branch if zero flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
521 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
522 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
523 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
524 <td>mi</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
525 <td>MInus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
526 <td>Branch if negative flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
527 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
528 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
529 <td>5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
530 <td>pl</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
531 <td>PLus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
532 <td>Branch if negative flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
533 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
534 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
535 <td>6</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
536 <td>cs</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
537 <td>Carry Set</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
538 <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
539 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
540 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
541 <td>7</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
542 <td>cc</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
543 <td>Carry Clear</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
544 <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
545 </tr>
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 <td>8</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
548 <td>gr</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
549 <td>Greater</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
550 <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
551 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
552 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
553 <td>9</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
554 <td>le</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
555 <td>Less or Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
556 <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
557 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
558 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
559 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
560 </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
561 <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
562 <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
563 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
564
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
565 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
566 <strong>Encoding:</strong>
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 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
569 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
570 <th>11-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
571 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
572 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
573 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
574 <td>CC</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
575 <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
576 <td>$E</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
577 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
580 <h4 id="mov">mov rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
581 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
582 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
583 </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
584 <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
585 <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
586 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
587 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
588 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
589 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
592 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
593 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
594 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
595 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
596 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
597 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
598 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
599 <td>$0</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
600 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
601 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
604 <h4 id="neg">neg rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
605 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
606 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
607 </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
608 <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
609 <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
610 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
611 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
612 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
613 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
616 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
617 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
618 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
619 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
620 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
621 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
622 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
623 <td>$1</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
624 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
625 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
628 <h4 id="not">not rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
629 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
630 Calculates the 1s complement of rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
631 </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
632 <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
633 <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
634 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
635 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
636 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
637 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
640 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
641 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
642 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
643 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
644 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
645 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
646 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
647 <td>$2</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
648 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
649 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
652 <h4 id="cmp">cmp rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
653 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
654 Subtracts rA from rD and discards the result, but still updates flags.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
655 </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
656 <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
657 <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
658 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
659 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
660 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
661 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
664 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
665 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
666 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
667 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
668 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
669 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
670 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
671 <td>$3</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
672 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
673 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
676 <h4 id="call">call rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
677 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
678 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
679 </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
680 <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
681 <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
682 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
683 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
684 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
685 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
688 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
689 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
690 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
691 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
692 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
693 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
694 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
695 <td>$4</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
696 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
697 </tr>
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 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
700 <h4 id="swap">swap rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
701 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
702 Swaps the values in rA and rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
703 </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
704 <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
705 <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
706 </p>
42
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
707 <p>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
708 <strong>Encoding:</strong>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
709 <table>
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 <th>15-12</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
712 <th>11-8</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
713 <th>7-4</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
714 <th>3-0</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
715 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
716 <tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
717 <td>Destination register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
718 <td>Source A register</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
719 <td>$5</td>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
720 <td>$F</th>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
721 </tr>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
722 </table>
a64e11e48a41 Added encoding for a bunch of instructions
Michael Pavone <pavone@retrodev.com>
parents: 40
diff changeset
723 </p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
724 <h4 id="longjmp">longjmp rA, rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
725 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
726 Sets PC to rA and PCH to the low 7-bits of rD
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
727 </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
728 <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
729 <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
730 </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
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="ini">ini IM, rD</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 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
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="outi">outi</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 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
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> 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
747 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
748 <h4 id="addi">addi 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 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
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 = 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
754 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
755 <h4 id="andi">andi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
756 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
757 Performs a bitwise and of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
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="ori">ori IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
763 <p>
45
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
764 Performs a bitwise or of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
765 </p>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
766 <h4 id="ori">xori IM, rD</h4>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
767 <p>
5338b9affd09 Updated HTML documentation to reflect CPU changes
Michael Pavone <pavone@retrodev.com>
parents: 42
diff changeset
768 Performs a bitwise exclusive or of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
769 </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
770 <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
771 <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
772 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
773 <h4 id="lsli">lsli IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
774 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
775 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
776 </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
777 <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
778 <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
779 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
780 <h4 id="lsri">lsri IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
781 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
782 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
783 </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
784 <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
785 <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
786 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
787 <h4 id="cmpi">cmpi IM, rd</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
788 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
789 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
790 </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
791 <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
792 <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
793 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
794 <h4 id="reti">reti rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
795 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
796 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
797 exception or interrupt.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
798 </p>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
799 <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
800 <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
801 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
802 <h4 id="trapi">trapi IM</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
803 <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
804 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
805 </p>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
806 <h4 id="push">push rD</h4>
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
807 <p>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
808 Pushes the value in register rD onto the stack.
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
809 </p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
810 <p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
811 <strong>Flags:</strong> Condition code flags unchanged.
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
812 </p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
813 <hr id="pop">pop rD</h4>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
814 <p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
815 Pops a value of the stack and stores it in rD
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
816 </p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
817 <p>
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
818 <strong>Flags:</strong> Condition code flags unchanged.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
819 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
820 <h4 id="getepc">getepc rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
821 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
822 Stores the value of EPC in rD.
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 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
825 <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
826 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
827 <h4 id="setepc">setepc rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
828 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
829 Stores the vaule of rD in EPC.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
830 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
831 <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
832 <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
833 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
834 <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
835 <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
836 Stores the value of ESR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
837 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
838 <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
839 <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
840 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
841 <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
842 <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
843 Stores the value of rD in ESR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
844 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
845 <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
846 <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
847 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
848 <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
849 <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
850 Stores the value of EUR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
851 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
852 <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
853 <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
854 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
855 <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
856 <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
857 Stores the value of rd in EUR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
858 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
859 <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
860 <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
861 </p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
862 <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
863 <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
864 Stores the value of ENUM in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
865 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
866 <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
867 <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
868 </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
869 <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
870 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
871 Stores the value of rd in ENUM.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
872 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
873 <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
874 <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
875 </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
876 <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
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 Stores the value of VBR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
879 </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
880 <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
881 <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
882 </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
883 <h4 id="setvbr">setvbr rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
884 <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
885 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
886 </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
887 <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
888 <strong>Flags:</strong> No change
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
889 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
890 <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
891 <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
892 <p>
49
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
893 Simple 16 features a simple linear framebuffer using indexed color. There is 128KB of VRAM arranged as two 64KB framebuffers. At any given time one buffer is used for
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
894 display and the other is accessible to the CPU. Both 4bpp and 8bpp depths are available. The resolution of the display is fixed at 320x240, but up to 31 lines can be
5f30c4d18d79 Updated the HTML documentation a bit
Michael Pavone <pavone@retrodev.com>
parents: 45
diff changeset
895 blanked at the top and bottom of the display to save on VRAM usage or to implement a letterbox effect.
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
896 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
897 <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
898 <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
899 <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
900 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
901 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
902 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
903 <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
904 <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
905 <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
906 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
907 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
908 <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
909 <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
910 <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
911 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
912 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
913 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
914 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
915 <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
916 <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
917 <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
918 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
919 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
920 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
921 <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
922 <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
923 <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
924 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
925 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
926 </body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
927 </html>