{"id":108,"date":"2016-02-22T08:44:29","date_gmt":"2016-02-22T08:44:29","guid":{"rendered":"https:\/\/oldcodetricks.wordpress.com\/?p=108"},"modified":"2016-02-22T08:44:29","modified_gmt":"2016-02-22T08:44:29","slug":"shorty-680x0-with-x86-data","status":"publish","type":"post","link":"https:\/\/mrgadget.nexus\/oldcodetricks\/2016\/02\/22\/shorty-680x0-with-x86-data\/","title":{"rendered":"Shorty &#8211; 680&#215;0 with x86 data"},"content":{"rendered":"<p>So those pesky Intel chips put the least significant byte first, and your super efficient 680&#215;0 code needs to translate? Easy! Rotate, swap, rotate.<\/p>\n<p>This takes advantage that the 680&#215;0 32-bit registers can be operated on as if they are 16-bit, at least with certain instructions, using the &#8220;.w&#8221; (word) suffix. Suppose we start with hex 44332211<\/p>\n<p>rol.w #8,d0 ; rotate the lowest 16-bits by 8 &#8211; 44331122<\/p>\n<p>swap d0 ; swap lowest and highest 16-bits &#8211; 11224433<\/p>\n<p>rol.w #8,d0 ; again rotate the lowest 16-bits &#8211; 11223344<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So those pesky Intel chips put the least significant byte first, and your super efficient 680&#215;0 code needs to translate? Easy! Rotate, swap, rotate. This takes advantage that the 680&#215;0 32-bit registers can be operated on as if they are 16-bit, at least with certain instructions, using the &#8220;.w&#8221; (word) suffix. Suppose we start with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mrgadget.nexus\/oldcodetricks\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}