<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss1full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.drissman.com/~d/styles/itemcontent.css"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:cc="http://web.resource.org/cc/" xmlns="http://purl.org/rss/1.0/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">

<channel rdf:about="http://www.drissman.com/blog/">
<title>Driss-A-Blog</title>
<link>http://www.drissman.com/blog/</link>
<description>Drissman family members explain it all...</description>
<dc:language>en-us</dc:language>
<dc:creator />
<dc:date>2010-02-11T19:39:59-05:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.33" />


<items>
<rdf:Seq><rdf:li rdf:resource="http://www.drissman.com/blog/archives/2010/02/11/big_red.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/12/29/fish_and_chips_in_the_city.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/12/18/new_wicks_work.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/12/13/unhappy_wicks.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/12/11/happy_chanukah.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/12/07/what_the_bleep.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/11/27/dubai.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/10/09/nsrectfill_and_nscolor_clearcolor.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/09/08/crossfitting.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/08/17/adventures_in_immigration.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/07/27/replacement_foam_earpads.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/06/23/appreciation_time.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/06/21/cant_get_an_iphone.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/05/16/reverseengineering_in_os_x_on_x86.html" />
<rdf:li rdf:resource="http://www.drissman.com/blog/archives/2009/05/14/in_the_beginning.html" />
</rdf:Seq>
</items>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rdf+xml" href="http://feeds.drissman.com/driss-a-blog-full" /><feedburner:info uri="driss-a-blog-full" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /></channel>

<item rdf:about="http://www.drissman.com/blog/archives/2010/02/11/big_red.html">
<title>Big Red</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/YYUj7iJMM78/big_red.html</link>
<description>&lt;p&gt;Verizon is Big Red?&lt;/p&gt;

&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/EkWKdJF7Md0&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/EkWKdJF7Md0&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;It's a hilarious self-aware parody, and I love the kissing couple homage in the hotel lobby scenes. If you dig around, you'll find the original commercial this is based off of:&lt;/p&gt;

&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/bCxiuuJVT-8&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/bCxiuuJVT-8&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;Not only is half of it a shot-for-shot remake, the music is note-for-note the same. I didn't realize (until digging around) that you can date these ads by the music (&lt;a href="http://www.youtube.com/watch?v=nVUBSUpmqq0"&gt;this one&lt;/a&gt; and &lt;a href="http://www.youtube.com/watch?v=xL5r_ybqos4"&gt;that one&lt;/a&gt; share the music and are from the '80s, while &lt;a href="http://www.youtube.com/watch?v=-CjDm4sy9xA"&gt;this one&lt;/a&gt; is much newer, &lt;a href="http://www.youtube.com/watch?v=J_e63H-c6R8"&gt;this one&lt;/a&gt; goes for a harder rock sound, and &lt;a href="http://www.youtube.com/watch?v=lzg55C3QaZA"&gt;this one&lt;/a&gt; is a horrible retro abomination).&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=YYUj7iJMM78:9CUP7mGGW7U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=YYUj7iJMM78:9CUP7mGGW7U:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=YYUj7iJMM78:9CUP7mGGW7U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=YYUj7iJMM78:9CUP7mGGW7U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/YYUj7iJMM78" height="1" width="1"/&gt;</description>
<dc:subject>Technology</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2010-02-11T19:39:59-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2010/02/11/big_red.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/12/29/fish_and_chips_in_the_city.html">
<title>Fish and chips in the city</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/TZ0Iy5URKO0/fish_and_chips_in_the_city.html</link>
<description>&lt;p&gt;
&lt;a href="http://news.bbc.co.uk/2/hi/uk_news/magazine/8419026.stm"&gt;Happy 150th&lt;/a&gt; to you!
&lt;/p&gt;&lt;p&gt;
There haven't been too many good places I've been to here in NYC. Here's a brief overview:
&lt;/p&gt;&lt;p&gt;
&lt;a href="http://www.arthurtreachers.com/"&gt;Arthur Treacher's&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://maps.google.com/maps?q=251+E+14th+St+New+York,+NY+10003"&gt;251 E 14th St&lt;/a&gt;
&lt;br /&gt;★☆☆☆☆
&lt;br /&gt;A sad joke. The fish is a rectangular block that mocks the natural shape and taste of fish.
&lt;/p&gt;&lt;p&gt;
&lt;a href="http://www.oneandoneny.com/"&gt;One and One&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://maps.google.com/maps/place?cid=7874551606656581302"&gt;76 1 Ave&lt;/a&gt;
&lt;br /&gt;★★★☆☆
&lt;br /&gt;The fish is good, but someone there needs to take Batter 101. Presentation is nice but the slightest touch causes the fish to fall to pieces and the batter to slide off. Redemption comes from the 2-for-1 special on Sunday nights at 7pm.
&lt;/p&gt;&lt;p&gt;
&lt;a href="http://www.asaltandbattery.com/"&gt;A Salt &amp;#38; Battery&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://maps.google.com/maps/place?cid=6739745197866540741"&gt;112 Greenwich Ave&lt;/a&gt;
&lt;br /&gt;★★★★☆
&lt;br /&gt;The star off isn't from the awful name, but the prices. The meal is good, but rather expensive. And how can you sell fish and chips separately?
&lt;/p&gt;&lt;p&gt;
&lt;a href="http://www.chipshopnyc.com/"&gt;Chipshop&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://maps.google.com/maps/place?cid=7201630946958364405"&gt;129 Atlantic Ave, Brooklyn&lt;/a&gt;
&lt;br /&gt;★★★★★
&lt;br /&gt;Yes, to get awesome fish and chips you have to go to Brooklyn. Suck it up. The price is reasonable, the serving size is large, and the taste is great.
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=TZ0Iy5URKO0:IAF1qB-dOZY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=TZ0Iy5URKO0:IAF1qB-dOZY:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=TZ0Iy5URKO0:IAF1qB-dOZY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=TZ0Iy5URKO0:IAF1qB-dOZY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/TZ0Iy5URKO0" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-12-29T14:25:01-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/12/29/fish_and_chips_in_the_city.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/12/18/new_wicks_work.html">
<title>New Wicks Work!</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/LrdAFX7ar5w/new_wicks_work.html</link>
<description>&lt;p&gt;Happy Chanukah! Chodesh Tov! Shabbat Shalom!&lt;/p&gt;

&lt;p&gt;I started using a new kind of wick about four nights ago, and it's working out well. It's the type with a metal tab at the bottom with a wick sticking straight up. You fill the little glass with oil, drop the wick in - make sure there's some wick above the oil - and light. Thank goodness.&lt;/p&gt;

&lt;p&gt;All is well here. Hope all is well with everyone out there.&lt;br /&gt;
Shira&lt;/p&gt;&lt;p&gt;--Shira&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=LrdAFX7ar5w:DY_CJ8-JWQs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=LrdAFX7ar5w:DY_CJ8-JWQs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=LrdAFX7ar5w:DY_CJ8-JWQs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=LrdAFX7ar5w:DY_CJ8-JWQs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/LrdAFX7ar5w" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Shira</dc:creator>
<dc:date>2009-12-18T01:13:51-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/12/18/new_wicks_work.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/12/13/unhappy_wicks.html">
<title>Unhappy Wicks</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/i8_I18aEsYw/unhappy_wicks.html</link>
<description>&lt;p&gt;I've been lighting oil for the last few years (at least) and I haven't had this kind of a problem yet.  My wicks keep drowning themselves.  I can't figure it out - they can't be that unhappy.&lt;/p&gt;

