I have the same issue. I grabbed a routine for Protean from MrDollSteak's thread with a bunch of ability routines.
It looks like this:
.text
.align 2
.thumb
.thumb_func
.global protean
AbilityBufferUser:
push {r0-r5}
ldr r0, .Bank
ldrb r0, [r0]
mov r1, #0x58
ldr r2, .BattleData
mul r0, r1
add r2, r0, r2
ldrb r0, [r2]
ProteanCheck:
cmp r0, #0xA9
bne Return
BufferType:
ldrb r0, [r2, #0x1]
ldrb r1, [r2, #0x2]
CheckVariableTypeMoves:
ldr r4, .CheckTypeLoc
ldr r4, [r4]
ldrb r4, [r4, #0x13]
mov r5, #0x3F
and r4, r5
cmp r4, #0x0
beq CheckMove
b CheckSameType
CheckMove:
ldr r3, .MoveIndex
ldrh r3, [r3]
cmp r3, #0xA5
beq Return
GetMoveType:
ldr r4, .MoveData
mov r5, #0xC
mul r5, r3
add r4, r4, r5
ldrb r4, [r4, #0x2]
CheckSameType:
cmp r0, r4
bne ChangeType
cmp r1, r4
beq Return
ChangeType:
strb r4, [r2, #0x1]
strb r4, [r2, #0x2]
ldr r3, =0xFF0003FD
lsl r4, #0x10
add r3, r4
ldr r0, .BufferTypeLoc
str r3, [r0]
BufferMessage:
mov r0, #0x49
ldr r1, .Bank
ldrb r1, [r1]
bl DisplayMessage
Return:
pop {r0-r5}
ldrb r1, [r0]
str r2, [sp]
mov r0, #0x2
mov r2, #0x0
ldr r3, .Return
bx r3
DisplayMessage:
ldr r2, .DisplayMessageBL
bx r2
.align 2
.Bank: .word 0x0202420B
.BattleData: .word 0x020240A4
.MoveIndex: .word 0x020241EA
.CheckTypeLoc: .word 0x0202449C
.MoveData: .word 0x831C898
.BufferTypeLoc: .word 0x02022F58
.Return: .word 0x0804607D
.DisplayMessageBL: .word 0x0803F965
*Insert 00 49 08 47 xx xx xx 08 at 46074
My issue is that despite writer saying this is a routine, it's never specified if this is ASM that needs to be altered in some way first before trying to compile it into a BIN, because no matter what I do, I cannot get this routine [protean.asm] file compiled to a .bin file, possibly because there are errors in the code. I followed instructions exactly, from scratch, several times, and neither CMD, the thumb.bat, or an online compiler could do it; windows would say the protean.asm does not exist, (it does, trust me), and the online compiler said there are either errors in the code, dangerous instructions, or too large-(its not too large).
The online Converter also said that I cannot have the period ( . ) in any of the source code. Well wtf all the routines posted in that thread have periods, so that can't be right.