Ok, now here i'll adress items (credits to KNIZZ and JPAN).
Starting by repel, pay attention to the comments in the routine (the texts after the @):
080A1998 @ =============== S U B R O U T I N E ======================================= 080A1998 080A1998 080A1998 repel: @ DATA XREF: ROM:item_super_repelo 080A1998 @ ROM:083DBE98o ... 080A1998 PUSH {R4,LR} 080A199A LSLS R0, R0, #0x18 080A199C LSRS R4, R0, #0x18 080A199E LDR R0, =0x4020 080A19A0 BL var_load 080A19A4 LSLS R0, R0, #0x10 080A19A6 CMP R0, #0 @ Checks if there aren't any steps left 080A19A8 BNE loc_080A19CC @ If there are, then says that it's already on effect 080A19AA MOVS R0, #0x29 080A19AC BL music_play @ Plays the "Spray" effect 080A19B0 LDR R0, =callback3table 080A19B2 LSLS R1, R4, #2 080A19B4 ADDS R1, R1, R4 080A19B6 LSLS R1, R1, #3 080A19B8 ADDS R1, R1, R0 080A19BA LDR R0, =(c3_repel+1) 080A19BC STR R0, [R1] 080A19BE B loc_080A19D8 080A19BE @ --------------------------------------------------------------------------- 080A19C0 dword_080A19C0: .long 0x4020 @ DATA XREF: repel+6r 080A19C4 off_080A19C4: .long callback3table @ DATA XREF: repel+18r 080A19C8 off_080A19C8: .long c3_repel+1 @ DATA XREF: repel+22r 080A19CC @ --------------------------------------------------------------------------- 080A19CC 080A19CC loc_080A19CC: @ CODE XREF: repel+10j 080A19CC LDR R2, =aButTheEffectsOfARepelLingeredF @ "But the effects of a REPEL lingered fro"... 080A19CE LDR R3, =(bag_print+1) 080A19D0 MOVS R0, R4 080A19D2 MOVS R1, #2 080A19D4 BL sub_08108E70 080A19D8 080A19D8 loc_080A19D8: @ CODE XREF: repel+26j 080A19D8 POP {R4} 080A19DA POP {R0} 080A19DC BX R0 080A19DC @ End of function repel 080A19DC 080A19DC @ --------------------------------------------------------------------------- 080A19DE .byte 0 080A19DF .byte 0 080A19E0 off_080A19E0: .long aButTheEffectsOfARepelLingeredF 080A19E0 @ DATA XREF: repel:loc_080A19CCr 080A19E0 @ "But the effects of a REPEL lingered fro"... 080A19E4 off_080A19E4: .long bag_print+1 @ DATA XREF: repel+36r 080A19E8 080A19E8 @ =============== S U B R O U T I N E ======================================= 080A19E8 080A19E8 080A19E8 c3_repel: @ DATA XREF: repel+22o 080A19E8 @ repel:off_080A19C8o 080A19E8 PUSH {R4-R6,LR} 080A19EA LSLS R0, R0, #0x18 080A19EC LSRS R6, R0, #0x18 080A19EE BL sub_080723E0 080A19F2 LSLS R0, R0, #0x18 080A19F4 CMP R0, #0 080A19F6 BNE loc_080A1A2A 080A19F8 LDR R4, =var_800E @ Used item number location 080A19FA LDRH R2, [R4] 080A19FC LDR R3, =0xFFFF 080A19FE MOVS R0, #4 080A1A00 MOVS R1, #0 080A1A02 BL sub_080A2294 080A1A06 LDR R5, =0x4020 080A1A08 LDRH R0, [R4] 080A1A0A BL item_get_quality @ Checks if the item is VALID! 080A1A0E MOVS R1, R0 080A1A10 LSLS R1, R1, #0x18 080A1A12 LSRS R1, R1, #0x18 080A1A14 MOVS R0, R5 080A1A16 BL var_set 080A1A1A BL sub_080A1A44 080A1A1E LDR R2, =displayed_string 080A1A20 LDR R3, =(bag_print+1) 080A1A22 MOVS R0, R6 080A1A24 MOVS R1, #2 080A1A26 BL sub_08108E70 080A1A2A 080A1A2A loc_080A1A2A: @ CODE XREF: c3_repel+Ej 080A1A2A POP {R4-R6} 080A1A2C POP {R0} 080A1A2E BX R0 080A1A2E @ End of function c3_repel 080A1A2E
So, now the explanations:
The routine called by the item is the 'repel' function after that, and the routine called every frame after calling the repel one is the 'c3_repel', used obviously for tracking the steps the player has taken!