Search code examples
assemblytasm

Relative Jump Out of Range Error


How can I fix the "relative jump out of range" error without inbetween jumps? Like stretching the jump range? I heard about something called long jump or something like that that uses 32-bit instead of the regular 16.


Solution

  • However, I found two useful solutions to resolve the error. The first and used by me is TASM.cfg. In TASM, what you'd want to do is to open the TASM/BIN folder, create a file named TASM.cfg and enter your commands in there, or as I did: /jJUMPS. Then, you only send the command tasm file and it should work automatically.

    The second solution is file.cmd. What you'd want to do is to open the TASM/BIN folder, create a file named file.cmd (or more preferably like your program name) and write the following lines in there:

    /jJUMPS
    YOUR_ASM_FILENAME (WITHOUT EXTENSION)
    

    Then, you send the following command in the command line: tasm @file.cmd.

    Hopefully it helped most of you that get stuck on it too and don't want to make inbetween jumps.