&lt;p&gt;It's the third night of Chanukah - and they did it again. I had changed the oil (in case it really was the oil) but I'm thinking it's the wicks. I used these wicks last year, so I didn't expect trouble. Tomorrow I'm going wick shopping - we'll try something else.&lt;/p&gt;

&lt;p&gt;I didn't want to change the oil and the wick at the same time, otherwise I wouldn't know what worked. So one thing at a time - oil today - we'll try wicks tomorrow.&lt;/p&gt;

&lt;p&gt;I'll let you know!&lt;br /&gt;
Shira&lt;/p&gt;&lt;p&gt;--Shira&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=i8_I18aEsYw:yv_jVHdKSaI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=i8_I18aEsYw:yv_jVHdKSaI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=i8_I18aEsYw:yv_jVHdKSaI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=i8_I18aEsYw:yv_jVHdKSaI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/i8_I18aEsYw" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Shira</dc:creator>
<dc:date>2009-12-13T23:22:14-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/12/13/unhappy_wicks.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/12/11/happy_chanukah.html">
<title>Happy Chanukah!</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/zzbgPBabnjU/happy_chanukah.html</link>
<description>&lt;p&gt;Just thought I'd stop by and give a short update on my life.&lt;/p&gt;

&lt;p&gt;I'm in Toronto (shockingly enough) and thank G-d all is going well.&lt;/p&gt;

&lt;p&gt;Immigration Front - we've received a notice that Jeff has given the okay to be my sponsor.  The rest of the permanent residency application has been forwarded to the Canadian Consulate in Buffalo, New York to be reviewed.&lt;/p&gt;

&lt;p&gt;The Apartment - it's finally shaping up.  We're due to put up pictures (hopefully) this week. Yay!&lt;/p&gt;

&lt;p&gt;My Writings - not to worry, I'm still involved.  I have two websites:&lt;br /&gt;
&lt;a href="http://shiradrissman.com/"&gt;http://shiradrissman.com&lt;/a&gt; - political musings&lt;br /&gt;
&lt;a href="http://shiradrissman.org/"&gt;http://shiradrissman.org&lt;/a&gt; -  Jewish musings - new article up on &lt;a href="http://shiradrissman.org/2009/12/chanukah-5770.html"&gt;Chanukah&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;That's my life. I'm still not allowed to work, but various projects are keeping me busy and out of trouble.&lt;/p&gt;

