Skip to content

Instantly share code, notes, and snippets.

@greneholt
Created February 21, 2012 09:11
Show Gist options
  • Save greneholt/1875338 to your computer and use it in GitHub Desktop.
Save greneholt/1875338 to your computer and use it in GitHub Desktop.
Hack assembly C instruction regex
\A
(?:(?=[AMD])(A?M?D?)=)? # destination
(
[AMD][+\-&|][AMD1] | # binary operations
[\-!]?[AMD01] # unary operations
)
(?:;J([GL][ET]|EQ|NE|MP))? # jump
\Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment