<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Beginner Micro &#187; asm</title>
	<atom:link href="http://beginnermicro.com/tag/asm/feed/" rel="self" type="application/rss+xml" />
	<link>http://beginnermicro.com</link>
	<description></description>
	<lastBuildDate>Mon, 17 May 2010 15:32:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>12 Bit PIC Instruction Set</title>
		<link>http://beginnermicro.com/blog/12-bit-pic-instruction-set/</link>
		<comments>http://beginnermicro.com/blog/12-bit-pic-instruction-set/#comments</comments>
		<pubDate>Thu, 21 May 2009 16:32:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[instruction set]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://beginnermicro.com/?p=324</guid>
		<description><![CDATA[Here's the instruction set for Microchip's Baseline devices.  These include the PIC10 series as well as some of the PIC12 and PIC16.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the instruction set for Microchip&#8217;s Baseline devices.  These include the PIC10 series as well as some of the PIC12 and PIC16.</p>
<table border="1">
<tbody>
<tr>
<th>Opcode (binary)</th>
<th>Mnemonic</th>
<th>Description</th>
</tr>
<tr>
<td><code>0000 0000 0000</code></td>
<td>NOP</td>
<td>No operation</td>
</tr>
<tr>
<td><code>0000 0000 0010</code></td>
<td>OPTION</td>
<td>Load OPTION register with contents of W</td>
</tr>
<tr>
<td><code>0000 0000 0011</code></td>
<td>SLEEP</td>
<td>Go into standby mode</td>
</tr>
<tr>
<td><code>0000 0000 0100</code></td>
<td>CLRWDT</td>
<td>Reset watchdog timer</td>
</tr>
<tr>
<td><code>0000 0000 01ff</code></td>
<td>TRIS f</td>
<td>Move W to port control register (f=1..3)</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td><code>0000 001 fffff</code></td>
<td>MOVWF f</td>
<td>Move W to f</td>
</tr>
<tr>
<td><code>0000 010 xxxxx</code></td>
<td>CLRW</td>
<td>Clear W to 0 (a.k.a CLR x,W)</td>
</tr>
<tr>
<td><code>0000 011 fffff</code></td>
<td>CLRF f</td>
<td>Clear f to 0 (a.k.a. CLR f,F)</td>
</tr>
<tr>
<td><code>0000 10d fffff</code></td>
<td>SUBWF f,d</td>
<td>Subtract W from f (d = f − W)</td>
</tr>
<tr>
<td><code>0000 11d fffff</code></td>
<td>DECF f,d</td>
<td>Decrement f (d = f − 1)</td>
</tr>
<tr>
<td><code>0001 00d fffff</code></td>
<td>IORWF f,d</td>
<td>Inclusive OR W with F (d = f OR W)</td>
</tr>
<tr>
<td><code>0001 01d fffff</code></td>
<td>ANDWF f,d</td>
<td>AND W with F (d = f AND W)</td>
</tr>
<tr>
<td><code>0001 10d fffff</code></td>
<td>XORWF f,d</td>
<td>Exclusive OR W with F (d = f XOR W)</td>
</tr>
<tr>
<td><code>0001 11d fffff</code></td>
<td>ADDWF f,d</td>
<td>Add W with F (d = f + W)</td>
</tr>
<tr>
<td><code>0010 00d fffff</code></td>
<td>MOVF f,d</td>
<td>Move F (d = f)</td>
</tr>
<tr>
<td><code>0010 01d fffff</code></td>
<td>COMF f,d</td>
<td>Complement f (d = NOT f)</td>
</tr>
<tr>
<td><code>0010 10d fffff</code></td>
<td>INCF f,d</td>
<td>Increment f (d = f + 1)</td>
</tr>
<tr>
<td><code>0010 11d fffff</code></td>
<td>DECFSZ f,d</td>
<td>Decrement f (d = f − 1) and skip if zero</td>
</tr>
<tr>
<td><code>0011 00d fffff</code></td>
<td>RRF f,d</td>
<td>Rotate right F (rotate right through carry)</td>
</tr>
<tr>
<td><code>0011 01d fffff</code></td>
<td>RLF f,d</td>
<td>Rotate left F (rotate left through carry)</td>
</tr>
<tr>
<td><code>0011 10d fffff</code></td>
<td>SWAPF f,d</td>
<td>Swap 4-bit halves of f (d = f&lt;&lt;4 | f&gt;&gt;4)</td>
</tr>
<tr>
<td><code>0011 11d fffff</code></td>
<td>INCFSZ f,d</td>
<td>Increment f (d = f + 1) and skip if zero</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td><code>0100 bbb fffff</code></td>
<td>BCF f,b</td>
<td>Bit clear f (Clear bit b of f)</td>
</tr>
<tr>
<td><code>0101 bbb fffff</code></td>
<td>BSF f,b</td>
<td>Bit set f (Set bit b of f)</td>
</tr>
<tr>
<td><code>0110 bbb fffff</code></td>
<td>BTFSC f,b</td>
<td>Bit test f, skip if clear (Test bit b of f)</td>
</tr>
<tr>
<td><code>0111 bbb fffff</code></td>
<td>BTFSS f,b</td>
<td>Bit test f, skip if set (Test bit b of f)</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td><code>1000 kkkkkkkk</code></td>
<td>RETLW k</td>
<td>Set W to k and return</td>
</tr>
<tr>
<td><code>1001 kkkkkkkk</code></td>
<td>CALL k</td>
<td>Save return address, load PC with k</td>
</tr>
<tr>
<td><code>101 kkkkkkkkk</code></td>
<td>GOTO k</td>
<td>Jump to address k (9 bits!)</td>
</tr>
<tr>
<td><code>1100 kkkkkkkk</code></td>
<td>MOVLW k</td>
<td>Move literal to W (W = k)</td>
</tr>
<tr>
<td><code>1101 kkkkkkkk</code></td>
<td>IORLW k</td>
<td>Inclusive or literal with W (W = k OR W)</td>
</tr>
<tr>
<td><code>1110 kkkkkkkk</code></td>
<td>ANDLW k</td>
<td>AND literal with W (W = k AND W)</td>
</tr>
<tr>
<td><code>1111 kkkkkkkk</code></td>
<td>XORLW k</td>
<td>Exclusive or literal with W (W = k XOR W)</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://beginnermicro.com/blog/12-bit-pic-instruction-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

