{"id":15688,"date":"2016-08-29T12:56:52","date_gmt":"2016-08-29T16:56:52","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=15688"},"modified":"2016-08-29T13:07:49","modified_gmt":"2016-08-29T17:07:49","slug":"mov-is-turing-complete","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/08\/29\/mov-is-turing-complete\/","title":{"rendered":"mov Is Turing-complete"},"content":{"rendered":"<p><a href=\"http:\/\/www.cl.cam.ac.uk\/%7Esd601\/papers\/mov.pdf\">Stephen Dolan<\/a> (PDF, via <a href=\"https:\/\/twitter.com\/emilyst\/status\/769046663935750144\">Emily St.<\/a>):<\/p>\n<blockquote cite=\"http:\/\/www.cl.cam.ac.uk\/%7Esd601\/papers\/mov.pdf\"><p>\nIt is well-known that the x86 instruction set is baroque, overcomplicated, and redundantly redundant. We show just how much fluff it has by demonstrating that it remains Turing-complete when reduced to just one instruction.<\/p>\n<p>The instruction we choose is mov, which can do both loads and stores. We use no unusual addressing modes, self-modifying code, or runtime code generation. Using just this instruction (and a single unconditional branch at the end of the program to make nontermination possible), we demonstrate how an arbitrary Turing machine can be simulated.<\/p><\/blockquote>\n<p><a href=\"https:\/\/github.com\/xoreaxeaxeax\/movfuscator\/\">movfuscator<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/xoreaxeaxeax\/movfuscator\/\"><p>The M\/o\/Vfuscator (short &lsquo;o&rsquo;, sounds like &ldquo;mobfuscator&rdquo;) compiles programs into &ldquo;mov&rdquo; instructions, and only &ldquo;mov&rdquo; instructions. Arithmetic, comparisons, jumps, function calls, and everything else a program needs are all performed through mov operations; there is no self-modifying code, no transport-triggered calculation, and no other form of non-mov cheating.<\/p><\/blockquote>\n<p>Update (2016-08-29): <a href=\"https:\/\/twitter.com\/rosyna\/status\/770305834815410176\">Rosyna Keller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/rosyna\/status\/770305834815410176\"><p>As is <a href=\"https:\/\/github.com\/xoreaxeaxeax\/movfuscator\/blob\/master\/post\/xor.py\">xor<\/a><\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Stephen Dolan (PDF, via Emily St.): It is well-known that the x86 instruction set is baroque, overcomplicated, and redundantly redundant. We show just how much fluff it has by demonstrating that it remains Turing-complete when reduced to just one instruction. The instruction we choose is mov, which can do both loads and stores. We use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[770,255,263,260,71],"class_list":["post-15688","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-assembly-language","tag-compiler","tag-theory","tag-processors","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/15688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=15688"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/15688\/revisions"}],"predecessor-version":[{"id":15694,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/15688\/revisions\/15694"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=15688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=15688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=15688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}