Guest User

Untitled

a guest
May 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. .globl _main
  2. .arm
  3. _main:
  4. wat_replacement:
  5. cmp r0, #4
  6. bne lr
  7. mov r3, r1
  8. # r3 is the string...
  9. loop:
  10. ldrsb r0, [r3]
  11. # todo: ldrsb r0, [r3], #1 SHOULD do both of these
  12. add r3, r3, #1
  13. cmp r0, #0
  14. beq done
  15. b exisendbyte
  16. done:
  17. movs pc, lr
  18. exisendbyte:
  19. # r0 should be the byte.
  20. # r0..r2 get clobbered
  21. mov r2, #0xB0000000
  22. orr r2, r2, r0, LSL #20
  23. # r2 is now 0xB0000000 + (sendbyte<<20)
  24. mov r1, #0x0d000000
  25. add r1, r1, #0x6800
  26. # r1 is 0x0d006800
  27. mov r0, #0xd0
  28. str r0, [r1, #0x14]
  29. str r2, [r1, #0x24]
  30. mov r0, #0x19
  31. str r0, [r1, #0x20]
  32. exicheckreceivewait:
  33. ldr r0, [r1, #0x20]
  34. ands r0, r0, #1
  35. bne exicheckreceivewait
  36.  
  37. ldr r2, [r1, #0x24]
  38. str r0, [r1, #0x14]
  39. lsl r2, r2, #26 ;#did it work?
  40. and r0, r2, #1
  41. b loop
Add Comment
Please, Sign In to add comment