Thursday, February 11, 2016

Plugg!ng through Assembly

I really really like this; it's fun. It reminds me of an abacus or some kind of checking/ counting machine...I guess..duh..a computer.
Basically, this is m@chine code; you are talking directly to your machine. Higher level languages allow the user to speak human-speak (haha) and that is converted into byte c0de that your computer understands. They actually still hire people who can just write this stuff at places like Intel, etc. However, people learning to h@ck also learn this, too, because well...you can really understand your machine and do all sorts of neat h@cks that way!

So for example, cmp takes the values of ax and bx and compares them. Based on the comparison, it will skip certain blocks of code, using the jne function. This tally is reflected in the fl@gs, which essentially keep count. The number 64 in blue is actually the hex value for 100; it's not a literal "64" in decimal, btw.  This is basically how your machine thinks. It's awesome.











So this one here added cx and ax, which both contain one each, for a total of 2.
This command will (jcxz) will only skip to the l2 lable and evaluate dx as one if the value of cx and dx is zero. In this case, as you can see, 1+1 =2, so it did not skip and evaluate dx as 1, but instead evaluated it as 6. Well..one of these images shows that. Sorry..the text is tiny once the images load :)






No comments:

Post a Comment