The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old January 3rd, 2010 (07:56 PM).
interdpth
I've seen things, man.
 
Join Date: Jul 2004
Usually I steal a piece of code that's about 5 instructions

so I can do a

LDR r3,=myroutine;
MOV r15,r3


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?
__________________
yes, this is doge.

potato is not here.

bye
Reply With Quote
  #2    
Old January 3rd, 2010 (08:51 PM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL
Im comin' home...
Community Supporter Tier 1
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
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...)
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Reply With Quote
  #3    
Old January 3rd, 2010 (09:00 PM).
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
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?
__________________

Brother of Vrai
Reply With Quote
  #4    
Old January 3rd, 2010 (09:14 PM).
ZodiacDaGreat's Avatar
ZodiacDaGreat
Working on a Mobile System
 
Join Date: Feb 2007
Location: South Pacific
Age: 22
Gender: Male
Nature: Relaxed
Send a message via ICQ to ZodiacDaGreat
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
bx r0
__________________
Reply With Quote
  #5    
Old January 3rd, 2010 (09:29 PM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL
Im comin' home...
Community Supporter Tier 1
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
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...
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Reply With Quote
  #6    
Old January 4th, 2010 (05:24 AM).
Juan
Brazilian with a bad English
 
Join Date: Jun 2007
Location: Pindamonhangaba - SP
Age: 23
Nature: Adamant
ldr Rx, offset+1
bx Rx

or

ldr Rx, offset
mov PC Rx
__________________
Reply With Quote
  #7    
Old July 23rd, 2013 (02:06 PM).
Kurapika's Avatar
Kurapika
Grudgebearer
 
Join Date: Feb 2013
Location: Lavendar Town - Morocco
Gender: Male
Nature: Naughty
Quote:
Originally Posted by Juan View Post
ldr Rx, offset+1
bx Rx

or

ldr Rx, offset
mov PC Rx
How do you insert that offset?
I mean, when I try to compile "ldr r0, 0x08900001 bx r0" it threws an error.
Should I do:
ldr r0, .offset
bx r0
.offset: .word 0x8900001

??
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:13 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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.