
{"id":2226,"date":"2010-07-27T20:32:43","date_gmt":"2010-07-27T15:02:43","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=2226"},"modified":"2010-07-27T20:32:43","modified_gmt":"2010-07-27T15:02:43","slug":"test-instruction","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/07\/27\/test-instruction\/","title":{"rendered":"test instruction +"},"content":{"rendered":"<h4> | GDB shows  TEST  instruction | <\/h4>\n<p><\/p>\n<pre>\n\nDump of assembler code for function *__GI___poll:\n   0x00007f73ec2120b0 :\tsub    $0x28,%rsp\n   0x00007f73ec2120b4 :\tmov    0x29c52e(%rip),%eax        # 0x7f73ec4ae5e8 \n   0x00007f73ec2120ba :\ttest   %eax,%eax\n   0x00007f73ec2120bc :\tjne    0x7f73ec2120d5 \n   0x00007f73ec2120be :\tmovslq %edx,%rdx\n   0x00007f73ec2120c1 :\tmov    $0x7,%eax\n   0x00007f73ec2120c6 :\tsyscall\n   0x00007f73ec2120c8 :\tcmp    $0xfffffffffffff000,%rax\n   0x00007f73ec2120ce :\tja     0x7f73ec212121 \n   0x00007f73ec2120d0 :\tadd    $0x28,%rsp\n   0x00007f73ec2120d4 :\tretq\n   0x00007f73ec2120d5 :\tmov    %edx,0x8(%rsp)\n   0x00007f73ec2120d9 :\tmov    %rsi,0x10(%rsp)\n   0x00007f73ec2120de :\tmov    %rdi,0x18(%rsp)\n   0x00007f73ec2120e3 :\tcallq  0x7f73ec229b50 \n   0x00007f73ec2120e8 :\tmov    0x8(%rsp),%edx\n   0x00007f73ec2120ec :\tmov    %eax,%r8d\n   0x00007f73ec2120ef :\tmov    0x10(%rsp),%rsi\n   0x00007f73ec2120f4 :\tmov    0x18(%rsp),%rdi\n   0x00007f73ec2120f9 :\tmov    $0x7,%eax\n   0x00007f73ec2120fe :\tmovslq %edx,%rdx\n   0x00007f73ec212101 :\tsyscall\n<\/pre>\n<h4> test   %eax,%eax <\/h4>\n<p><\/p>\n<h4> Process Invovled <\/h4>\n<p>\nDownloading Using a Torrent File.<\/p>\n<pre>\nfile:     gnewsense-livecd-deltah-i386-2.3.iso                                                                              |\n| size:     643,176,448 (613.38 MiB)                                                                                          |\n| dest:     \/home\/jeffrin\/Downloads\/gnewsense-livecd-deltah-i386-2.3.iso                                                      |\n| progress: ##_______________________________________________________________________________________________________________ |\n| status:   finishing in 1:32:50 (1.9%)                                                                                       |\n| dl speed: 112.3 KB\/s                                                                                                        |\n| ul speed: 0.0 KB\/s                                                                                                          |\n| sharing:  0.000  (0.0 MB up \/ 11.8 MB down)                                                                                 |\n| seeds:    11 seen now, plus 0.018 distributed copies                                                                        |\n| peers:    0 seen now, 0.0% done at 1382.9 kB\/s\n<\/pre>\n<p><\/p>\n<h4> Explanation <\/h4>\n<pre>\nIn the x86 assembly language, the TEST instruction performs a bitwise\nAND on two operands. The flags SF, ZF, PF, CF, OF and AF are modified\nwhile the result of the AND is discarded. There are 9 different opcodes\nfor the TEST instruction depending on the type and size of the\noperands. It can compare 8bit, 16bit or 32bit values. It can also\ncompare registers, immediate values and register indirect values.[1]\n\nsource : http:\/\/en.wikipedia.org\/wiki\/TEST_(x86_instruction)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>| GDB shows TEST instruction | Dump of assembler code for function *__GI___poll: 0x00007f73ec2120b0 : sub $0x28,%rsp 0x00007f73ec2120b4 : mov 0x29c52e(%rip),%eax # 0x7f73ec4ae5e8 0x00007f73ec2120ba : test %eax,%eax 0x00007f73ec2120bc : jne 0x7f73ec2120d5 0x00007f73ec2120be : movslq %edx,%rdx 0x00007f73ec2120c1 : mov $0x7,%eax 0x00007f73ec2120c6 : syscall 0x00007f73ec2120c8 : cmp $0xfffffffffffff000,%rax 0x00007f73ec2120ce : ja 0x7f73ec212121 0x00007f73ec2120d0 : add $0x28,%rsp 0x00007f73ec2120d4 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/07\/27\/test-instruction\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;test instruction +&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":-1,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[566,811,950,1035,1525,1563],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2226"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=2226"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2226\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=2226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=2226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=2226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}