[ASM]Inserting routines;How do you do them and your problems?
Usually I steal a piece of code that's about 5 instructions
so I can do a
then my routine executes, or i'll just edit some code.
Recently I tried the callasm function and my function executed but died, yet I know the code works.
What to do you guys do? Prefer?
I dunno, cause I'm not quite that ASM savvy yet... Dunno how to do that...
You sure you ended the routine correctly? (Just saying, cause everyone makes mistakes from time to time...)
I haven't delved deeply enough into ASM to require editing of preexisting code but I'm thinking I'll end up using your method because it's so simple^^
I assume that with your method you have to "recreate" the code that you overwrote with the 'ldr' and 'mov' in your custom routine?
Yes, you have to. And you'd also wanna make sure that the registers after executing your code must have the same values. This can be done by push and pop. Here's my way:
ldr r0, .Routine
Ahh... very helpful indeed Zodiac...
See, this is why I like the R&D department... Mature discussion about the finer points of hacking...
Good stuff indeed...
ldr Rx, offset+1
ldr Rx, offset
mov PC Rx
I mean, when I try to compile "ldr r0, 0x08900001 bx r0" it threws an error.
Should I do:
ldr r0, .offset
.offset: .word 0x8900001
|All times are GMT -8. The time now is 6:48 AM.|
© 2002 - 2015 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2015.