Fan Games Hub General discussions about all things fan games. Topics relating to both ROM hacks and custom games are welcome here. Posting links to ROMs is illegal and is not tolerated anywhere on the forum.

Reply
 
Thread Tools
  #1    
Old January 3rd, 2010 (7:56 PM).
interdpth interdpth is offline
I've seen things, man.
     
    Join Date: Jul 2004
    Posts: 275
    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

    Relevant Advertising!

      #2    
    Old January 3rd, 2010 (8:51 PM).
    0m3GA ARS3NAL's Avatar
    0m3GA ARS3NAL 0m3GA ARS3NAL is offline
    Im comin' home...
    • Silver Tier
     
    Join Date: Jan 2008
    Location: Superjail Penitentiary
    Age: 24
    Gender: Male
    Nature: Gentle
    Posts: 1,812
    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 (9:00 PM).
    colcolstyles's Avatar
    colcolstyles colcolstyles is offline
    Yours truly
    • Crystal Tier
     
    Join Date: May 2008
    Location: The Bay Area
    Gender: Male
    Nature: Lonely
    Posts: 1,584
    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 (9:14 PM).
    ZodiacDaGreat's Avatar
    ZodiacDaGreat ZodiacDaGreat is offline
    Working on a Mobile System
       
      Join Date: Feb 2007
      Location: South Pacific
      Age: 24
      Gender: Male
      Nature: Relaxed
      Posts: 429
      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 (9:29 PM).
      0m3GA ARS3NAL's Avatar
      0m3GA ARS3NAL 0m3GA ARS3NAL is offline
      Im comin' home...
      • Silver Tier
       
      Join Date: Jan 2008
      Location: Superjail Penitentiary
      Age: 24
      Gender: Male
      Nature: Gentle
      Posts: 1,812
      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 (5:24 AM).
      Juan Juan is offline
      Brazilian with a bad English
         
        Join Date: Jun 2007
        Location: Pindamonhangaba - SP
        Age: 26
        Nature: Adamant
        Posts: 92
        ldr Rx, offset+1
        bx Rx

        or

        ldr Rx, offset
        mov PC Rx
        __________________
        Reply With Quote
          #7    
        Old July 23rd, 2013 (2:06 PM).
        Kurapika's Avatar
        Kurapika Kurapika is offline
        Grudgebearer
           
          Join Date: Feb 2013
          Location: Lavendar Town - Morocco
          Gender: Male
          Nature: Naughty
          Posts: 406
          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

          Forum Jump


          All times are GMT -8. The time now is 11:14 AM.