Files
cea-sec-miasm/example/samples/msp430.S
T
Fabrice Desclaux 53d82c13f7 Cpu: modify instructions' offset relative encoding
The assembler will automatically use instruction len in offset computation

In the following instruction:
0x10: EB 02   JMP 0x14

If we assemble this instruction, the requested instruction send to the assembler
engine will be:
JMP +0x4

And will be encoded to:
EB 02

Previously, the assembly of:
JMP +0x4
was:
EB 04
2015-04-01 23:47:37 +02:00

14 lines
221 B
ArmAsm

main:
mov.w 0x10, R10
mov.w 0x0, R11
call func
loop:
add.w 1, R11
sub.w 1, R10
jnz loop
mov.w @SP+, PC
func:
add.w 1, R9
mov.w @SP+, PC