Truth, Computing and Fail

  • Home
  • About

Just to puncture the balloon

anomit | February 13, 2008

Some might have started learning assembly language programming in MASM and maybe already under the impression that finally they are ‘doing some shit’. Well, I don’t want to sound as if I am a know-it-all guy. Even I was under the same impression, and we can’t be blamed. Well, when you see a screen all fluorescent green and bright blue showing the registers and segments getting updated as you trace through the program, you can be excused for feeling on top of the world. That is, if you are a Computer Science student and most importantly think like one too!

Well, sorry for the digression. Coming back to the point, there are two major syntaxes of writing assembly language code for the x86 processors: the AT&T syntax and the Intel syntax itself. For the first one, we can use the GNU assembler in linux with the as command (which is a part of the gcc package) and for the latter, another assembler called NASM is used. In this scenario, assemblers like MASM and TASM don’t exactly fit in and are neither here nor there.

You would say, why should I give a f to the assembler and its syntax as long as it is churning out the binaries. After all, whatever the syntax it would get translated to the same machine code in the end. Sample this, you are stuck on quite a large assembly code and you need some urgent help. You go to an IRC channel, show the guys out there the code and ask them to help you out. Chances are that none of them would be able to help you out. Why? Simply because MASM and TASM syntaxes aren’t exactly standards and so most probably they haven’t even cared to learn them.

Now if you are stuck in the lab using MASM and on top of that debugging using Turbo Debugger (yeah, that Turbo shit!), I would advise that at least use the debugger that comes with DOS. I can say this from my personal experiences. TD will often load the code from some other code segment that you had executed previously rather than the one you want to trace right now. It can be really irritating and for the programs which have almost the same functionality like multiplying two 16-bit numbers and multiplying a 32-bit and a 16-bit number, after you have traced through half the program you realise this is not the program you wanted to trace. I am yet to face any such issues with debug.

Categories
Coding, GNU/Linux
Comments rss
Comments rss
Trackback
Trackback

« LUG in my college Preventing atheros card from being disconnected often »

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What’s in

  • Examining the Linux VDSO
  • Symlinks in a libfs virtual file system: The Pains
  • Small rant on the FUSE API reference
  • Kernel module debugging: a simple technique
  • Vim/Cscope quickie

Blogroll

  • Akshay Kothari
  • Ankur Shrivastav (OS)
  • Ankur Sinha
  • Harsh J
  • Hullap
  • LUG manipal
  • Swap

Tags

aircrack airfail airtel assembly blues build c Coding college country cryptography dean faculty file systems fuckery gnuplot hacking India kernel linux mangalore manipal mpd music NASM plugin politicians pub culture python rant rock sam scheduler simulation SSFNet stupidity supernatural suppression syscall syscalls system calls unix vim xchat xml

Archives

  • April 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • October 2007
  • September 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007

License

Creative Commons License
This work by Anomit Ghosh is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 India License.
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox