about summary refs log tree commit diff stats
path: root/example/asm_arm_sc.py
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2014-07-03 11:32:01 +0200
committerserpilliere <devnull@localhost>2014-07-03 11:32:01 +0200
commita8003c034b1460186d615bbc09cc926168f2c796 (patch)
tree0e57a00115f6b2438b52231e567e98923241f78f /example/asm_arm_sc.py
parent6abe57ac02b5ddecbb1b43afa0b4aefa5230e709 (diff)
downloadmiasm-a8003c034b1460186d615bbc09cc926168f2c796.tar.gz
miasm-a8003c034b1460186d615bbc09cc926168f2c796.zip
Arm: add asm exmaple using $
Diffstat (limited to 'example/asm_arm_sc.py')
-rw-r--r--example/asm_arm_sc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/example/asm_arm_sc.py b/example/asm_arm_sc.py
index 824145fa..3c96742d 100644
--- a/example/asm_arm_sc.py
+++ b/example/asm_arm_sc.py
@@ -31,14 +31,20 @@ blocs, symbol_pool = parse_asm.parse_txt(mn_arm, 'arm', '''
 main:
     MOV R1, R0
     MOV R2, 0x100
+    LDR R3, [PC, mykey1-$]
 loop:
     ADD R2, R1, R2
     ADD R1, R1, 1
-    CMP R1, 0x10
+    LDR R3, [PC, mykey2-$]
+    CMP R1, R3
     BEQ loop
 
     ADD R0, R1, R2
     BX LR
+mykey1:
+.long 0x1
+mykey2:
+.long 0x2
 ''')
 
 # fix shellcode addr