annotate simple16.html @ 40:413e7b9c0db1

Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
author Michael Pavone <pavone@retrodev.com>
date Thu, 07 Apr 2016 21:58:27 -0700
parents 52d601e13ea4
children a64e11e48a41
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 <!doctype html>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 <html>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3 <head>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
4 <style>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
5 body {
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
6 font-family: Helvetica, Arial, sans-serif;
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
7 }
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
8 </style>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
9 </head>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
10 <body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
11 <h1>Simple 16</h1>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
12 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 Simple 16 is a toy 16-bit video game console designed with simplicity of implementation in mind. While it is technically a 16-bit system,
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 it's capabilites are in many ways closer to an 8-bit system. Ultimately, the hope is that Simple 16 is simple enough to provide an easy
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
15 introduction for the novice emudev while still containing all the essential features of an older game console.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
16
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
17 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18 <h2>Table of Contents</h2>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
20 <li><a href="#cpu">CPU</a>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
21 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
22 <li><a href="#cpuover">Overview</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
23 <li><a href="#cpuregs">Registers</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
24 <li><a href="#instructions">Instructions</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
25 <li><a href="#execution">Execution Details</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
26 <li><a href="#interrupts">Exceptions and Interrupts</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
27 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
28 </li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
29 <li><a href="#video">Video</a>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
30 <ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
31 <li><a href="#vidover">Overview</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
32 <li><a href="#vidregs">IO Ports</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
33 <li><a href="#vidmem">Memory Map</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
34 <li><a href="#vidrender">Rendering</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
35 </ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
36 </li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
37 <li><a href="#audio">Audio</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
38 <ul>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
39 <li><a href="#audover">Overview</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
40 <li><a href="#audregs">IO Ports</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
41 </ul>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
42 <li><a href="#timer">Timer</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
43 <li><a href="#controllers">Controllers</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
44 <li><a href="#serial">Serial Port</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
45 <li><a href="#cart">Cartridge</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
46 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
47 <h2 id="cpu">CPU</h2>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
48 <h3 id="cpuover">Overview</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
49 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
50 The Simple 16 CPU is a 16-bit RISC design. It has a main register file of 16 16-bit registers. Additionally, there are five special
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
51 purpose registers dedicated to exception processing. It has a flag 16-bit addres space. Instructions are a fixed size and are also 16-bits.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
52 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
53 <h3 id="cpuregs">Registers</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
54 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
55 The first 14 registers in the main file have no fixed function and are named r0 through r13. r14 serves as the program counter and
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
56 points to the next instruction to be fetched. More information about instruction fetch and execution can be found in
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
57 <a href="#execution">Execution Details</a>. r15 serves as the status register. The status register contains bits corresponding
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
58 to the result of the last arithmetic instruction and the interrupt mask. The layout of the status register is given below.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
59 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
60 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
61 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
62 <th>Bit</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
63 <th>Use</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
64 <th>Notes</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
65 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
66 <td>15-5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
67 <td>Unused</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
68 <td>Should be set to zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
69 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
70 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
71 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
72 <td>Negative Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
73 <td>Indicates the last result was negative.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
74 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
75 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
76 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
77 <td>Carry Flag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
78 <td>Generally indicates a carry out of bit 15. Last bit shifted out for shift instructions.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
79 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
80 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
81 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
82 <td>Zero fFag</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
83 <td>Indicates the last result was zero.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
84 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
85 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
86 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
87 <td>Interrupt 1 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
88 <td>Interrupt 1 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
89 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
90 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
91 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
92 <td>Interrupt 0 enable</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
93 <td>Interrupt 0 can be taken when this bit is set.</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
94 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
95 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
96 <h3 id="instructions">Instructions</h3>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
97 <ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
98 <li><a href="#ldim">ldim IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
99 <li><a href="#ldimh">ldimh IM, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
100 <li><a href="#ld8">ld8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
101 <li><a href="#ld16">ld16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
102 <li><a href="#str8">str8 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
103 <li><a href="#str16">str16 rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
104 <li><a href="#add">add rA, rB, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
105 <li><a href="#adc">adc rA, rB, rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
106 <li><a href="#and">and rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
107 <li><a href="#or">or rA, rB, rD</a></li>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
108 <li><a href="#xor">xor rA, rB, rD</a></li>
40
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
109 <li><a href="#lsl">lsl rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
110 <li><a href="#lsr">lsr rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
111 <li><a href="#asr">asr rA, rB, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
112 <li><a href="#bcc">bCC LABEL</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
113 <li><a href="#mov">mov rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
114 <li><a href="#neg">neg rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
115 <li><a href="#not">not rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
116 <li><a href="#cmp">cmp rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
117 <li><a href="#call">call rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
118 <li><a href="#swap">swap rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
119 <li><a href="#in">in rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
120 <li><a href="#out">out rA, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
121 <li><a href="#ini">ini IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
122 <li><a href="#outi">outi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
123 <li><a href="#addi">addi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
124 <li><a href="#andi">andi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
125 <li><a href="#ori">ori IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
126 <li><a href="#lsli">lsli IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
127 <li><a href="#lsri">lsri IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
128 <li><a href="#cmpi">cmpi IM, rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
129 <li><a href="#reti">reti rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
130 <li><a href="#trap">trap rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
131 <li><a href="#trapi">trapi IM</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
132 <li><a href="#getepc">getepc rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
133 <li><a href="#setepc">setepc rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
134 <li><a href="#getesr">getesr rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
135 <li><a href="#setesr">setser rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
136 <li><a href="#geteur">geteur rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
137 <li><a href="#seteur">seteur rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
138 <li><a href="#getenum">getenum rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
139 <li><a href="#setenum">setenum rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
140 <li><a href="#getvbr">getvbr rD</a></li>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
141 <li><a href="#setvbr">setvbr rD</a></li>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
142 </ul>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
143 <h4 id="ldim">ldim IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
144 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
145 ldim sign extends an 8-bit immediate value to 16-bits and assigns it to the designated register.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
146 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
147 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
148 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
149 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
150 <h4 id="ldimh">lidmh IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
151 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
152 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
153 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
154 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
155 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
156 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
157 <h4 id="ld8">ld8 rA, rB, rD</h4>
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 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
160 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
161 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
162 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
163 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
164 <h4 id="ld16">ld16 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
165 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
166 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
167 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
168 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
169 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
170 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
171 <h4 id="str8">str8 rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
172 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
173 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
174 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
175 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
176 <strong>Flags:</strong> No change
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 <h4 id="str16">str16 rA, rB, rD</h4>
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 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
181 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
182 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
183 <strong>Flags:</strong> No change
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
184 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
185 <h4 id="add">add rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
186 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
187 Adds rA and rB. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
188 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
189 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
190 <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
191 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
192 <h4 id="adc">adc rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
193 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
194 Adds rA, rB and the carry flag. The result is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
195 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
196 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
197 <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
198 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
199 <h4 id="and">and rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
200 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
201 Bitwise and of rA and rB is stored in rD.
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 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
204 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
205 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
206 <h4 id="or">or rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
207 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
208 Bitwise or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
209 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
210 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
211 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
212 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
213 <h4 id="xor">xor rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
214 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
215 Bitwise exclusive or of rA and rB is stored in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
216 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
217 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
218 <strong>Flags:</strong> C = unmodified, N = result is negative, Z = result is zero
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
219 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
220 <h4 id="lsl">lsl rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
221 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
222 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
223 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
224 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
225 <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
226 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
227 <h4 id="lsr">lsr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
228 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
229 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
230 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
231 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
232 <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
233 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
234 <h4 id="asr">asr rA, rB, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
235 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
236 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
237 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
238 </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
239 <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
240 <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
241 </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
242 <h4 id="bcc">bCC LABEL</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
243 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
244 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
245 124 instructions backwards. CC must be one of the following values
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
246 <table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
247 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
248 <th>CC</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
249 <th>Mnemonic</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
250 <th>Name</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
251 <th>Description</th>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
252 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
253 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
254 <td>0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
255 <td>ra</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
256 <td>bRanch Always</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
257 <td>Unconditionall branch</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
258 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
259 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
260 <td>1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
261 <td>rf</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
262 <td>bRanch False</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
263 <td>Effectively a nop</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
264 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
265 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
266 <td>2</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
267 <td>eq</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
268 <td>EQual</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
269 <td>Branch if zero flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
270 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
271 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
272 <td>3</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
273 <td>ne</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
274 <td>Not Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
275 <td>Branch if zero flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
276 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
277 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
278 <td>4</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
279 <td>mi</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
280 <td>MInus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
281 <td>Branch if negative flag is 1</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
282 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
283 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
284 <td>5</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
285 <td>pl</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
286 <td>PLus</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
287 <td>Branch if negative flag is 0</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
288 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
289 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
290 <td>6</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
291 <td>cs</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
292 <td>Carry Set</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
293 <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
294 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
295 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
296 <td>7</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
297 <td>cc</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
298 <td>Carry Clear</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
299 <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
300 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
301 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
302 <td>8</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
303 <td>gr</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
304 <td>Greater</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
305 <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
306 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
307 <tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
308 <td>9</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
309 <td>le</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
310 <td>Less or Equal</td>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
311 <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
312 </tr>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
313 </table>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
314 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
315 </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
316 <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
317 <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
318 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
319 <h4 id="mov">mov rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
320 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
321 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
322 </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
323 <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
324 <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
325 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
326 <h4 id="neg">neg rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
327 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
328 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
329 </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
330 <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
331 <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
332 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
333 <h4 id="not">not rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
334 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
335 Calculates the 1s complement of rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
336 </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
337 <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
338 <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
339 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
340 <h4 id="cmp">cmp rA, rD</h4>
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 Subtracts rA from rD and discards the result, but still updates flags.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
343 </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
344 <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
345 <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
346 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
347 <h4 id="call">call rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
348 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
349 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
350 </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
351 <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
352 <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
353 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
354 <h4 id="swap">swap rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
355 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
356 Swaps the values in rA and rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
357 </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
358 <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
359 <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
360 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
361 <h4 id="in">in rA, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
362 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
363 Reads a word from the IO port indicated by rA and stores it in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
364 </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
365 <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
366 <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
367 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
368 <h4 id="out">out rA, rD</h4>
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 Writes the word stored in rD to the IO port indicated by rA.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
371 </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
372 <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
373 <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
374 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
375 <h4 id="ini">ini IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
376 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
377 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
378 </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
379 <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
380 <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
381 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
382 <h4 id="outi">outi</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
383 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
384 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
385 </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
386 <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
387 <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
388 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
389 <h4 id="addi">addi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
390 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
391 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
392 </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
393 <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
394 <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
395 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
396 <h4 id="andi">andi IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
397 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
398 Performs a logical and of IM and the value in rD and stores the result in rD. IM can range from -8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
399 </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
400 <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
401 <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
402 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
403 <h4 id="ori">ori IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
404 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
405 Performs a logical or of IM and the value in rD and stores the result in rD. IM can range from-8 to -1 or 1 to 8. A value of 0 is used to indicate 8.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
406 </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
407 <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
408 <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
409 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
410 <h4 id="lsli">lsli IM, rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
411 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
412 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
413 </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
414 <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
415 <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
416 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
417 <h4 id="lsri">lsri IM, rD</h4>
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 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
420 </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
421 <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
422 <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
423 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
424 <h4 id="cmpi">cmpi IM, rd</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
425 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
426 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
427 </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
428 <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
429 <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
430 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
431 <h4 id="reti">reti rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
432 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
433 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
434 exception or interrupt.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
435 </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
436 <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
437 <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
438 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
439 <h4 id="trap">trap rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
440 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
441 Causes an exception to be taken to the vector indicated by rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
442 </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
443 <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
444 <strong>Flags:</strong> Condition code flags unchanged, interrupt enable bits cleared.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
445 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
446 <h4 id="trapi">trapi IM</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
447 <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
448 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
449 </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
450 <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
451 <strong>Flags:</strong> Condition code flags unchanged, interrupt enable bits cleared.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
452 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
453 <h4 id="getepc">getepc rD</h4>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
454 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
455 Stores the value of EPC in rD.
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
456 </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
457 <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
458 <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
459 </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
460 <h4 id="setepc">setepc rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
461 <p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
462 Stores the vaule of rD in EPC.
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 <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
465 <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
466 </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
467 <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
468 <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
469 Stores the value of ESR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
470 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
471 <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
472 <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
473 </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
474 <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
475 <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
476 Stores the value of rD in ESR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
477 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
478 <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
479 <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
480 </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
481 <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
482 <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
483 Stores the value of EUR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
484 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
485 <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
486 <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
487 </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
488 <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
489 <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
490 Stores the value of rd in EUR.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
491 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
492 <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
493 <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
494 </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
495 <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
496 <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
497 Stores the value of ENUM in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
498 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
499 <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
500 <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
501 </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
502 <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
503 <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
504 Stores the value of rd in ENUM.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
505 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
506 <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
507 <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
508 </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
509 <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
510 <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
511 Stores the value of VBR in rD.
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
512 </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
513 <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
514 <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
515 </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
516 <h4 id="setvbr">setvbr rD</h4>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
517 <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
518 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
519 </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
520 <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
521 <strong>Flags:</strong> No change
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
522 </p>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
523 <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
524 <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
525 <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
526 Simple 16 features a tile-based video processor using 8x8 pixel tiles. It supports a single background plane with a fixed width of 64 tiles and configurable height.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
527 64 sprites can be displayed simultaneously and 20 can be displayed on each line. Each sprite can either be 8x8 or 16x16 pixels and can use either of the first two
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
528 16 color palettes. The background plane can make use of all 4 palettes.
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
529 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
530 <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
531 <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
532 <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
533 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
534 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
535 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
536 <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
537 <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
538 <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
539 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
540 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
541 <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
542 <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
543 <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
544 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
545 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
546 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
547 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
548 <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
549 <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
550 <p>
413e7b9c0db1 Added flag change documentation for all instructions. Added hyperlinks to individual instructions. Added overviews for all the peripherals
Michael Pavone <pavone@retrodev.com>
parents: 39
diff changeset
551 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
552 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
553 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
554 <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
555 <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
556 <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
557 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
558 </p>
39
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
559 </body>
52d601e13ea4 WIP documentation
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
560 </html>