Author here.<p>Due to popular request, I extracted the text from the PDF, it's in a gist at the bottom.<p>A funny (on my account) story:<p>After three days with little sleep, the last half-day spent finding just one more byte to remove so it fits in a nice rectangle[1], I was finally done. I sent the complete .asm to Oded Margalit, an IBM researcher who organizes the CodeGuru programming competitions in Israel, and he immediately responded "I can shave 5 bytes off".<p>It turns out instead of the "quit" system call all the books tell you to write:<p><pre><code> ;;; the program has finished
quit:
mov ah, 04ch ; quit with return code
mov al, 0
int 021h
</code></pre>
You can just put a "ret", and DOS loads an address containing these commands to the bottom of your stack so it works.<p>You had to see my reaction.<p>[1] it was supposed to be 32x13 characters at the bottom, after it was done I decided to make it 8x52 characters on the right because it looked better. Had I known I would do it, I could've gone to sleep much earlier...
For those wondering what the program does:<p>TL;DR - The program writes a Brainfuck program that writes the text you inputted. Pretty neat<p>First copy the text of the letter (excluding the x86 interpreter in hex on the right, or in the case of the gist, at the bottom) and run it through an online Brainfuck interpreter. Supply ASCII text input such as "A" and run the program. It will output another Brainfuck program. If you then run the outputted program through the Brainfuck interpreter you will get the same ASCII text.<p>So if you run the code extracted from the letter:<p><pre><code> +++++++++[<+++++>-],[[-<--.++<+>>(]<+.-<[->.<]>>,]
</code></pre>
If input an 'A' the output is:<p><pre><code> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-----------------------------------------------------------------
</code></pre>
which if run returns an 'A'<p>Online interpreter - <a href="http://nayuki.eigenstate.org/page/brainfuck-interpreter-javascript" rel="nofollow">http://nayuki.eigenstate.org/page/brainfuck-interpreter-java...</a>
I have questions:<p>Did the letter work?<p>Program and interpreter and letter, but why not let us with X86 machines cut and paste.<p>What did the program do?
That's great :-) For other teeny DOS BF interpreters, see <a href="http://www.hugi.scene.org/compo/compoold.htm#compo6" rel="nofollow">http://www.hugi.scene.org/compo/compoold.htm#compo6</a> (1999) - smallest was 98 bytes!
My guess is that most HR people would see that and think "Troublemaker", Next..<p>But, then again, maybe you dont want to work for them anyways.