Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # not-incredibly-bloated exi code copied from kenobiwii.s (which is for PPC).
- # If I use this code with the custom ios toolkit (i.e. from c: exisendbuf(4, "hello")), it randomly either works or sends crap to the gecko.
- # The old thumb version was a lot more reliable, for some reason. Maybe just because it was slower? that doesn't really make sense
- .globl _main
- .arm
- _main:
- exisendbuf:
- cmp r0, #4
- bxne lr
- mov r3, r1
- # r3 is the string...
- loop:
- ldrb r0, [r3] ;# ldrsb doesn't do what I think
- add r3, r3, #1 ;# but this could be a postindex
- cmp r0, #0
- bxeq lr
- exisendbyte:
- # r0 should be the byte.
- # r0..r2 get clobbered
- mov r2, #0xB0000000
- orr r2, r2, r0, LSL #20
- # r2 is now 0xB0000000 + (sendbyte<<20)
- mov r1, #0x0d000000 ;# s/d0/d8 fails, but according to Starlet_Memory_Map it should be the same
- add r1, r1, #0x6800
- # r1 is 0x0d006800
- mov r0, #0xd0
- str r0, [r1, #0x14]
- str r2, [r1, #0x24]
- mov r0, #0x19
- str r0, [r1, #0x20]
- exicheckreceivewait:
- ldr r0, [r1, #0x20]
- and r0, r0, #1
- cmp r0, #0
- bne exicheckreceivewait
- ldr r2, [r1, #0x24]
- str r0, [r1, #0x14]
- lsl r2, r2, #26 ;#did it work?
- and r0, r2, #1
- b loop
Add Comment
Please, Sign In to add comment