2 ms·
Cool, but what program is it running?
by jensgk 4y ago
Cool, but what program is it running?
- deleted 4y ago[deleted]
- andrehacker 4y agoFrom Ken Shirriff's blog: https://www.righto.com/2015/12/reverse-engineering-arm1-ancestor-of.html https://www.righto.com/2015/12/reverse-engineering-arm1-ance... When you run the simulator, it executes a short hardcoded program that performs shifts of increasing amounts. You don't need to understand the code, but if you're curious it is: 0000 E1A0100F mov r1, pc @ Some setup 0004 E3A0200C mov r2, #12 0008 E1B0F002 movs pc, r2 000C E1A00000 nop 0010 E1A00000 nop 0014 E3A02001 mov r2, #1 @ Load register r2 with 1 0018 E3A0100F mov r1, #15 @ Load r1 with value to shift 001C E59F300C ldr r3, pointer loop: 0020 E1A00271 ror r0, r1, r2 @ Rotate r1 by r2 bits, store in r0 0024 E2822001 add r2, r2, #1 @ Add 1 to r2 0028 E4830004 str r0, [r3], #4 @ Write result to memory 002C EAFFFFFB b loop @ Branch to loop