<?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>Kyle Brady:  Blog &#187; Inline Assembly</title>
	<atom:link href="http://www.kyle-brady.com/tag/inline-assembly/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kyle-brady.com</link>
	<description>coherent thoughts on diverse topics</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:37:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://www.kyle-brady.com/?pushpress=hub'/>
<cloud domain='www.kyle-brady.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>InlineAssembly in C &#91;Old Content&#93;</title>
		<link>http://www.kyle-brady.com/2009/05/26/inlineassembly-in-c/</link>
		<comments>http://www.kyle-brady.com/2009/05/26/inlineassembly-in-c/#comments</comments>
		<pubDate>Tue, 26 May 2009 16:40:01 +0000</pubDate>
		<dc:creator>Kyle Brady</dc:creator>
				<category><![CDATA[Old Content]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Full Code Release]]></category>
		<category><![CDATA[Inline Assembly]]></category>

		<guid isPermaLink="false">http://www.kyle-brady.com/?p=2631</guid>
		<description><![CDATA[The final homework project package for my CS47 class has been posted, albeit weeks after being due - I had some local SVN Client problems.

Essentially, we had to convert some C functions into their inline assembly counterparts.  See the PDF file for details.

All code is available via SVN, and a web-browsing utility.

Note:  I am not [...]]]></description>
			<content:encoded><![CDATA[The final homework project package for my CS47 class has been posted, albeit weeks after being due - I had some local SVN Client problems.<br />
<br />
Essentially, we had to convert some C functions into their inline assembly counterparts.  See <a href="http://projects.kyle-brady.com/svn/filedetails.php?repname=sjsuProjects&amp;path=%2Fcs47%2FInlineAssembly%2Ftrunk%2FProject+Description.pdf">the PDF file</a> for details.<br />
<br />
<a href="http://projects.kyle-brady.com/svn/listing.php?repname=sjsuProjects2&amp;path=%2Fcs47%2FInlineAssembly%2F#path_cs47_InlineAssembly">All code is available via SVN, and a web-browsing utility</a>.<br />
<br />
<em>Note:  I am not advocating using this code in place of doing your own homework, or in any situation other than pure interest.  However, in the event that you do, I am not responsible for any resultant issues (legal, moral, or ethical) that may arise.  Finally, I am not presenting these as perfect cases, the best way to approach the problems, nor the fastest.  They are, simply, viable solutions.</em>]]></content:encoded>
			<wfw:commentRss>http://www.kyle-brady.com/2009/05/26/inlineassembly-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>asmParser &#8211; A Lesson In Research &#91;Old Content&#93;</title>
		<link>http://www.kyle-brady.com/2009/05/07/asmparser-a-lesson-in-research/</link>
		<comments>http://www.kyle-brady.com/2009/05/07/asmparser-a-lesson-in-research/#comments</comments>
		<pubDate>Fri, 08 May 2009 01:42:00 +0000</pubDate>
		<dc:creator>Kyle Brady</dc:creator>
				<category><![CDATA[Old Content]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[CS47]]></category>
		<category><![CDATA[Inline Assembly]]></category>

		<guid isPermaLink="false">http://www.kyle-brady.com/?p=2191</guid>
		<description><![CDATA[In my CS47 class, we've just started working on using Inline Assembly (assembly code processing built into the gcc compiler), and I thought the way you do it is pretty ugly.  The assembly, which is put inside a C file, looks like this:
asm("command1\t\n","command2\t\n","command3\t\n");

Keep in mind that's wrapped inside a C file.  Assembly.  In a C [...]]]></description>
			<content:encoded><![CDATA[In my CS47 class, we've just started working on using Inline Assembly (assembly code processing built into <a href="http://en.wikipedia.org/wiki/GNU_Compiler_Collection">the gcc compiler</a>), and I thought the way you do it is pretty ugly.  The assembly, which is put inside a C file, looks like this:<br />
<p style="padding-left: 30px;"><code>asm("command1\t\n","command2\t\n","command3\t\n");</code></p><br />
<br />
Keep in mind that's wrapped inside a C file.  Assembly.  In a C file.<br />
<br />
Naturally, I thought there was probably a more clever way to do this - I knew that asm() wasn't a true function, that it was a compiler instruction, but I assumed that it would pretend to be like a function and accept a variable as an argument.<br />
<br />
Nope.<br />
<br />
But I didn't discover that I was wrong until I got weird errors while compiling:<br />
<pre style="padding-left: 30px;">gcc -S -masm=intel ./asmParser.c</pre><br />
<pre style="padding-left: 30px;">-&gt; error: argument of 'asm' is not a constant string</pre><br />
This is when I jumped onto #c on irc.freenode.net, and was essentially laughed at.  I guess that's what I get for trying to be clever... <em>too</em> clever.<br />
<br />
You can find <a href="http://www.kyle-brady.com/wp-content/uploads/2009/05/asmparser.c">the everything-works-but-the-asm()-part code here</a> with <a href="http://www.kyle-brady.com/wp-content/uploads/2009/05/examplecommands.txt">the exampleCommands file</a>, or <a href="http://www.kyle-brady.com/wp-content/uploads/2009/05/asmparser.zip">download everything as a zip file</a>.<br />
<br />
Next time I'm going to do a little more research!]]></content:encoded>
			<wfw:commentRss>http://www.kyle-brady.com/2009/05/07/asmparser-a-lesson-in-research/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
