Can we store our current IP automatic in a .s file?

Discussion in '3DS - Homebrew Development and Emulators' started by Linkboy007, Aug 21, 2016.

  1. Linkboy007
    OP

    Linkboy007 GBAtemp Regular

    Member
    166
    99
    Jul 24, 2016
    Gambia, The
    Please I really really need help... You get credit in Project Heaven for Local Hosting of get_ropbin_payload.php we need to store the pc's ip in a string in a .s file... Is there a way to do it?

    Remember we are gbatemp :)
     
  2. machinamentum

    machinamentum GBAtemp Regular

    Member
    163
    450
    Jul 5, 2015
    United States
    If by .s you mean an assembly file and you're using the GNU assembler (the one that comes with devkitARM), you could just use the .ascii directive to embed a string in-place or .asciz to embed the string with a null terminator at the end (see http://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html).
     
  3. Linkboy007
    OP

    Linkboy007 GBAtemp Regular

    Member
    166
    99
    Jul 24, 2016
    Gambia, The
    yeah... I don't need this anymore sorry ^^" but we have Problem we can't run make we get error: 3ds_arm11code.s:1908: Error: branch out of range please we need help... this is the last step for project heaven :/
     
    olec04 likes this.
  4. olec04

    olec04 Working on Project Heaven!

    Banned
    851
    142
    Apr 10, 2015
    United States
    Trying to downgrade on 11.0 via AM services
    I can post a screenshot
     
    Linkboy007 likes this.
  5. machinamentum

    machinamentum GBAtemp Regular

    Member
    163
    450
    Jul 5, 2015
    United States
    Most branch instructions encode an offset from the current instruction pointer to the target in the instruction itself. You're getting this error because there's too much data between your branch and its target (I don't know off the top of my head what the maximum number of bytes can be between the branch and its target). Would need to see what your code looks like to try to work out a fix
     
    olec04 likes this.
  6. Linkboy007
    OP

    Linkboy007 GBAtemp Regular

    Member
    166
    99
    Jul 24, 2016
    Gambia, The
    Yeah I looked it up and maximum is 16 megabytes and the file is 52 kilobyte
     
    olec04 likes this.