diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-01-21 17:46:26 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-01-23 17:24:43 +0100 |
| commit | 7ce340c2e62d985e92c42add8ffc385d54360a91 (patch) | |
| tree | 920c6d567ba941b92a4aba3cfeec72c0e80bf92c /example/samples/x86_32_manip_ptr.S | |
| parent | 9206458e0f4b815e4af68f8978d96d14632a087f (diff) | |
| download | miasm-7ce340c2e62d985e92c42add8ffc385d54360a91.tar.gz miasm-7ce340c2e62d985e92c42add8ffc385d54360a91.zip | |
Example/ASM: Extract asm sources to sample dir
Diffstat (limited to 'example/samples/x86_32_manip_ptr.S')
| -rw-r--r-- | example/samples/x86_32_manip_ptr.S | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/example/samples/x86_32_manip_ptr.S b/example/samples/x86_32_manip_ptr.S new file mode 100644 index 00000000..43e4ed73 --- /dev/null +++ b/example/samples/x86_32_manip_ptr.S @@ -0,0 +1,50 @@ +main: + PUSH EBP + MOV EBP, ESP + SUB ESP, 0x100 + MOV EAX, 0x1337 + ; test ptr manip + LEA ESI, DWORD PTR [mystr^toto] + CALL toto +mystr: +.string "test string" + toto: + POP EDI + + PUSH EDI + ; test scasb + XOR EAX, EAX + XOR ECX, ECX + DEC ECX + REPNE SCASB + NOT ECX + DEC ECX + + ; test movsb + POP ESI + LEA EDI, DWORD PTR [EBP-0x100] + REPE MOVSB + + ; test float + PUSH 0 + FLD1 + FLD1 + FADD ST, ST(1) + FIST DWORD PTR [ESP] + POP EAX + + ; test cond mnemo + NOP + NOP + CMOVZ EAX, EBX + ; test shr + NOP + SHR EAX, 1 + NOP + NOP + SHR EAX, CL + NOP + + MOV ESP, EBP + POP EBP + RET |