<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4420879528119778008</id><updated>2011-09-10T18:06:02.303-04:00</updated><category term='toolkit'/><category term='linux'/><category term='mq'/><category term='centos'/><category term='standard'/><category term='ibm'/><category term='wmbt'/><category term='websphere'/><category term='Broker'/><category term='c++0x'/><category term='Local'/><category term='Windows'/><category term='g++'/><category term='Domain'/><category term='service'/><category term='user'/><category term='WMB'/><title type='text'>Craig St. Jean's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-4942584046471788842</id><published>2011-09-10T17:22:00.005-04:00</published><updated>2011-09-10T18:06:02.331-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='service'/><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='user'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='standard'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><title type='text'>WebSphere 8 on Windows as Standard User</title><content type='html'>While I doubt this is supported usage, I had a goal of using &lt;a href="http://www.myeclipseide.com/bling/"&gt;MyEclipse Bling&lt;/a&gt; (MyEclipse Blue combined with MyEclipse for Spring), along with IBM WebSphere Application Server v8 on Windows 7 as a &lt;b&gt;standard&lt;/b&gt; user.&lt;br /&gt;&lt;br /&gt;Here's what I did:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install WebSphere 8 and MyEclipse Bling&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Grant users full control of the AppServer directory&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create a WebSphere profile however you prefer&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Open the command prompt as an admin to create a service for the profile&lt;/li&gt;&lt;br /&gt;&lt;li&gt;'cd' to your WAS home bin (e.x. cd C:\IBM\WebSphere\AppServer\bin)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;WASService.exe -add AppSrv01 -serverName server1 -profilePath C:\IBM\WebSphere\AppServer\profiles\AppSrv01 -startType manual &lt;i&gt;(replace AppSrv01 and the profile path with yours of course)&lt;/li&gt;&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Download &lt;a href="http://helgeklein.com/setacl/"&gt;SetACL&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Open Services, right click your WAS service and click properties. In Path to executable copy the actual name of the service (e.x. "IBMWAS80Service - AppSrv01")&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the command prompt: SetACL.exe -on "IBMWAS80Service - AppSrv01" -ot srv -actn ace -ace "n:S-1-1-0;p:full;s:y;i:np;m:grant;w:dacl"&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The n: part you define the SID of the user you want to grant access.  S-1-1-0 is the SID for everyone.&lt;br /&gt;&lt;br /&gt;At this point, WAS starts just fine when a standard user starts it via services management, however by using WASService -start (which MyEclipse Blue uses) it still does not work.  Update soon when I figure it out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-4942584046471788842?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/4942584046471788842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2011/09/websphere-8-on-windows-as-standard-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/4942584046471788842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/4942584046471788842'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2011/09/websphere-8-on-windows-as-standard-user.html' title='WebSphere 8 on Windows as Standard User'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-7903107291008620577</id><published>2011-06-11T09:19:00.014-04:00</published><updated>2011-06-11T14:41:55.436-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++0x'/><category scheme='http://www.blogger.com/atom/ns#' term='g++'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><title type='text'>Compiling g++ for C++0x on CentOS</title><content type='html'>CentOS 5 (I don't recall the minor version I am using) includes g++ 4.1, however you cannot do C++0x development without g++ 4.4 or higher.  Here's what I did:&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Dependencies&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;First download the dependencies gmp-5.0.2, mpfr-3.0.1, mpc-0.9, ppl-0.11.2, cloog-ppl-0.15.11 (see http://gcc.gnu.org/install/prerequisites.html)&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;gmp&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;./configure --enable-cxx&lt;br /&gt;make&lt;br /&gt;make check&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;mpfr&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;./configure --with-gmp=/usr/local&lt;br /&gt;make&lt;br /&gt;make check&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;mpc&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;./configure --with-gmp=/usr/local&lt;br /&gt;make&lt;br /&gt;make check&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;ppl&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;./configure --with-gmp=/usr/local&lt;br /&gt;make&lt;br /&gt;make check&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;Grab some coffe, food, go for a stroll, etc. during make, this one takes a while (or at least it does in a VM)&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;cloog-ppl&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;./configure --with-gmp=/usr/local --with-ppl=/usr/local&lt;br /&gt;make&lt;br /&gt;make check&lt;br /&gt;sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;gcc&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;Download gcc (I used gcc-4.5.3), gcc-core, and g++&lt;br /&gt;&lt;br /&gt;Then from the PARENT directory of where you extracted gcc:&lt;br /&gt;&lt;pre style="overflow: auto;overflow-x: auto;white-space: pre-wrap;white-space: -moz-pre-wrap !important;word-wrap: break-word;"&gt;mkdir gccbuild&lt;br /&gt;cd gccbuild&lt;br /&gt;export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH&lt;br /&gt;../gcc-4.5.3/configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local&lt;br /&gt;make -j 2&lt;br /&gt;# go to sleep&lt;br /&gt;make check&lt;br /&gt;make install&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-7903107291008620577?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/7903107291008620577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2011/06/compiling-g-for-c0x-on-centos.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/7903107291008620577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/7903107291008620577'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2011/06/compiling-g-for-c0x-on-centos.html' title='Compiling g++ for C++0x on CentOS'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-1696730310950626996</id><published>2011-06-06T15:03:00.002-04:00</published><updated>2011-06-06T15:06:27.359-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WMB'/><category scheme='http://www.blogger.com/atom/ns#' term='Domain'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Local'/><category scheme='http://www.blogger.com/atom/ns#' term='Broker'/><title type='text'>Local WebSphere Message Broker Maintenance on Windows Domain</title><content type='html'>As a follow-up to &lt;a href="http://craigstjean.blogspot.com/2011/03/local-websphere-message-broker-install.html"&gt;http://craigstjean.blogspot.com/2011/03/local-websphere-message-broker-install.html&lt;/a&gt;, here are some maintenance tips:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After changing your domain password:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Change your local Windows user password to be the same&lt;/li&gt;&lt;li&gt;Open the ODBC Control Panel and update your user in the System DSN&lt;/li&gt;&lt;li&gt;Open the Broker Command Console and type:&lt;br /&gt;mqsichangebroker &lt;broker name=""&gt; -i &lt;user name=""&gt; -a &lt;password&gt; -p &lt;password&gt;&lt;/password&gt;&lt;/password&gt;&lt;/user&gt;&lt;/broker&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-1696730310950626996?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/1696730310950626996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2011/06/local-websphere-message-broker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/1696730310950626996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/1696730310950626996'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2011/06/local-websphere-message-broker.html' title='Local WebSphere Message Broker Maintenance on Windows Domain'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-243682952107808566</id><published>2011-03-12T20:22:00.008-05:00</published><updated>2011-03-13T21:27:18.261-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WMB'/><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='mq'/><category scheme='http://www.blogger.com/atom/ns#' term='toolkit'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><category scheme='http://www.blogger.com/atom/ns#' term='wmbt'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><title type='text'>Getting Started with WebSphere MQ 7 Broker 7 on Linux</title><content type='html'>I was interested in evaluating what it was like working with MQ7 and Broker 7, so I setup a Linux VM (CentOS 5, x64).  My goal was to run MQ, Broker, and the Toolkit all locally.&lt;br /&gt;&lt;br /&gt;Note: Not all of this is perfect or maybe even ideal, its just what I did.  CentOS is not a supported distribution for these products.  I know more about MQ6 and Broker 6.1 than 7.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Before I Started&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Installed DB2 Express&lt;/li&gt;&lt;li&gt;yum install compat-libstdc++-33 (MQ needs this)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installing MQ7&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download MQ7 Trial and extract it&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./mqlicense.sh -accept (after reading it of course)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesRuntime-7.0.1-3.x86_64.rpm MQSeriesServer-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesClient-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesSDK-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesJava-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesEclipseSDK33-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Update /opt/mqm/eclipseSDK33/eclipse/eclipse.ini add -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/firefox-3.6&lt;/li&gt;&lt;br /&gt;&lt;li&gt;rpm -ivh MQSeriesConfig-7.0.1-3.x86_64.rpm&lt;/li&gt;&lt;br /&gt;&lt;li&gt;usermod -a -G mqm craig (replace craig with your username)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;usermod -a -G mqm root&lt;/li&gt;&lt;br /&gt;&lt;li&gt;usermod -a -G mqm mqm (for some reason the mqm user didn't have the group)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installing Message Broker&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download and extract the WMB Trial&lt;/li&gt;&lt;br /&gt;&lt;li&gt;groupadd mqbrkrs&lt;/li&gt;&lt;br /&gt;&lt;li&gt;usermod -a -G mqbrkrs craig&lt;/li&gt;&lt;br /&gt;&lt;li&gt;usermod -a -G mqbrkrs root&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./setuplinuxx64 -console&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Mostly just enter 1s or 0s until complete&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installing WMB Toolkit&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download and extract the WMB Toolkit Trial&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the IBMInstallationManager directory...&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./install -nosplash --launcher.suppressErrors -input mbtoolkit-silent.xml -silent&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create Broker&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Since I'm going to do things the easy way instead of the &lt;b&gt;right&lt;/b&gt; way (I'm doing everything as root instead of running under mqm), need to reboot here&lt;/li&gt;&lt;br /&gt;&lt;li&gt;. /opt/ibm/mqsi/7.0/bin/mqsiprofile (notice the ". " at start)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;cd /opt/mqm/bin&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./crtmqm -u DLQ ESBBKL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./strmqm ESBBKL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;./runmqlsr -m ESBBKL -t TCP &amp;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsicreatebroker ESBBKLBKR -i craig -a &amp;lt;password&amp;gt; -q ESBBKL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsichangebroker ESBBKLBKR -i craig -a &amp;lt;password&amp;gt; -P 1414&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsistart ESBBKLBKR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsichangeproperties ESBBKLBKR -b httplistener -o HTTPListener -n startListener -v true&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsistop ESBBKLBKR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsistart ESBBKLBKR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;mqsicreateexecutiongroup ESBBKLBKR -e default&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Working in the Toolkit&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the Brokers view, connect to remote queue ESBBKL at localhost.localdomain port 1414&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I know that ideally I could right click Brokers and create a new local broker instead of doing a lot of the above, but obviously something up there threw it off.  Furthermore, you can't use localhost because it tells you to use a local broker.&lt;br /&gt;&lt;br /&gt;NOTE: When I went through and did this again to verify I didn't miss any steps, the toolkit already had my local broker in it.  You probably won't need to add it, however if it is not in the list, do the above.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create Local Queues&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create file with the following contents&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;DEFINE QLOCAL ('REQ.MB.TEST_FLOW') +&lt;br /&gt;     REPLACE&lt;br /&gt;&lt;br /&gt;DEFINE QLOCAL ('RESP.MB.TEST_FLOW') +&lt;br /&gt;     REPLACE&lt;br /&gt;&lt;br /&gt;DEFINE QLOCAL ('DLQ') +&lt;br /&gt;     REPLACE&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;runmqsc ESBBKL &amp;lt; queuedefs.conf&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create flows, more queues, have fun!&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-243682952107808566?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/243682952107808566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2011/03/getting-started-with-websphere-mq-7.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/243682952107808566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/243682952107808566'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2011/03/getting-started-with-websphere-mq-7.html' title='Getting Started with WebSphere MQ 7 Broker 7 on Linux'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-2723819479003228362</id><published>2011-03-08T12:29:00.004-05:00</published><updated>2011-03-08T13:13:46.900-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WMB'/><category scheme='http://www.blogger.com/atom/ns#' term='Domain'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Local'/><category scheme='http://www.blogger.com/atom/ns#' term='Broker'/><title type='text'>Local WebSphere Message Broker Install on Windows Domain</title><content type='html'>After having a lot of difficulty setting up a local WMQ and WMB install on my domain account, here is what I did:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install MQ and its fixpacks&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Install WMB runtime and its fixpacks&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Install the Broker Toolkit&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Created a local Windows user with the same username/password as my domain user&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Add user to mqbrkrs and mqm groups&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Install latest DB2 Express&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start the broker command console&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;pre&gt;MQSI 6.1.0.5&lt;br /&gt;C:\IBM\MQSI\6.1&lt;br /&gt;Start broker Command Console&lt;br /&gt;&lt;br /&gt;C:\IBM\MQSI\6.1&gt;cd c:\IBM\WMQ\bin&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;crtmqm.exe -u DLQ ESBBKL&lt;br /&gt;WebSphere MQ queue manager created.&lt;br /&gt;Creating or replacing default objects for ESBBKL.&lt;br /&gt;Default objects statistics : 43 created. 0 replaced. 0 failed.&lt;br /&gt;Completing setup.&lt;br /&gt;Setup completed.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;strmqm ESBBKL&lt;br /&gt;WebSphere MQ queue manager 'ESBBKL' starting.&lt;br /&gt;5 log records accessed on queue manager 'ESBBKL' during the log replay phase.&lt;br /&gt;Log replay for queue manager 'ESBBKL' complete.&lt;br /&gt;Transaction manager state recovered for queue manager 'ESBBKL'.&lt;br /&gt;WebSphere MQ queue manager 'ESBBKL' started.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;call mqsicreatedb ESBBKLDB -e DB2&lt;br /&gt;BIP9809I: Creating DB2 Database 'ESBBKLDB', this may take a while.&lt;br /&gt;BIP9825I: Creating the ODBC Data Source name 'ESBBKLDB'.&lt;br /&gt;BIP9817I: The DB2 database engine was used to create the 'ESBBKLDB' database.&lt;br /&gt;&lt;br /&gt;BIP8071I: Successful command completion.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;call mqsicreateconfigmgr ESBBKL_CFGMGR -i &amp;lt;USERNAME&amp;gt; -a &amp;lt;PASSWORD&amp;gt; -q ESBBKL&lt;br /&gt;AMQ8110: WebSphere MQ queue manager already exists.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;BIP8071I: Successful command completion.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;call mqsicreatebroker ESBBKLBKR -i &amp;lt;USERNAME&amp;gt; -a &amp;lt;PASSWORD&amp;gt; -q ESBBKL -n ESBBKLDB&lt;br /&gt;AMQ8110: WebSphere MQ queue manager already exis&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;The setmqaut command completed successfully.&lt;br /&gt;BIP8071I: Successful command completion.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;call mqsistart ESBBKL_CFGMGR&lt;br /&gt;BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.&lt;br /&gt;&lt;br /&gt;c:\IBM\WMQ\bin&gt;call mqsistart ESBBKLBKR&lt;br /&gt;BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Open MQ Explorer&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create new queue named DLQ in ESBBKL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create new TCP Listener (I used port 1414, the default)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the toolkit, add new Domain Connection to ESBBKL port 1414 on localhost&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Connect to the new Domain&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Add new broker reference to the topology, ESBBKLBKR on ESBBKL&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Enjoy!&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Note: if you want to delete and start over, do NOT delete the database first.  If you do, call mqsicreatedb again, then use mqsichangebroker and set your username and password again.&lt;br /&gt;&lt;br /&gt;The steps I follow to delete are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Start broker command console and cd c:\IBM\WMQ\bin&lt;/li&gt;&lt;br /&gt;&lt;li&gt;call mqsistop ESBBKLBKR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;call mqsideletebroker ESBBKLBKR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;call mqsistop ESBBKL_CFGMGR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;call mqsideleteconfigmgr -w -q ESBBKL_CFGMGR&lt;/li&gt;&lt;br /&gt;&lt;li&gt;call mqsideletedb -d DeleteAllDatabases&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-2723819479003228362?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/2723819479003228362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2011/03/local-websphere-message-broker-install.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/2723819479003228362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/2723819479003228362'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2011/03/local-websphere-message-broker-install.html' title='Local WebSphere Message Broker Install on Windows Domain'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-6788319979069845529</id><published>2009-05-31T08:49:00.001-04:00</published><updated>2009-05-31T08:49:35.613-04:00</updated><title type='text'>Seattle's Best: French Roast Coffee</title><content type='html'>&lt;ol&gt;&lt;li&gt;Buy it&lt;/li&gt;&lt;li&gt;Drink it&lt;/li&gt;&lt;li&gt;Repeat&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-6788319979069845529?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/6788319979069845529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2009/05/seattles-best-french-roast-coffee.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/6788319979069845529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/6788319979069845529'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2009/05/seattles-best-french-roast-coffee.html' title='Seattle&apos;s Best: French Roast Coffee'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-8893771858462330104</id><published>2009-04-01T19:24:00.005-04:00</published><updated>2009-04-01T19:41:27.347-04:00</updated><title type='text'>Problems installing DB2 on Windows Vista</title><content type='html'>Installed DB2 Express on Windows Vista (Business 64-bit) yesterday, and hit a bunch of errors at the end of the install.&lt;br /&gt;&lt;br /&gt;Specifically:&lt;br /&gt;&lt;ul style="line-height:12pt"&gt;&lt;br /&gt;&lt;li&gt;An error occurred while initializing the Profile Registry.&lt;br /&gt;&lt;br /&gt;The return value is "-2079391743". Contact your technical service&lt;br /&gt;representative.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;An error occurred while setting the registry key "SOFTWARE\Microsoft&lt;br /&gt;\MSDTC\XADLL\C:\Program Files\IBM\SQLLIB\BIN\DB2APP.DLL" to "C:&lt;br /&gt;\Program Files\IBM\SQLLIB\BIN\DB2APP.DLL".&lt;/li&gt;&lt;br /&gt;&lt;li&gt;One or more errors occurred while committing the changes to the&lt;br /&gt;user "DB2". Create or make any changes to this user manually.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;An error occurred while creating the instance "DB2". The return&lt;br /&gt;code is "-1918". Create the instance manually using the command&lt;br /&gt;"db2icrt".&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;So after some research, here is how to fix it:&lt;br /&gt;&lt;br /&gt;&lt;ul style="line-height:12pt"&gt;&lt;br /&gt;&lt;li&gt;Create DAS user (for example db2admin) via Windows as an Administrator&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Execute "db2admin CREATE /USER:db2admin /PASSWORD:*password*"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Execute "db2admin SETID db2admin"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Execute "db2icrt -u db2admin DB2" (where DB2 is the instance name)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set System Environment Variable "DB2INSTANCE" to your instance name&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set System Environment Variable "DB2PATH" to "C:\Program Files\IBM\SQLLIB"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Reboot your machine&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Follow http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.qb.server.doc/doc/t0011930.html to add yourself to DB2ADMNS&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Execute "db2set db2comm=tcpip"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Start your DB2 instance&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-8893771858462330104?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/8893771858462330104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2009/04/problems-installing-db2-on-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/8893771858462330104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/8893771858462330104'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2009/04/problems-installing-db2-on-windows.html' title='Problems installing DB2 on Windows Vista'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-8243690195147550057</id><published>2009-03-29T20:54:00.003-04:00</published><updated>2009-03-29T21:03:59.572-04:00</updated><title type='text'>Firebird on Glassfish</title><content type='html'>Ok, so after a few hours of "pulling my hair out" (I don't actually have any...), I've finally managed to get Glassfish to work with Firebird.&lt;br /&gt;&lt;br /&gt;Configuration:&lt;br /&gt;Firebird 2.1.1(.17910-0_Win32 Classic)&lt;br /&gt;Jaybird JDBC Driver 2.1.6 (JDK 1.6)&lt;br /&gt;Sun GlassFish Enterprise Server 2.1&lt;br /&gt;&lt;br /&gt;How-to:&lt;br /&gt;0.  Stop your domain&lt;br /&gt;1.  Copy jaybird-2.1.6.jar and jaybird-pool-2.1.6.jar into your domain's lib&lt;br /&gt;Do NOT put the JARs into ext like I did.  It ended up being the biggest source of pain in trying to get this to work.&lt;br /&gt;2.  Start your domain&lt;br /&gt;3.  Log into the admin console&lt;br /&gt;4.  Select Resources-&gt;JDBC-&gt;Connection Pools -&gt; New&lt;br /&gt;5.  Enter a name and select javax.sql.ConnectionPoolDataSource resource type (leave vendor blank) and click Next&lt;br /&gt;6.  Enter 'org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource' for Datasource Classname&lt;br /&gt;7.  Enter the following additional properties (note, I am using UTF-8, you may need to change your charSet and encoding (or just omit them))&lt;br /&gt;charSet = UTF-8&lt;br /&gt;encoding = UNICODE_FSS&lt;br /&gt;userName = XXX&lt;br /&gt;password = XXX&lt;br /&gt;database = localhost:C:/Databases/DATABASE.FDB&lt;br /&gt;databaseName = localhost:C:/Databases/DATABASE.FDB&lt;br /&gt;(Yes, databaseName is deprecated in Jaybird, however the connection pool datasource won't work without it)&lt;br /&gt;8.  Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-8243690195147550057?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/8243690195147550057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2009/03/firebird-on-glassfish.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/8243690195147550057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/8243690195147550057'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2009/03/firebird-on-glassfish.html' title='Firebird on Glassfish'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4420879528119778008.post-17584065967684118</id><published>2009-01-19T23:40:00.002-05:00</published><updated>2009-01-19T23:50:57.418-05:00</updated><title type='text'>Fun with assembler (on FreeBSD)</title><content type='html'>Searching is the heart of artificial intelligence, but what do you do when the core of your algorithms is much larger than it should be? Optimize!&lt;br /&gt;&lt;br /&gt;Take this code for example&lt;br /&gt;&lt;br /&gt;&lt;PRE style="line-height:10px"&gt;#&lt;B&gt;&lt;FONT COLOR="#5F9EA0"&gt;include&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#BC8F8F"&gt;&amp;lt;assert.h&amp;gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;#&lt;B&gt;&lt;FONT COLOR="#5F9EA0"&gt;include&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#BC8F8F"&gt;&amp;lt;string.h&amp;gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;br /&gt;#&lt;B&gt;&lt;FONT COLOR="#5F9EA0"&gt;define&lt;/FONT&gt;&lt;/B&gt; &lt;FONT COLOR="#B8860B"&gt;NUM_NODES&lt;/FONT&gt; 10&lt;br /&gt;#&lt;B&gt;&lt;FONT COLOR="#5F9EA0"&gt;define&lt;/FONT&gt;&lt;/B&gt; &lt;FONT COLOR="#B8860B"&gt;MAX_STACK&lt;/FONT&gt; 10&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; adjMatrix[NUM_NODES][NUM_NODES];&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; visited[NUM_NODES];&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; stack[MAX_STACK];&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; stack_index;&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;initAdjMatrix&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt;)&lt;br /&gt;{&lt;br /&gt; memset((&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; *)adjMatrix, 0, &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sizeof&lt;/FONT&gt;&lt;/B&gt;(adjMatrix));&lt;br /&gt; memset((&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; *)visited, 0, &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sizeof&lt;/FONT&gt;&lt;/B&gt;(visited));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;makeEdge&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; from, &lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; to)&lt;br /&gt;{&lt;br /&gt; assert(from &amp;lt; NUM_NODES);&lt;br /&gt; assert(to &amp;lt; NUM_NODES);&lt;br /&gt;&lt;br /&gt; adjMatrix[from][to] = 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;initStack&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt;)&lt;br /&gt;{&lt;br /&gt; stack_index = 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;push&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; elem)&lt;br /&gt;{&lt;br /&gt; assert(stack_index &amp;lt; MAX_STACK);&lt;br /&gt; stack[stack_index++] = elem;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;pop&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt;)&lt;br /&gt;{&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; elem;&lt;br /&gt; assert(stack_index &amp;gt; 0);&lt;br /&gt; elem = stack[--stack_index];&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;return&lt;/FONT&gt;&lt;/B&gt; elem;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;empty&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt;)&lt;br /&gt;{&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;if&lt;/FONT&gt;&lt;/B&gt; (stack_index == 0)&lt;br /&gt;  &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;return&lt;/FONT&gt;&lt;/B&gt; 1;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;return&lt;/FONT&gt;&lt;/B&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;void&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;dfs&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; start, &lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; goal)&lt;br /&gt;{&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; node, i;&lt;br /&gt;&lt;br /&gt; push(start);&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;while&lt;/FONT&gt;&lt;/B&gt; (!empty())&lt;br /&gt; {&lt;br /&gt;  node = pop();&lt;br /&gt;&lt;br /&gt;  &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;if&lt;/FONT&gt;&lt;/B&gt; (node == goal)&lt;br /&gt;  {&lt;br /&gt;   printf(&lt;B&gt;&lt;FONT COLOR="#BC8F8F"&gt;&amp;quot;%d Goal\n&amp;quot;&lt;/FONT&gt;&lt;/B&gt;, node);&lt;br /&gt;   &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;return&lt;/FONT&gt;&lt;/B&gt;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;if&lt;/FONT&gt;&lt;/B&gt; (visited[node])&lt;br /&gt;   &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;continue&lt;/FONT&gt;&lt;/B&gt;;&lt;br /&gt;  &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;else&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;   visited[node] = 1;&lt;br /&gt;&lt;br /&gt;  printf(&lt;B&gt;&lt;FONT COLOR="#BC8F8F"&gt;&amp;quot;%d &amp;quot;&lt;/FONT&gt;&lt;/B&gt;, node);&lt;br /&gt;&lt;br /&gt;  &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;for&lt;/FONT&gt;&lt;/B&gt; (i = NUM_NODES - 1; i &amp;gt; -1; i--)&lt;br /&gt;   &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;if&lt;/FONT&gt;&lt;/B&gt; (adjMatrix[node][i] == 1)&lt;br /&gt;    push(i);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; printf(&lt;B&gt;&lt;FONT COLOR="#BC8F8F"&gt;&amp;quot;Goal not found!\n&amp;quot;&lt;/FONT&gt;&lt;/B&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;main&lt;/FONT&gt;&lt;/B&gt;(&lt;B&gt;&lt;FONT COLOR="#228B22"&gt;int&lt;/FONT&gt;&lt;/B&gt; argc, &lt;B&gt;&lt;FONT COLOR="#228B22"&gt;char&lt;/FONT&gt;&lt;/B&gt; *argv[])&lt;br /&gt;{&lt;br /&gt; initAdjMatrix();&lt;br /&gt; initStack();&lt;br /&gt;&lt;br /&gt; &lt;I&gt;&lt;FONT COLOR="#B22222"&gt;//make our graph&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt; makeEdge(1, 2);&lt;br /&gt; makeEdge(1, 3);&lt;br /&gt; makeEdge(1, 4);&lt;br /&gt; makeEdge(2, 5);&lt;br /&gt; makeEdge(3, 5);&lt;br /&gt; makeEdge(3, 6);&lt;br /&gt; makeEdge(4, 7);&lt;br /&gt; makeEdge(5, 8);&lt;br /&gt; makeEdge(5, 9);&lt;br /&gt;&lt;br /&gt; dfs(1, 6);&lt;br /&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;return&lt;/FONT&gt;&lt;/B&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;/PRE&gt;&lt;br /&gt;(Slightly modified version of the depth first search from "AI Application Programming" Second Edition by M. Tim Jones)&lt;br /&gt;&lt;br /&gt;Lets run that through gcc:&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ gcc -o dfs dfs.c&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ ls -l dfs&lt;br /&gt;-rwxr-xr-x  1 craig  wheel  6029 Aug 18 22:53 dfs&lt;br /&gt;&lt;/pre&gt;6029 bytes!!!&lt;br /&gt;&lt;br /&gt;Ok, lets tell gcc to optimize it:&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ gcc -O3 dfs.c -o dfs&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ ls -l dfs&lt;br /&gt;-rwxr-xr-x  1 craig  wheel  6274 Aug 18 22:54 dfs&lt;br /&gt;&lt;/pre&gt;Horray for sacraficing space for speed... I want both though!&lt;br /&gt;&lt;br /&gt;Lets take a look at the code sections just out of curiosity&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;Sections:&lt;br /&gt;Idx Name          Size      VMA       LMA       File off  Algn&lt;br /&gt;  0 .interp       00000015  080480d4  080480d4  000000d4  2**0&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt;  1 .hash         00000098  080480ec  080480ec  000000ec  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt;  2 .dynsym       00000130  08048184  08048184  00000184  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt;  3 .dynstr       000000cb  080482b4  080482b4  000002b4  2**0&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt;  4 .rel.plt      00000030  08048380  08048380  00000380  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt;  5 .init         00000011  080483b0  080483b0  000003b0  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, CODE&lt;br /&gt;  6 .plt          00000070  080483c4  080483c4  000003c4  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, CODE&lt;br /&gt;  7 .text         00000428  08048434  08048434  00000434  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, CODE&lt;br /&gt;  8 .fini         0000000c  0804885c  0804885c  0000085c  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, CODE&lt;br /&gt;  9 .rodata       00000113  08048868  08048868  00000868  2**0&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt; 10 .data         0000000c  0804997c  0804997c  0000097c  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 11 .eh_frame     00000004  08049988  08049988  00000988  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, DATA&lt;br /&gt; 12 .dynamic      00000098  0804998c  0804998c  0000098c  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 13 .ctors        00000008  08049a24  08049a24  00000a24  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 14 .dtors        00000008  08049a2c  08049a2c  00000a2c  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 15 .jcr          00000004  08049a34  08049a34  00000a34  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 16 .got          00000024  08049a38  08049a38  00000a38  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt; 17 .bss          0000022c  08049a60  08049a60  00000a60  2**5&lt;br /&gt;                  ALLOC&lt;br /&gt; 18 .comment      0000012d  00000000  00000000  00000a60  2**0&lt;br /&gt;                  CONTENTS, READONLY&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;hmm...that seems unnecessary&lt;br /&gt;&lt;br /&gt;Time for a rewrite!&lt;br /&gt;&lt;PRE style="line-height:10px"&gt;&lt;br /&gt;bits 32&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; Define our constants&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;%define stdout  1&lt;br /&gt;%define SYS_exit 1&lt;br /&gt;%define SYS_write 4&lt;br /&gt;%define NUM_NODES_SIZE_1 10&lt;br /&gt;%define NUM_NODES 100&lt;br /&gt;%define MAX_STACK 10&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; Define our messages&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;segment .data&lt;br /&gt;goalMsg  db 'Goal', 0x0A&lt;br /&gt;goalMsgBytes equ $ - goalMsg&lt;br /&gt;&lt;br /&gt;spaceMsg db ' '&lt;br /&gt;spaceMsgBytes equ $ - spaceMsg&lt;br /&gt;&lt;br /&gt;goalNotFoundMsg db 'Goal not found', 0x0A&lt;br /&gt;goalNotFoundMsgBytes equ $ - goalNotFoundMsg&lt;br /&gt;&lt;br /&gt;numbers db '0123456789'&lt;br /&gt;output db 0, ' '&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; Declare our arrays&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;segment .bss&lt;br /&gt;adjMatrix resb NUM_NODES&lt;br /&gt;visited  resb MAX_STACK&lt;br /&gt;&lt;br /&gt;segment .text&lt;br /&gt;&lt;br /&gt;align 4&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ==============&lt;br /&gt;; = kernelCall =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ==============&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;kernelCall:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;int&lt;/FONT&gt;&lt;/B&gt; 0x80&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;ret&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; Define our macros&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;%macro system  1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; eax, %1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; kernelCall&lt;br /&gt;%endmacro&lt;br /&gt;&lt;br /&gt;%macro sys.exit  0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;system&lt;/FONT&gt;&lt;/B&gt; SYS_exit&lt;br /&gt;%endmacro&lt;br /&gt;&lt;br /&gt;%macro sys.write 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;system&lt;/FONT&gt;&lt;/B&gt; SYS_write&lt;br /&gt;%endmacro&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ===========================================&lt;br /&gt;; = initAdjMatrix                           =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Parameters: none                        =&lt;br /&gt;; = Pre: none                               =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Post: adjMatrix and visited are cleared =&lt;br /&gt;; ===========================================&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;align 4&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;initAdjMatrix:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Clear adjMatrix&lt;br /&gt; ; Clear all of eax because we reference it later&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;xor&lt;/FONT&gt;&lt;/B&gt; eax, eax&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.initAdjMatrixL1:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [adjMatrix + eax], byte 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;inc&lt;/FONT&gt;&lt;/B&gt; al&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; al, NUM_NODES&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jne&lt;/FONT&gt;&lt;/B&gt; .initAdjMatrixL1&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Clear visited&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;xor&lt;/FONT&gt;&lt;/B&gt; al, al&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.initAdjMatrixL2&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [visited + eax], byte 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;inc&lt;/FONT&gt;&lt;/B&gt; al&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; al, MAX_STACK&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jne&lt;/FONT&gt;&lt;/B&gt; .initAdjMatrixL2&lt;br /&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;ret&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ==============================================&lt;br /&gt;; = makeEdge                                   =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Parameters: from node (ebx), to node (ecx) =&lt;br /&gt;; = Pre: none                                  =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Post: matrix[from][to] is set              =&lt;br /&gt;; ==============================================&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;align 4&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;makeEdge:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; ebx, [esp + 8]&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; ecx, [esp + 4]&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Determine row (from * 10)&lt;br /&gt; ; Plus column (to)&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;imul&lt;/FONT&gt;&lt;/B&gt; ebx, ebx, NUM_NODES_SIZE_1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; ebx, ecx&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [adjMatrix + ebx], byte 1&lt;br /&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;ret&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; =============================================&lt;br /&gt;; = dfs                                       =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Parameters: start (eax), goal (edx)       =&lt;br /&gt;; = Pre: Stack and matrix must be initialized =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; = Post: Graph is traversed                  =&lt;br /&gt;; =============================================&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;align 4&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;dfs:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; ebp&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; ebp, esp&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Set start&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; eax, [esp + 12]&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Set goal&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; edx, [esp + 8]&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Make room for stack_index&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sub&lt;/FONT&gt;&lt;/B&gt; esp, 2&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Using ebp - 2 as stack_index&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [ebp - 2], word 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Push start and increase stack index&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;inc&lt;/FONT&gt;&lt;/B&gt; word [ebp - 2]&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsL1:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Loop until stack_index is 0&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; [ebp - 2], word 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jne&lt;/FONT&gt;&lt;/B&gt; .dfsL12&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jmp&lt;/FONT&gt;&lt;/B&gt; .dfsOutNotFound&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsL12:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Retrieve node&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;dec&lt;/FONT&gt;&lt;/B&gt; word [ebp - 2]&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Check if node is our goal&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; eax, edx&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;je&lt;/FONT&gt;&lt;/B&gt; .dfsOutFound&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; If we've visited node, continue&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; [visited + eax], byte 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jne&lt;/FONT&gt;&lt;/B&gt; .dfsL1&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Set visited to 1&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [visited + eax], byte 1&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Output eax&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; al, [numbers + eax]&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [output], al&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword 2&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword output&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword stdout&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sys.write&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; esp, byte 12&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Loop from 9 to 0&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;xor&lt;/FONT&gt;&lt;/B&gt; ecx, ecx&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; cl, NUM_NODES_SIZE_1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;dec&lt;/FONT&gt;&lt;/B&gt; cl&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsL2:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; cl, -1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;je&lt;/FONT&gt;&lt;/B&gt; .dfsL1&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Calculate place in array&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;imul&lt;/FONT&gt;&lt;/B&gt; eax, eax, NUM_NODES_SIZE_1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; eax, ecx&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Compare our adjMatrix to 1&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;cmp&lt;/FONT&gt;&lt;/B&gt; [adjMatrix + eax], byte 1&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; If not 1, loop&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jne&lt;/FONT&gt;&lt;/B&gt; .dfsL3&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Otherwise push our index&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; ecx&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;inc&lt;/FONT&gt;&lt;/B&gt; word [ebp - 2]&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;dec&lt;/FONT&gt;&lt;/B&gt; cl&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jmp&lt;/FONT&gt;&lt;/B&gt; .dfsL2&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsL3:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;dec&lt;/FONT&gt;&lt;/B&gt; cl&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jmp&lt;/FONT&gt;&lt;/B&gt; .dfsL2&lt;br /&gt;&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsOutFound:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Output eax&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; al, [numbers + eax]&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; [output], al&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword 2&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword output&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword stdout&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sys.write&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; esp, byte 12&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; eax&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Output goal message&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword goalMsgBytes&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword goalMsg&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword stdout&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sys.write&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; esp, byte 12&lt;br /&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;jmp&lt;/FONT&gt;&lt;/B&gt; .dfsLeave&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsOutNotFound:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Output goal not found message&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword goalNotFoundMsgBytes&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword goalNotFoundMsg&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword stdout&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sys.write&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;add&lt;/FONT&gt;&lt;/B&gt; esp, byte 12&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;.dfsLeave:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;mov&lt;/FONT&gt;&lt;/B&gt; esp, ebp&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;pop&lt;/FONT&gt;&lt;/B&gt; ebp&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;ret&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ========&lt;br /&gt;; = main =&lt;br /&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt;; ========&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt;global _start&lt;br /&gt;&lt;B&gt;&lt;FONT COLOR="#0000FF"&gt;_start:&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; initAdjMatrix&lt;br /&gt;&lt;br /&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Make our edges&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 2&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 3&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 4&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 2&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 5&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 3&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 5&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 3&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 6&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 4&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 7&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 5&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 8&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 5&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 9&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; makeEdge&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;I&gt;&lt;FONT COLOR="#B22222"&gt; ; Traverse&lt;/FONT&gt;&lt;/I&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 1&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; 6&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;call&lt;/FONT&gt;&lt;/B&gt; dfs&lt;br /&gt;&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;push&lt;/FONT&gt;&lt;/B&gt; dword 0&lt;br /&gt; &lt;B&gt;&lt;FONT COLOR="#A020F0"&gt;sys.exit&lt;br /&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;br /&gt;&lt;/PRE&gt;&lt;br /&gt;I've already made a few optimizations (for example changing things like "mov eax, 0" to "xor eax, eax", or had I needed it "mov eax, 1" would become "xor eax, eax" "inc eax". Yes its 2 statements but it is actually 2 bytes smaller - longer code does not always mean longer machine code)&lt;br /&gt;&lt;br /&gt;And lets build it:&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ nasm -f elf -l dfs.lst dfs.asm&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ ld -s -o dfs dfs.o&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ ls -l dfs&lt;br /&gt;-rwxr-xr-x  1 craig  wheel  964 Aug 18 22:57 dfs&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ok ok we are MUCH better, but we can do a little bit better. Let's take a look at the sections:&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ objdump -x dfs&lt;br /&gt;...SNIP...&lt;br /&gt;Sections:&lt;br /&gt;Idx Name          Size      VMA       LMA       File off  Algn&lt;br /&gt;  0 .text         000001eb  08048080  08048080  00000080  2**4&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, READONLY, CODE&lt;br /&gt;  1 .data         00000021  0804926c  0804926c  0000026c  2**2&lt;br /&gt;                  CONTENTS, ALLOC, LOAD, DATA&lt;br /&gt;  2 .bss          00000070  08049290  08049290  00000290  2**2&lt;br /&gt;                  ALLOC&lt;br /&gt;  3 .comment      0000001f  00000000  00000000  00000290  2**0&lt;br /&gt;                  CONTENTS, READONLY&lt;br /&gt;...SNIP...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hmm, my guess is we really don't need the .comment section.&lt;br /&gt;&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ hexdump -C -s 0x290 -n 31 dfs&lt;br /&gt;00000290  00 54 68 65 20 4e 65 74  77 69 64 65 20 41 73 73  |.The Netwide Ass|&lt;br /&gt;000002a0  65 6d 62 6c 65 72 20 30  2e 39 38 2e 33 39 00     |embler 0.98.39.|&lt;br /&gt;000002af&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Looks like nasm is making us pay for room to setup the .comment section, and is making us pay for a little recognition -- lets fix that.&lt;br /&gt;&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ strip -R .comment dfs&lt;br /&gt;[craig ~/Desktop/ai/dfs/asm]$ ls -l dfs&lt;br /&gt;-rwxr-xr-x  1 craig  wheel  884 Aug 18 23:04 dfs&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;884 bytes! We could do better by creating a binary file and defining the elf headers ourselves, but we've already surpassed the goal of the optimizations - 6.82 times smaller!&lt;br /&gt;&lt;br /&gt;And if anyones curious:&lt;br /&gt;&lt;pre style="line-height:10px"&gt;&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ ls -l dfs.c&lt;br /&gt;-rw-r--r--  1 craig  wheel  1373 Aug 18 21:11 dfs.c&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ ls -l asm/dfs.asm&lt;br /&gt;-rw-r--r--  1 craig  wheel  4310 Aug 18 21:55 asm/dfs.asm&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ wc -l dfs.c&lt;br /&gt;     103 dfs.c&lt;br /&gt;[craig ~/Desktop/ai/dfs]$ wc -l asm/dfs.asm&lt;br /&gt;     260 asm/dfs.asm&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4420879528119778008-17584065967684118?l=craigstjean.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://craigstjean.blogspot.com/feeds/17584065967684118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://craigstjean.blogspot.com/2009/01/fun-with-assembler-on-freebsd.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/17584065967684118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4420879528119778008/posts/default/17584065967684118'/><link rel='alternate' type='text/html' href='http://craigstjean.blogspot.com/2009/01/fun-with-assembler-on-freebsd.html' title='Fun with assembler (on FreeBSD)'/><author><name>Craig St. Jean</name><uri>http://www.blogger.com/profile/07800109712106266214</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
