mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Make examples folder somewhat more focused
This commit is contained in:
parent
5141d00992
commit
e26bdbec52
29 changed files with 133 additions and 1225 deletions
|
@ -16,6 +16,24 @@
|
|||
|
||||
/**
|
||||
* @fileoverview x86 instruction length decoder by way of hex pipe.
|
||||
*
|
||||
* Here's an example of how you can use it to decode a NOP stream:
|
||||
*
|
||||
* $ make -j8 o//examples/x86split.com
|
||||
* $ echo 909090 | o//examples/x86split.com
|
||||
* 90
|
||||
* 90
|
||||
* 90
|
||||
*
|
||||
* If there was a XOR instruction in there, it'd do this:
|
||||
*
|
||||
* $ make -j8 o//examples/x86split.com
|
||||
* $ echo 904531FF90 | o//examples/x86split.com
|
||||
* 90 # NOP
|
||||
* 4531FF # XOR R15D,R15D
|
||||
* 90 # NOP
|
||||
*
|
||||
* Now that you're able to split x86 instructions the rest is easy.
|
||||
*/
|
||||
|
||||
int fgethex(FILE *f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue