tag:blogger.com,1999:blog-8237815422107266951.post4211505155125700460..comments2020-01-09T10:38:41.163+01:00Comments on MiscellaneouZ: On moving registerNicohttp://www.blogger.com/profile/05080355975786609839noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8237815422107266951.post-87233967805904739512013-08-27T16:26:36.605+02:002013-08-27T16:26:36.605+02:00Linux uses AT&T assembly.
An example of Intel...Linux uses AT&T assembly.<br /><br />An example of Intel mnemonic:<br /><br />mov ebp, esp<br /><br />MOV EBP ESP<br />10001011 11 101 100 = 8BEC<br /><br />The same in AT&T:<br /><br />MOV %ESP %EBP<br />10001001 100 101<br /><br />8B makes more sense in Intel mnemonics, 89 in AT&T.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8237815422107266951.post-85662773735866661362010-03-01T01:27:35.075+01:002010-03-01T01:27:35.075+01:00it's also encoded in a more 'natural' ...it's also encoded in a more 'natural' way, I mean MOV DST,SRC and the destination register in on the right and the source on the left ;)<br /><br />0x8B, 0xC0 | (DST << 3) | SRC<br /><br />vs<br /><br />0x89, 0xC0 | (SRC << 3) | DST<br /><br />I'm curious how is it implemented in GCC for AT&T syntax, I bet it's encoded as 0x89 :P<br /><br />bw | www.pelock.com ;)Anonymousnoreply@blogger.com