&lt;p&gt;Wishing everyone a very Happy Chanukah!&lt;br /&gt;
Shira&lt;/p&gt;&lt;p&gt;--Shira&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=zzbgPBabnjU:K-56dKL317Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=zzbgPBabnjU:K-56dKL317Y:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=zzbgPBabnjU:K-56dKL317Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=zzbgPBabnjU:K-56dKL317Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/zzbgPBabnjU" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Shira</dc:creator>
<dc:date>2009-12-11T01:00:37-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/12/11/happy_chanukah.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/12/07/what_the_bleep.html">
<title>What the bleep?</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/KhsDEVjTyMI/what_the_bleep.html</link>
<description>&lt;p&gt;
What the Bleep Do We Know!?
&lt;br /&gt;★☆☆☆☆
&lt;/p&gt;&lt;p&gt;
Twenty two minutes into the movie I learned a new logical technique I'm calling Advanced Logical Bullshitting. It goes something like this:
&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;Make a bad analogy: “In empty space, matter flits in and out of existence. Kinda like thoughts do.”&lt;/li&gt;
&lt;li&gt;Turn it into a simile: “Matter is like thought.”&lt;/li&gt;
&lt;li&gt;Assume it to be literal truth: “Therefore, we've established that thoughts create matter.”&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;
I'm not joking. That's the &lt;em&gt;actual argument&lt;/em&gt; made by the movie 22 minutes in. That was enough for me; I turned it off.
&lt;/p&gt;&lt;p&gt;
This seriously angers me. I've seen girls on Facebook who list “Quantum Physics” under “Interests.” Nuh, uh, honey. Not with nothing else in your profile listing the slightest bit of scientific interest. (And no, random quotes from Einstein about God don't count.)
&lt;/p&gt;&lt;p&gt;
If you want to claim that you create your own reality through your thoughts, fine. That was done in the 70s by Jane Roberts and her Seth books. But don't defend it by making a mockery of logic and science.
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=KhsDEVjTyMI:1FZvnox1Kgc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=KhsDEVjTyMI:1FZvnox1Kgc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=KhsDEVjTyMI:1FZvnox1Kgc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=KhsDEVjTyMI:1FZvnox1Kgc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/KhsDEVjTyMI" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-12-07T10:20:21-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/12/07/what_the_bleep.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/11/27/dubai.html">
<title>Dubai</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/wt7B7ybDbQc/dubai.html</link>
<description>&lt;p&gt;
Bounce a check in Dubai and you &lt;a href="http://www.nytimes.com/2009/09/12/world/middleeast/12dubai.html"&gt;go to jail&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
Bounce a check and you're Dubai, well, &lt;a href="http://www.reuters.com/article/ousivMolt/idUSTRE5AO4J820091125"&gt;too bad&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=wt7B7ybDbQc:nVZ7Shg5wHs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=wt7B7ybDbQc:nVZ7Shg5wHs:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=wt7B7ybDbQc:nVZ7Shg5wHs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=wt7B7ybDbQc:nVZ7Shg5wHs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/wt7B7ybDbQc" height="1" width="1"/&gt;</description>
<dc:subject>Politics</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-11-27T00:10:54-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/11/27/dubai.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/10/09/nsrectfill_and_nscolor_clearcolor.html">
<title>NSRectFill() and +[NSColor clearColor]</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/23W_cR5szj8/nsrectfill_and_nscolor_clearcolor.html</link>
<description>&lt;p&gt;
I'm reading a code review from a colleague when I see this:
&lt;/p&gt;&lt;p&gt;
&lt;code&gt;[[NSColor clearColor] set];
&lt;br /&gt;NSRectFill(rect);&lt;/code&gt;
&lt;/p&gt;&lt;p&gt;
Ouch. I see that's broken, but only because I made the same mistake yesterday. What's wrong?
&lt;/p&gt;&lt;p&gt;
&lt;code&gt;+[NSColor clearColor]&lt;/code&gt; is actually black with an alpha 0. That would be fine but for a subtle fact about &lt;code&gt;NSRectFill()&lt;/code&gt;: it ignores alpha. Really! The code, as written above, will fill the specified rectangle with black.
&lt;/p&gt;&lt;p&gt;
What's going on here? &lt;code&gt;NSRectFill()&lt;/code&gt; uses the compositing mode &lt;code&gt;NSCompositeCopy&lt;/code&gt;, which ignores alpha. If you want alpha, you must say:
&lt;/p&gt;&lt;p&gt;
&lt;code&gt;[[NSColor clearColor] set];
&lt;br /&gt;NSRectFillUsingOperation(rect, NSCompositeSourceOver);&lt;/code&gt;
&lt;/p&gt;&lt;p&gt;
A quick one-liner, but too easy to get wrong.
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=23W_cR5szj8:MTxKhPqG4Xc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=23W_cR5szj8:MTxKhPqG4Xc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=23W_cR5szj8:MTxKhPqG4Xc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=23W_cR5szj8:MTxKhPqG4Xc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/23W_cR5szj8" height="1" width="1"/&gt;</description>
<dc:subject>Macintosh</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-10-09T14:55:20-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/10/09/nsrectfill_and_nscolor_clearcolor.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/09/08/crossfitting.html">
<title>CrossFitting</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/C7UOfZIJFv0/crossfitting.html</link>
<description>&lt;p&gt;
I learned about &lt;a href="http://www.crossfit.com/"&gt;CrossFit&lt;/a&gt; from the &lt;a href="http://myfatass.org/"&gt;My Fat Ass&lt;/a&gt; challenge that I did with some friends of mine (we hope to be restarting it soon). I'd had mixed results from doing P90X (mostly involving knees feeling like they were going to tear), and so the opportunity to do things under professional supervision was appealing.
&lt;/p&gt;&lt;p&gt;
So I joined up at &lt;a href="http://www.crossfitvirtuosity.com/"&gt;CrossFit Virtuosity&lt;/a&gt; and started on their Foundations classes. Once I've got the basic form down I hope to move up to the “regular” classes. But I got a taste of that yesterday when we had a joint Labor Day class.
&lt;/p&gt;&lt;p&gt;
Warmup was &lt;a href="http://www.flickr.com/photos/crossfitvirtuosity/3896862067/"&gt;tossing a medicine ball&lt;/a&gt; back and forth between partners. Then we split off into teams of 6, leaders selected by &lt;a href="http://www.flickr.com/photos/crossfitvirtuosity/3897844774/"&gt;jumping onto a platform&lt;/a&gt;. Keith had a gleeful smile as he scribbled the task on the board:
&lt;/p&gt;&lt;p&gt;
&lt;span style="text-decoration:underline;"&gt;Team workout&lt;/span&gt;
&lt;br /&gt;Sandbag sprints (each member)
&lt;br /&gt;100 pullups (per team; each member must do at least one)
&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/crossfitvirtuosity/3897002035/"&gt;100 wheelbarrow pushups&lt;/a&gt; (per team; each member must do at least one)
&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/crossfitvirtuosity/3897028783/"&gt;Overhead kettlebell carry&lt;/a&gt; (each member; 16kg, one roundtrip per arm)
&lt;br /&gt;3000m row (per team; each member must participate)
&lt;/p&gt;&lt;p&gt;
I did surprisingly-well on the sprints (surprising to me, anyway), did some pullups (not very many), more pushups, and I hung in there with the kettlebell (my left arm doesn't like doing that).
&lt;/p&gt;&lt;p&gt;
The last part was the row, and we all did 500m (except for one team member who did 250m). I had 2250–2750 and it winded me. I powered through it, kept excellent pace, and just about collapsed after. Spent 5 minutes just breathing through the pain. Then when I didn't feel like gasping any more, every muscle in my body just hurt. So I laid down for a while longer. Eventually I got up and started walking and talking. We'd lost by 24s, but had made a major comeback.
&lt;/p&gt;&lt;p&gt;
One thing I realized was that CrossFit is essentially all nerds. I never thought I'd be talking about web browsers and coding and hacking with gym mates, but I was pleasantly surprised.
&lt;/p&gt;&lt;p&gt;
And I'm finding myself eerily looking forward to the next time. Strange, huh?
&lt;/p&gt;&lt;p&gt;
(&lt;a href="http://www.flickr.com/photos/crossfitvirtuosity/archives/date-taken/2009/09/07/"&gt;more photos...&lt;/a&gt;)
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=C7UOfZIJFv0:U-vVAQw-Gcw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=C7UOfZIJFv0:U-vVAQw-Gcw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=C7UOfZIJFv0:U-vVAQw-Gcw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=C7UOfZIJFv0:U-vVAQw-Gcw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/C7UOfZIJFv0" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-09-08T21:22:48-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/09/08/crossfitting.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/08/17/adventures_in_immigration.html">
<title>Adventures in Immigration</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/Jn4uxQR43mM/adventures_in_immigration.html</link>
<description>&lt;p&gt;Immigration to Canada is no simple thing, even for an American.  One would think, &amp;quot;Hey! I'm an American - here I am.&amp;quot; Nope, that doesn't happen sorry to say.&lt;/p&gt;

&lt;p&gt;I've been working on my permanent residency papers. Which means that I've been given 6 months to get the papers and information collected that will allow me to continue living in Canada.  My 6 month deadline is approaching at the end of September.&lt;/p&gt;

&lt;p&gt;Here is the excitement so far.&lt;/p&gt;&lt;p&gt;About two weeks ago Jeff and I went to go get my fingerprints taken. I needed three sets - one to send to the &lt;span class="caps"&gt;FBI,&lt;/span&gt; one set to the State of Michigan, and the third set to the State of New York. Basically I would send to any place I've lived in the last 10 years. Thankfully I haven't been that many places.  We found an official place that would take my fingerprints and went to see what we would find. We found a nice lady who was quite efficient at taking fingerprints. It makes sense since she said she sees about 20 people a day.&lt;/p&gt;

&lt;p&gt;Next part of the big excitement was today. My medical exam. Nothing tremendous, just exhausting. I knew in advance that the appointment was supposedly going to take two hours, but I didn't know how it was going to be broken down.&lt;/p&gt;

&lt;p&gt;We got to the doctor's office at 10:45am where they sent us two buildings over. We walked over. It was hot. With the humidity built in - it's around 100 degrees today. I had blood taken, &lt;span class="caps"&gt;HIV&lt;/span&gt; and whatever else they wanted to know about.  She did an okay job taking the blood, but I'll have a bruise where they took it.&lt;/p&gt;

&lt;p&gt;We headed back to the doctor's office where they sent us to the basement of the same building to get an x-ray of my lungs. There was a long line ahead of us. That actually turned out to be useful since they didn't accept credit or debit - only cash or check, which we didn't have on us. We took about 15 minutes to find a bank in the area and return, and we still waited. In the meantime, we texted Talya and smiled at little children.  I finally got called in and x-rayed.&lt;/p&gt;

&lt;p&gt;We returned a third time to the doctor's office. I met the doctor, nice enough lady, and answered her questions. I got to tell her about my gallbladder surgery and &lt;span class="caps"&gt;ACL&lt;/span&gt; surgery. That being said, she told me that I am unremarkable. I'm quite happy to be unremarkable medically.&lt;/p&gt;

&lt;p&gt;Then we went home and had lunch. After lunch I laid down for almost two hours. I'm feeling better now.&lt;/p&gt;

&lt;p&gt;So the major stuff is out of the way.  We're waiting for the &lt;span class="caps"&gt;FBI,&lt;/span&gt; the States of Michigan and New York to send my criminal record (nothing there) back to me. The doctor's office will ship my records directly to the Canadian immigration people.  And I have some more papers to fill out in the meantime.  When I get all my records shipped to me - I collect it all and ship it along... and wait at least six months to hear from them.&lt;/p&gt;

&lt;p&gt;We're also going to fill out work permit forms at the same time to try to allow me to work while we're waiting to hear about permanent residency. Yay!&lt;/p&gt;

&lt;p&gt;In the meantime, I'm writing on my blog and puttering around the house. Good fun had by all.&lt;/p&gt;&lt;p&gt;--Shira&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=Jn4uxQR43mM:e6ySMBblkLc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=Jn4uxQR43mM:e6ySMBblkLc:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=Jn4uxQR43mM:e6ySMBblkLc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=Jn4uxQR43mM:e6ySMBblkLc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/Jn4uxQR43mM" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Shira</dc:creator>
<dc:date>2009-08-17T17:22:47-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/08/17/adventures_in_immigration.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/07/27/replacement_foam_earpads.html">
<title>Replacement foam earpads</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/proFRg9gVEw/replacement_foam_earpads.html</link>
<description>&lt;p&gt;
One of the fun things about using earbuds is having to occasionally replace the foam pads.
&lt;/p&gt;&lt;p&gt;
Option #1: Go to Radio Shack. Get a &lt;a href="http://www.radioshack.com/product/index.jsp?productId=2036280"&gt;4-pack&lt;/a&gt; for $4 plus tax. Bought this twice already. Ow.
&lt;/p&gt;&lt;p&gt;
Option #2: eBay seller ZanyZap's &lt;a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=260438692339"&gt;450-pack&lt;/a&gt; for $9. Shipped.
&lt;/p&gt;&lt;p&gt;
Hmmm...
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=proFRg9gVEw:8nrPorv6xAg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=proFRg9gVEw:8nrPorv6xAg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=proFRg9gVEw:8nrPorv6xAg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=proFRg9gVEw:8nrPorv6xAg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/proFRg9gVEw" height="1" width="1"/&gt;</description>
<dc:subject>Technology</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-07-27T21:02:57-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/07/27/replacement_foam_earpads.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/06/23/appreciation_time.html">
<title>Appreciation time</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/xDyR2ujwvqA/appreciation_time.html</link>
<description>&lt;p&gt;&lt;a href="http://twitter.com/aviappreciates"&gt;http://twitter.com/aviappreciates&lt;/a&gt;&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=xDyR2ujwvqA:AiCVU5EnktI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=xDyR2ujwvqA:AiCVU5EnktI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=xDyR2ujwvqA:AiCVU5EnktI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=xDyR2ujwvqA:AiCVU5EnktI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/xDyR2ujwvqA" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-06-23T11:32:41-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/06/23/appreciation_time.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/06/21/cant_get_an_iphone.html">
<title>Can't get an iPhone?</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/qnAJiMr3lgQ/cant_get_an_iphone.html</link>
<description>&lt;p&gt;
I'm giving up and getting an iPhone. Well, trying to, anyway. I was halfway through my order when I punched in my current phone number and got a notice that it was ineligible for transfer. I did a live chat with an agent:
&lt;/p&gt;&lt;blockquote&gt;
Rene: Does your number belong to a different state than the one you are in?
&lt;br /&gt;Avi: yes
&lt;br /&gt;Avi: why would that matter?
&lt;br /&gt;Rene: That matters because there is a Federal Law by the FCC that prevents the transfer of numbers from state to state.  
&lt;/blockquote&gt;&lt;p&gt;
Seriously? I can't take my number with me because I live in a different state?
&lt;/p&gt;&lt;blockquote&gt;
Rene: You would have to get a new number.  Would that be alright with  you?
&lt;br /&gt;Avi: Ugh
&lt;br /&gt;Avi: no, I've had that # for nine years
&lt;br /&gt;Rene: I am sorry about that.
&lt;br /&gt;Rene: What would you like to do?
&lt;br /&gt;Rene: Sometimes change is good.  
&lt;/blockquote&gt;&lt;p&gt;
Sometimes change is good?! I'm already starting to dread working with AT&amp;#38;T...
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=qnAJiMr3lgQ:pFiC_NlTeTQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=qnAJiMr3lgQ:pFiC_NlTeTQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=qnAJiMr3lgQ:pFiC_NlTeTQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=qnAJiMr3lgQ:pFiC_NlTeTQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/qnAJiMr3lgQ" height="1" width="1"/&gt;</description>
<dc:subject>Random Thoughts</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-06-21T15:35:06-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/06/21/cant_get_an_iphone.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/05/16/reverseengineering_in_os_x_on_x86.html">
<title>Reverse-Engineering in OS X on x86</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/e3tf9poW61s/reverseengineering_in_os_x_on_x86.html</link>
<description>&lt;p&gt;
The other day at work I had a task: to figure out how to change the displayed title of a minimized window in the Dock without actually changing the window's title. (Please trust that I had a very good reason for wanting to do this.)
&lt;/p&gt;&lt;p&gt;
While there are some excellent articles about &lt;a href="http://www.osnews.com/story/10366/A_Brief_Tutorial_on_Reverse_Engineering_OS_X"&gt;how to reverse-engineer&lt;/a&gt; under OS X, they're all PowerPC-based. And even though the future of the Mac is x86, it seems like people have lots of &lt;a href="http://www.clarkcox.com/blog/?p=12"&gt;anxiety&lt;/a&gt; about having to work with it.
&lt;/p&gt;&lt;p&gt;
I think the problem is not a lack of documentation on x86 assembly, but a surfeit of it. Most of it is Windows- or DOS-centric, usually with the wrong &lt;a href="http://en.wikipedia.org/wiki/X86_assembly"&gt;syntax&lt;/a&gt; (Intel syntax vs the AT&amp;#38;T syntax that GCC uses), and with the aim of teaching how to write it. But &lt;em&gt;reading&lt;/em&gt; x86 assembly really isn't that hard. If all you want to do is learn how to read the code generated by GCC, it's probably just as easy as PowerPC.
&lt;/p&gt;&lt;p&gt;
The other day I took &lt;a href="http://www.drissman.com/blog/images/2009/05/SetWindowTitle.txt"&gt;notes of my discoveries&lt;/a&gt;. Let's touch on two functions, both in PowerPC and x86 flavors. For those of you who only know PowerPC assembly, I hope you'll be pleasantly surprised.
&lt;/p&gt;&lt;p&gt;
Before we begin, I'm going to assume that you're comfortable with assembly in general (though not necessarily with any particular one). If you have the latest developer tools, launch Shark (in &lt;code&gt;/Developer/Applications/Performance Tools&lt;/code&gt;) and in the Help menu you can access various ISA references. In addition, Apple has ABI documentation for both the &lt;a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/100-32-bit_PowerPC_Function_Calling_Conventions/32bitPowerPC.html"&gt;PowerPC&lt;/a&gt; and &lt;a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html"&gt;x86&lt;/a&gt;. I'm going to go over each function twice (once for PowerPC and once for x86); feel free to skim the PowerPC version if you're accustomed to it. And finally, this is only for the 32-bit version of each platform; things change even more with 64 bits.
&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;SetWindowTitleWithCFString&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;
The trail always begins with a public call that uses the SPI that you want to figure out. In this case, I chose &lt;code&gt;SetWindowTitleWithCFString&lt;/code&gt; because it has to somehow set the title of a window even if it's minimized. I went with Carbon because sometimes the dynamic nature of Objective C with Cocoa makes tracing code harder.
&lt;/p&gt;&lt;p&gt;
&lt;em&gt;PowerPC&lt;/em&gt;
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+0&amp;gt;:	mflr    r0          // save linkage
&amp;lt;+4&amp;gt;:	stmw    r30,-8(r1)  // stash r30, r31
&amp;lt;+8&amp;gt;:	mr      r30,r4      // save r4 (new title)
&amp;lt;+12&amp;gt;:	stw     r0,8(r1)    // make stack frame
&amp;lt;+16&amp;gt;:	stwu    r1,-80(r1)  // make stack frame
&lt;/pre&gt;&lt;p&gt;
This is the prologue of the function. The PowerPC doesn't have a dedicated stack pointer (convention is to use &lt;code&gt;r1&lt;/code&gt; for that), so the common way of implementing branches by pushing the PC onto the stack doesn't work. Instead, the PowerPC has a link register and a command &lt;code&gt;bl&lt;/code&gt; to branch and put the old PC value into the link register. Thus, almost every function starts with &lt;code&gt;mflr r0&lt;/code&gt;, to pull the old PC into a usable register. Then in &amp;lt;+4&amp;gt; we save off some registers that we're going to smash. Every function needs scratch registers to hold local variables, and usually the high-numbered registers are used. The &lt;code&gt;stmw&lt;/code&gt; (store multiple words) instruction is useful for ditching many high registers on the stack. Then in &amp;lt;+12&amp;gt; we drop the old PC onto the stack and allocate 80 bytes on the stack.
&lt;/p&gt;&lt;p&gt;
A note on parameter passing. Integer-sized parameters (the only kind we'll be dealing with today) are passed into a function starting with &lt;code&gt;r3&lt;/code&gt; and going up through the registers. Return values are returned in &lt;code&gt;r3&lt;/code&gt;. So we see that in &amp;lt;+8&amp;gt; we stick away the pointer to the new name in &lt;code&gt;r30&lt;/code&gt; (whose previous value was stored on the stack earlier).
&lt;/p&gt;&lt;pre&gt;&amp;lt;+20&amp;gt;:	bl      0x92881384 &amp;lt;_Z13GetWindowDataP15OpaqueWindowPtr&amp;gt;
&amp;lt;+24&amp;gt;:	li      r0,-5600    // errInvalidWindowRef
&amp;lt;+28&amp;gt;:	cmpwi   cr7,r3,0    // if no window data, bail
&amp;lt;+32&amp;gt;:	beq-    cr7,0x928d2ae0 &amp;lt;+60&amp;gt;
&amp;lt;+36&amp;gt;:	cmpwi   cr7,r30,0   // if no string to set, bail
&amp;lt;+40&amp;gt;:	li      r0,-50      // paramErr
&amp;lt;+44&amp;gt;:	beq-    cr7,0x928d2ae0 &amp;lt;+60&amp;gt;
&amp;lt;+48&amp;gt;:	mr      r4,r30
&lt;/pre&gt;&lt;p&gt;
This is where we must start making inferences as to what the code is doing. Fortunately, we have the symbols so it's not too hard. We see that we use the WindowRef as a parameter to a C++ function &lt;code&gt;GetWindowData(OpaqueWindowPtr)&lt;/code&gt;, as the WindowRef was passed in as &lt;code&gt;r3&lt;/code&gt; and &lt;code&gt;r3&lt;/code&gt; wasn't altered before the call. In addition, note that the function return value, being in &lt;code&gt;r3&lt;/code&gt;, will overwrite the WindowRef value which wasn't saved in a high register. That's fine, as the WindowRef was just an index into a table and won't be needed further.
&lt;/p&gt;&lt;p&gt;
At this point we run some checks. We compare both &lt;code&gt;r3&lt;/code&gt; and &lt;code&gt;r30&lt;/code&gt; to zero and if either are we jump to the end with &lt;code&gt;r0&lt;/code&gt; set to the appropriate error code. (The end of the function will move &lt;code&gt;r0&lt;/code&gt; into &lt;code&gt;r3&lt;/code&gt; for return.)
&lt;/p&gt;&lt;p&gt;
The PowerPC condition register has eight condition sets. Why are we using &lt;code&gt;cr7&lt;/code&gt; here? Probably because &lt;code&gt;cr7&lt;/code&gt; is volatile and we can get away with not saving/restoring it.
&lt;/p&gt;&lt;pre&gt;&amp;lt;+52&amp;gt;:	bl      0x928d2af8 &amp;lt;_ZN10WindowData14SetTitleCommonEPK10__CFString&amp;gt;
&amp;lt;+56&amp;gt;:	li      r0,0        // return noErr
&amp;lt;+60&amp;gt;:	addi    r1,r1,80    // tear down stack frame and return
&amp;lt;+64&amp;gt;:	mr      r3,r0
&amp;lt;+68&amp;gt;:	lwz     r0,8(r1)
&amp;lt;+72&amp;gt;:	lmw     r30,-8(r1)
&amp;lt;+76&amp;gt;:	mtlr    r0
&amp;lt;+80&amp;gt;:	blr
&lt;/pre&gt;&lt;p&gt;
The rest is pretty simple. We call a member function &lt;code&gt;WindowData::SetTitleCommon(CFString*)&lt;/code&gt;, and then do common tear down. We restore the stack pointer, put the return value into &lt;code&gt;r3&lt;/code&gt;, restore the registers, move the old PC back into the link register, and branch to the link register (&lt;code&gt;blr&lt;/code&gt;), returning us to our caller.
&lt;/p&gt;&lt;p&gt;
&lt;em&gt;x86&lt;/em&gt;
&lt;/p&gt;&lt;p&gt;
The PowerPC register file is really easy: &lt;code&gt;r0&lt;/code&gt;, &lt;code&gt;r1&lt;/code&gt;, &lt;code&gt;r2&lt;/code&gt; ... &lt;code&gt;r31&lt;/code&gt;. x86 has fewer registers and they've historically had different roles (accumulator, base, source index, destination index, and so on). Seriously, forget about that. There are eight registers you care about. &lt;code&gt;eax&lt;/code&gt;, &lt;code&gt;ebx&lt;/code&gt;, &lt;code&gt;ecx&lt;/code&gt;, &lt;code&gt;edx&lt;/code&gt;, &lt;code&gt;esi&lt;/code&gt;, and &lt;code&gt;edi&lt;/code&gt; are all general-purpose registers. &lt;code&gt;esp&lt;/code&gt; is the stack pointer. &lt;code&gt;ebp&lt;/code&gt; is the frame pointer. That's it.
&lt;/p&gt;&lt;p&gt;
PowerPC assembly reads right-to-left (except for stores). x86 AT&amp;#38;T syntax in general reads left to right.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+0&amp;gt;:	push   %ebp             // make stack frame
&amp;lt;+1&amp;gt;:	mov    %esp,%ebp        // make stack frame
&amp;lt;+3&amp;gt;:	push   %esi             // stash %esi
&amp;lt;+4&amp;gt;:	sub    $0x14,%esp       // make stack frame
&lt;/pre&gt;&lt;p&gt;
x86 is stack-based. Parameters to a function are put at the top of the stack, with the rightmost parameters with the highest addresses. To execute the function, the &lt;code&gt;call&lt;/code&gt; instruction was used. It pushes the PC onto the stack, so even before we hit &amp;lt;+0&amp;gt; the parameters are four bytes above the stack pointer. In &amp;lt;+0&amp;gt; we save off the old stack frame value and in &amp;lt;+1&amp;gt; we establish our stack frame. At this point &lt;code&gt;ebp&lt;/code&gt; is fixed for the entire function. In &amp;lt;+3&amp;gt; we save the old values of registers we're going to use, and in &amp;lt;+4&amp;gt; we allocate space on the stack.
&lt;/p&gt;&lt;p&gt;
This is a perfect example of an ideal stack frame. &lt;code&gt;ebp&lt;/code&gt; is the frame pointer. It points (to the stack) at the old frame pointer. &lt;code&gt;ebp&lt;/code&gt;+4 is the IP of the function that called us. &lt;code&gt;ebp&lt;/code&gt;+8 is the first parameter passed in, &lt;code&gt;ebp&lt;/code&gt;+12 is the second, etc. Immediately below &lt;code&gt;ebp&lt;/code&gt; are the values saved from the registers, which will be restored before the return. And below &lt;em&gt;that&lt;/em&gt; is a bunch of stack space used for either register spillage or calling subsequent functions. One interesting note is that rarely are parameters pushed onto the stack for a call. The stack pointer doesn't move once we make it past the prologue. We just set the memory right above &lt;code&gt;esp&lt;/code&gt; (the stack pointer) and make the call.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+7&amp;gt;:	mov    0x8(%ebp),%eax   // get WindowRef in %eax
&amp;lt;+10&amp;gt;:	mov    0xc(%ebp),%esi   // get new title in %esi
&lt;/pre&gt;&lt;p&gt;
The parameters are passed on the stack. Since fiddling in memory is slow, we pull the values into registers. It's actually pretty analogous to how things go in PowerPC. There, lower registers like &lt;code&gt;r3&lt;/code&gt; are reused for parameter passing so important values are kept in the high registers. On x86 the parameters go on the stack and values are kept in registers (while they can). Why &lt;code&gt;eax&lt;/code&gt; and &lt;code&gt;esi&lt;/code&gt;? Why not?
&lt;/p&gt;&lt;pre&gt;&amp;lt;+13&amp;gt;:	mov    %eax,(%esp)      // put WindowRef on the stack
&amp;lt;+16&amp;gt;:	call   0x92dfb8f6 &amp;lt;_Z13GetWindowDataP15OpaqueWindowPtr&amp;gt;
&lt;/pre&gt;&lt;p&gt;
With the PowerPC, you can tell how many parameters a function has by how many registers starting with &lt;code&gt;r3&lt;/code&gt; are loaded. Here, just look at the register indirect addressing with &lt;code&gt;esp&lt;/code&gt;.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+21&amp;gt;:	mov    %eax,%edx        // stick WindowData into %edx
&amp;lt;+23&amp;gt;:	mov    $0xffffea20,%eax // errInvalidWindowRef
&amp;lt;+28&amp;gt;:	test   %edx,%edx        // if no window data, bail
&amp;lt;+30&amp;gt;:	je     0x92e4bb04 &amp;lt;+54&amp;gt;
&amp;lt;+32&amp;gt;:	test   %esi,%esi        // if no string to set, bail
&amp;lt;+34&amp;gt;:	mov    $0xffce,%ax      // paramErr
&amp;lt;+38&amp;gt;:	je     0x92e4bb04 &amp;lt;+54&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Return values come back from functions in &lt;code&gt;eax&lt;/code&gt;, but otherwise this is pretty much the same. The only thing of interest to note is the clever use of the peculiar register structure. In &amp;lt;+23&amp;gt; the constant &lt;code&gt;0xffffea20&lt;/code&gt; is loaded into &lt;code&gt;eax&lt;/code&gt;. But on &amp;lt;+34&amp;gt; the constant &lt;code&gt;0xffce&lt;/code&gt; is loaded in &lt;code&gt;ax&lt;/code&gt;. But since &lt;code&gt;ax&lt;/code&gt; is just an alias for the lower 16 bits of &lt;code&gt;eax&lt;/code&gt;, the upper half of the word is left as &lt;code&gt;0xffff&lt;/code&gt; and we get the full constant &lt;code&gt;0xffffffce&lt;/code&gt; in &lt;code&gt;eax&lt;/code&gt;. Why do this? Because loading a 32 bit constant takes 5 bytes while loading a 16 bit constant only takes 4.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+40&amp;gt;:	mov    %esi,0x4(%esp)   // load new title as param 2
&amp;lt;+44&amp;gt;:	mov    %edx,(%esp)      // load WindowData as param 1
&amp;lt;+47&amp;gt;:	call   0x92e4bb0c &amp;lt;_ZN10WindowData14SetTitleCommonEPK10__CFString&amp;gt;
&amp;lt;+52&amp;gt;:	xor    %eax,%eax        // return noErr
&lt;/pre&gt;&lt;p&gt;
Same stuff as before. The one note is the zeroing of &lt;code&gt;eax&lt;/code&gt; with an &lt;code&gt;xor&lt;/code&gt;. Just a fancy trick as the generated code is &lt;a href="http://en.wikibooks.org/wiki/X86_Disassembly/Code_Obfuscation"&gt;faster and smaller&lt;/a&gt; than the equivalent &lt;code&gt;mov $0x0,%eax&lt;/code&gt;.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+54&amp;gt;:	add    $0x14,%esp       // tear down stack frame and return
&amp;lt;+57&amp;gt;:	pop    %esi
&amp;lt;+58&amp;gt;:	leave  
&amp;lt;+59&amp;gt;:	ret    
&amp;lt;+60&amp;gt;:	nop    
&amp;lt;+61&amp;gt;:	nop    
&lt;/pre&gt;&lt;p&gt;
Mirror image of the stack frame creation.
&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;UpdateDockTitle&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;
That wasn't so hard, was it? Whether stack- or register-based, it's basically the same.
&lt;/p&gt;&lt;p&gt;
At this point I'd like to talk about &lt;code&gt;UpdateDockTitle&lt;/code&gt;. There are a few tricks that are in here, and so I'll focus the commentary on those more.
&lt;/p&gt;&lt;p&gt;
&lt;em&gt;PowerPC&lt;/em&gt;
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+0&amp;gt;:	mflr    r0               // save linkage
&amp;lt;+4&amp;gt;:	stmw    r28,-16(r1)      // stash r28, r29, r30, r31
&amp;lt;+8&amp;gt;:	mr      r30,r3           // save r3 (WindowData)
&amp;lt;+12&amp;gt;:	bcl-    20,4*cr7+so,0x928d2bd4 &amp;lt;+16&amp;gt;
&amp;lt;+16&amp;gt;:	mflr    r31            // get ip in r31
&lt;/pre&gt;&lt;p&gt;
Whoa... what?
&lt;/p&gt;&lt;p&gt;
Short story: &amp;lt;+12&amp;gt; is an unconditional branch-and-link.
&lt;/p&gt;&lt;p&gt;
Long story: On the PowerPC, instructions like &lt;code&gt;bge&lt;/code&gt;, etc. are just aliases to a more primitive branch instruction, &lt;code&gt;bc&lt;/code&gt; (branch conditional). In this case, the first parameter is 20 (&lt;code&gt;0b10100&lt;/code&gt;), which indicates “branch always”. Since it's always going to branch, the second parameter doesn't matter, so it was set to all 1 bits (which translates to &lt;code&gt;4*cr7+so&lt;/code&gt;).
&lt;/p&gt;&lt;p&gt;
Why do this? Because we're going to need to access some PC-relative data, and the PowerPC chip has no PC-relative addressing mode. And the register move instructions can't access the PC register. Therefore we cheat in a way by taking an unconditional jump to the next address. Since it's a branch and link, the link register is filled with the next address (which in this case equals the address just jumped to) which can be moved to a normal register.
&lt;/p&gt;&lt;p&gt;
Why branch-conditional with a condition “branch always”? The &lt;code&gt;b&lt;/code&gt; opcode only provides absolute addressing. Only &lt;code&gt;bc&lt;/code&gt; has relative addressing.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+20&amp;gt;:	stw     r0,8(r1)
&amp;lt;+24&amp;gt;:	stwu    r1,-80(r1)     // make stack frame
&amp;lt;+28&amp;gt;:	addis   r28,r31,3533 
&amp;lt;+32&amp;gt;:	bl      0x928d2c50 &amp;lt;_Z15GetTitleForDockP10WindowData&amp;gt;
&amp;lt;+36&amp;gt;:	lbz     r0,-3364(r28)  // haul initialization boolean into r0
&lt;/pre&gt;&lt;p&gt;
This is where intuition comes in. We're hauling in some random byte from some PC-relative address. (&lt;code&gt;lbz&lt;/code&gt; is load byte and zero, which loads one byte from memory and clears the high bits.) What's byte sized? A &lt;code&gt;bool&lt;/code&gt;. Why a bool? Bools are flags. And with the value of the byte gating the call to &lt;code&gt;RegisterAsDockClientPriv&lt;/code&gt;, it's a safe bet that it's an initialization flag.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+40&amp;gt;:	mr      r29,r3         // stash new title into r29
&amp;lt;+44&amp;gt;:	cmpwi   cr7,r0,0       // was initialized?
&amp;lt;+48&amp;gt;:	bne-    cr7,0x928d2c04 &amp;lt;+64&amp;gt; // if so, skip
&amp;lt;+52&amp;gt;:	bl      0x9287f864 &amp;lt;_Z24RegisterAsDockClientPrivv&amp;gt; // else initialize
&amp;lt;+56&amp;gt;:	li      r0,1           // and set flag
&amp;lt;+60&amp;gt;:	stb     r0,-3364(r28)  //   as being intialized
&amp;lt;+64&amp;gt;:	mr      r3,r30
&amp;lt;+68&amp;gt;:	mr      r4,r29
&amp;lt;+72&amp;gt;:	bl      0x928d2c68 &amp;lt;SyncPlatformWindowTitle&amp;gt; // call with (WindowData, new title)
&amp;lt;+76&amp;gt;:	lwz     r0,344(r30)    // pull (WindowData + 344)
&amp;lt;+80&amp;gt;:	andis.  r2,r0,64       // and pull a flag bit out of it (minimized?)
&lt;/pre&gt;&lt;p&gt;
More intuition here. &lt;code&gt;r30&lt;/code&gt; contains a pointer to the &lt;code&gt;WindowData&lt;/code&gt; class instance, and we're accessing some word 344 bytes in. We don't care about the destination register (we don't touch &lt;code&gt;r2&lt;/code&gt; again this function) but don't miss the name of the opcode: “&lt;code&gt;andis.&lt;/code&gt;” Remember that the period means to update &lt;code&gt;cr0&lt;/code&gt;.
&lt;/p&gt;&lt;p&gt;
Once again, this is obviously a flag (bit-sized this time). But what does it mean? Context tells us that we only call &lt;code&gt;CoreDockSetItemTitle&lt;/code&gt; when it's set. Thus, guessing that it's the is-minimized flag is safe.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+84&amp;gt;:	beq-    0x928d2c38 &amp;lt;+116&amp;gt; // if not minimized, skip this step
&amp;lt;+88&amp;gt;:	addi    r1,r1,80
&amp;lt;+92&amp;gt;:	lwz     r3,196(r30) // load WID
&lt;/pre&gt;&lt;p&gt;
How do I know that &lt;code&gt;WindowData+196&lt;/code&gt; is the CoreGraphics WID? I used Quartz Debug to look at the window list for a sample app. The app only had one window, and the listed WID matched.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+96&amp;gt;:	mr      r4,r29 // load new title
&amp;lt;+100&amp;gt;:	lwz     r0,8(r1)
&amp;lt;+104&amp;gt;:	lmw     r28,-16(r1) // tear down stack frame
&amp;lt;+108&amp;gt;:	mtlr    r0
&amp;lt;+112&amp;gt;:	b       0x92b58ce4 &amp;lt;dyld_stub_CoreDockSetItemTitle&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Note that we're tearing down the stack twice. In this case we're tail calling &lt;code&gt;CoreDockSetItemTitle&lt;/code&gt; so that it's as if our caller called them directly. This is equivalent to the code &lt;code&gt;return CoreDockSetItemTitle(wid, newTitle)&lt;/code&gt;. Note from the setup of &lt;code&gt;r3&lt;/code&gt; and &lt;code&gt;r4&lt;/code&gt; that we can deduce the parameter types. Can we figure out the return type, though? Not really. The calling code ignores it, so we can ignore it too.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+116&amp;gt;:	addi    r1,r1,80
&amp;lt;+120&amp;gt;:	li      r3,0
&amp;lt;+124&amp;gt;:	lwz     r0,8(r1)
&amp;lt;+128&amp;gt;:	lmw     r28,-16(r1)
&amp;lt;+132&amp;gt;:	mtlr    r0
&amp;lt;+136&amp;gt;:	blr
&lt;/pre&gt;&lt;p&gt;
&lt;em&gt;x86&lt;/em&gt;
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+0&amp;gt;:	push   %ebp                   // make stack frame
&amp;lt;+1&amp;gt;:	mov    %esp,%ebp
&amp;lt;+3&amp;gt;:	sub    $0x28,%esp
&amp;lt;+6&amp;gt;:	mov    %ebx,-0xc(%ebp)        // save %ebx
&amp;lt;+9&amp;gt;:	call   0x92e4bbe4 &amp;lt;+14&amp;gt;
&amp;lt;+14&amp;gt;:	pop    %ebx                 // IP &amp;gt; %ebx
&lt;/pre&gt;&lt;p&gt;
We're doing the same trick here to get the PC into a register and I'm a bit stumped as to why. From what I know, the x86 has PC-relative addressing, and surely there's got to be a better way to get the PC into a normal register. Right?
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+15&amp;gt;:	mov    %esi,-0x8(%ebp)      // save %esi
&amp;lt;+18&amp;gt;:	mov    0x8(%ebp),%esi       // WindowData &amp;gt; %esi
&amp;lt;+21&amp;gt;:	mov    %edi,-0x4(%ebp)      // save %edi
&lt;/pre&gt;&lt;p&gt;
This almost looks like it was compiled by a different compiler. In the previous function, &lt;code&gt;edi&lt;/code&gt; and &lt;code&gt;esi&lt;/code&gt; are pushed, and then the stack pointer dropped. Here, we create the stack space and then move the contents of three registers (&lt;code&gt;edi&lt;/code&gt;, &lt;code&gt;esi&lt;/code&gt;, and &lt;code&gt;ebx&lt;/code&gt;). I suspect that things changes once we also have to save &lt;code&gt;ebx&lt;/code&gt;, though I don't know why.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+24&amp;gt;:	mov    %esi,%eax            // %esi (WindowData) &amp;gt; %eax
&amp;lt;+26&amp;gt;:	call   0x92e4bc40 &amp;lt;_Z15GetTitleForDockP10WindowData&amp;gt;
&lt;/pre&gt;&lt;p&gt;
Whoa. If we're calling a function we need to set the parameter via stack-relative addressing off &lt;code&gt;esp&lt;/code&gt;. What's going on here?
&lt;/p&gt;&lt;p&gt;
The point of an ABI is that it's a documented way for functions to call each other. But if a function, say &lt;code&gt;GetTitleForDock(WindowData*)&lt;/code&gt;, is a short one that's not public and is only used under controlled circumstances, why worry about setting up the stack? In this particular case, &lt;code&gt;GetTitleForDock&lt;/code&gt; happens to be a nine-instruction routine. Not worth the hassle of a stack frame, so it's reasonable to pass in the one parameter in &lt;code&gt;eax&lt;/code&gt;.
&lt;/p&gt;&lt;pre&gt;
&amp;lt;+31&amp;gt;:	cmpb   $0x0,0xd51a36c(%ebx) // test initialization boolean
&amp;lt;+38&amp;gt;:	mov    %eax,%edi            // window title &amp;gt; %edi
&amp;lt;+40&amp;gt;:	jne    0x92e4bc0c &amp;lt;+54&amp;gt; // if initialized, skip
&amp;lt;+42&amp;gt;:	call   0x92df9fe0 &amp;lt;_Z24RegisterAsDockClientPrivv&amp;gt; // else initialize
&amp;lt;+47&amp;gt;:	movb   $0x1,0xd51a36c(%ebx) // and set flag as being initialized
&amp;lt;+54&amp;gt;:	mov    %edi,0x4(%esp)       // new title (param 2)
&amp;lt;+58&amp;gt;:	mov    %esi,(%esp)          // WindowData (param 1)
&amp;lt;+61&amp;gt;:	call   0x92e4bc52 &amp;lt;SyncPlatformWindowTitle&amp;gt;
&amp;lt;+66&amp;gt;:	xor    %eax,%eax            // clear %eax (noErr?)
&amp;lt;+68&amp;gt;:	testb  $0x2,0x159(%esi)     // test flag (WindowData + 0x159) (minimized?)
&amp;lt;+75&amp;gt;:	je     0x92e4bc35 &amp;lt;+95&amp;gt; // if not minimized, skip this step
&amp;lt;+77&amp;gt;:	mov    %edi,0x4(%esp)       // new title (param 2)
&amp;lt;+81&amp;gt;:	mov    0xc4(%esi),%eax      // (WindowData + 0xC4) WID
&amp;lt;+87&amp;gt;:	mov    %eax,(%esp)          // (param 1)
&amp;lt;+90&amp;gt;:	call   0xa0a52ad1 &amp;lt;dyld_stub_CoreDockSetItemTitle&amp;gt;
&amp;lt;+95&amp;gt;:	mov    -0xc(%ebp),%ebx
&amp;lt;+98&amp;gt;:	mov    -0x8(%ebp),%esi
&amp;lt;+101&amp;gt;:	mov    -0x4(%ebp),%edi
&amp;lt;+104&amp;gt;:	leave  
&amp;lt;+105&amp;gt;:	ret    
&lt;/pre&gt;&lt;p&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;br /&gt;
&lt;br /&gt;Yes, x86 assembly sucks. Having only two parameters rather than three for an opcode is a pain. Having only six general-purpose registers for use instead of twenty or so is a real pain.
&lt;/p&gt;&lt;p&gt;
But really, come on. You're not writing it. You're reading it.
&lt;/p&gt;&lt;p&gt;
It's compiler-generated. Nothing fancy.
&lt;/p&gt;&lt;p&gt;
Hold your horror. x86 isn't that bad.
&lt;/p&gt;&lt;p&gt;--Avi&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=e3tf9poW61s:aR4e7Tv8vbg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=e3tf9poW61s:aR4e7Tv8vbg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=e3tf9poW61s:aR4e7Tv8vbg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=e3tf9poW61s:aR4e7Tv8vbg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/e3tf9poW61s" height="1" width="1"/&gt;</description>
<dc:subject>Macintosh</dc:subject>
<dc:creator>Avi</dc:creator>
<dc:date>2009-05-16T15:15:14-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/05/16/reverseengineering_in_os_x_on_x86.html</feedburner:origLink></item>
<item rdf:about="http://www.drissman.com/blog/archives/2009/05/14/in_the_beginning.html">
<title>In the beginning...</title>
<link>http://feeds.drissman.com/~r/driss-a-blog-full/~3/0XCP02HWU08/in_the_beginning.html</link>
<description>&lt;p&gt;My mom has always said that each person consists of four parts: the emotional, the physical, the mental, and the physical, and that you need to &amp;quot;feed&amp;quot; each part in order to stay balanced. I work out regularly, I read all the time and learn a lot practicing law, I look over myself emotionally, but I have been negligent with my spiritual side. I have had a rough go of things the past two and a half years, and decided that I had reached the last straw. Though I understand that I'm not truly in control of my life (G-d is), I do have some say in the matter, and thus, decided 2009 was my year, the year where I regain control of my life and who I really am. I started studying Torah (Old Testament) with Rabbi Shea Werner this week.&lt;/p&gt;&lt;p&gt;Rabbi Werner and I read the first sentence of Bereshis and the commentary by Rashi. We learned that the first sentence and Parshas Bereshis is at the beginning of the Torah for several reasons. It’s not &lt;strong&gt;&lt;u&gt;just &lt;/u&gt;&lt;/strong&gt;establishing the fundamentals and starting the story at the beginning. It’s more than &lt;strong&gt;&lt;u&gt;just &lt;/u&gt;&lt;/strong&gt;an answer to why the Land of Israel belongs to the Jewish people (Hashem created it and can give it to, or take it away from, whomever he’d like). Rather, it’s an answer to the question of Why with a capital &lt;span class="caps"&gt;W. &lt;/span&gt;Why are we here? What are the Jewish people supposed to accomplish? How do we go about doing that?&lt;/p&gt;

&lt;p&gt;Bereshis exemplifies the end goal of the entire Torah, to transform and elevate the physical world with the spiritual holiness of the universe through Torah and mitzvot (commandments). It is also a microcosm of the rest of the Torah and of the past, present, and future. Since Hashem created the Land of Israel (as well as the rest of the world) and gave it first to other nations, physical conquering doesn’t matter; we see it happen all the time – &lt;em&gt;the physical is not what’s important&lt;/em&gt;. But just as Hashem wanted to give the Land first to other people, he also wanted us to go in afterwards and take it from them. The Jewish people came into possession of it (when Hashem gave it to us) when it was merely physical (though there is a specific reason why the Land of Israel in particular was given to us), and we worked hard to elevate the Land. It was an example of what the Jewish people are supposed to do, supposed to end up doing – being a conduit, taking the physical (whether or not others are controlling it), bringing holiness from the universe to it through Torah and mitzvot, and thus, elevating it and everything around us... bringing us and others closer to our Creator.&lt;/p&gt;

&lt;p&gt;The Jewish people went into Israel where others were, took it, and cleaned and elevated it to a godly level. We are also supposed to do that with the rest of the world (it is possible to spiritually elevate something without physically taking possession of it, but Bereshis demonstrates that we can if we need to, and, in fact, &lt;em&gt;are supposed to&lt;/em&gt;). That’s why the Land &lt;span class="caps"&gt;HAD&lt;/span&gt; to be occupied by other people first. It had to be shown to the Jewish people (as well as others) that possession and the physical is (1) dictated by Hashem; (2) trumped by the spiritual; and (3) &lt;em&gt;that the Jewish people were/are supposed to proactively step in and be the cause of the change (and not feel fear or guilt about that role&lt;/em&gt;). Had the Jewish people already been in Israel, the lesson would have been lost. Bereshis would not have reflected, and been a microcosm for, what has to continue happening. You can’t get to the end of something without knowing what the end is, and you cannot do a job if you are not informed as to how to do it. Bereshis demonstrates exactly what the end is supposed to be, and how the Jewish people are supposed to do it.&lt;/p&gt;&lt;p&gt;--Talya&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=0XCP02HWU08:QeAh0lAXOFM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=0XCP02HWU08:QeAh0lAXOFM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.drissman.com/~ff/driss-a-blog-full?a=0XCP02HWU08:QeAh0lAXOFM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/driss-a-blog-full?i=0XCP02HWU08:QeAh0lAXOFM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/driss-a-blog-full/~4/0XCP02HWU08" height="1" width="1"/&gt;</description>
<dc:subject>Israel</dc:subject>
<dc:creator>Talya</dc:creator>
<dc:date>2009-05-14T15:49:47-05:00</dc:date>
<feedburner:origLink>http://www.drissman.com/blog/archives/2009/05/14/in_the_beginning.html</feedburner:origLink></item>


</rdf:RDF>
