<?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>Inspirated &#187; Emu8086 Hardware Interrupt Editor &amp; Generator</title>
	<atom:link href="http://inspirated.com/tag/emu8086-hardware-interrupt-editor-generator/feed" rel="self" type="application/rss+xml" />
	<link>http://inspirated.com</link>
	<description>krkhan&#039;s blog</description>
	<lastBuildDate>Thu, 05 Apr 2012 16:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Emu8086 Hardware Interrupt Editor &amp; Generator</title>
		<link>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator</link>
		<comments>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator#comments</comments>
		<pubDate>Mon, 05 Oct 2009 14:41:36 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[8086]]></category>
		<category><![CDATA[8088]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Emu8086]]></category>
		<category><![CDATA[Emu8086 Hardware Interrupt Editor & Generator]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Interrupt]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Vector]]></category>
		<category><![CDATA[x86]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=246</guid>
		<description><![CDATA[If there has been a closed-source software which I have enjoyed using at my university, it&#8217;s Emu8086. The shareware, as the name suggests, emulates the 8086 processor down to the minutest detail. Since 8086/8088 processors form a significant part of my Microprocessor Interfacing &#038; Programming course, I have grown rather fond of the software&#8217;s workings. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If there has been a closed-source software which I have enjoyed using at my university, it&#8217;s <a href="http://www.emu8086.com/">Emu8086</a>. The shareware, as the name suggests, emulates the 8086 processor down to the minutest detail. Since 8086/8088 processors form a significant part of my Microprocessor Interfacing &#038; Programming course, I have grown rather fond of the software&#8217;s workings.</p>
<p>Recently, I needed to generate hardware interrupts on the emulator. Not only that, but I wanted to use my own service routines for the interrupts so that I could try to understand what happens behind-the-scenes in such scenarios. Reading through the Emu8086 documentation, I figured out that two files are responsible for accomplishing the required tasks:</p>
<ol>
<li><code>INT_VECT</code>: A 1024-byte interrupt vector containing 256 entries, with each entry being a 4-byte <code>offset</code>:<code>segment</code> pair.</li>
<li><code>emu8086.hw</code>: A 256-byte file with each byte representing a corresponding interrupt. A non-zero byte signifies that particular interrupt being active. The byte is set to zero again after the interrupt is serviced.</li>
</ol>
<p>As manually editing these files became cumbersome, I had to code two PyGTK apps for editing these files in a pretty interface:</p>
<div style="text-align: center"><a href="http://inspirated.com/uploads/intvecteditor.zip">intvecteditor.py</a> &amp; <a href="http://inspirated.com/uploads/hwintgen.zip">hwintgen.py</a></div>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/emu8086int.png"><img src="http://inspirated.com/uploads/emu8086int-thumb.jpg" alt="Emu8086 Hardware Interrupt Editor &#038; Generator Screenshot" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The <code>intvecteditor.py</code> file lets the user load/edit/save an 8086 interrupt vector. Similarly, the <code>hwintgen.py</code> allows the user to load an <code>emu8086.hw</code> and then generate/monitor interrupts in it. The utilities require PyGTK to run, but I find it infinitely easier now to analyze interrupt behavior of the emulator. This also lead to an interesting observation, as the emulator checked for interrupts at the <em>beginning</em> of an instruction instead of at its <em>end</em> &#8212; something which didn&#8217;t confirm with the actual 8086 working model.</p>
<p><code>x86</code> is fun. After all,</p>
<blockquote><p>&ldquo;Do you program in assembly?&rdquo;<br />
&ldquo;<code>NOP</code>&rdquo;</p></blockquote>
<div class="shr-publisher-246"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator">Permalink</a> |
<a href="http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/8086" rel="tag">8086</a>, <a href="http://inspirated.com/tag/8088" rel="tag">8088</a>, <a href="http://inspirated.com/tag/assembly" rel="tag">Assembly</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/emu8086" rel="tag">Emu8086</a>, <a href="http://inspirated.com/tag/emu8086-hardware-interrupt-editor-generator" rel="tag">Emu8086 Hardware Interrupt Editor &amp; Generator</a>, <a href="http://inspirated.com/tag/intel" rel="tag">Intel</a>, <a href="http://inspirated.com/tag/interrupt" rel="tag">Interrupt</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/python" rel="tag">Python</a>, <a href="http://inspirated.com/tag/vector" rel="tag">Vector</a>, <a href="http://inspirated.com/tag/x86" rel="tag">x86</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/10/05/emu8086-hardware-interrupt-editor-generator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.503 seconds -->

