long jump in tasm

Reply

Join Date: Sep 2007
Posts: 33
Reputation: carson myers has a little shameless behaviour in the past 
Solved Threads: 1
carson myers carson myers is offline Offline
Light Poster

long jump in tasm

 
0
  #1
Dec 8th, 2008
how do I do it?

I'm trying to make a conditional jump to a label:

jz newmm

but tasm says that the relative jump is out of range by 000D bytes. How do I change this to a long jump? How can I make it jump to an address, rather than a relative position in the memory?
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: long jump in tasm

 
0
  #2
Dec 9th, 2008
Relative jumps are for small jumps, like you would use for if/else or loops.

So if you're using a relative jump which is out of range, perhaps take a hint that the body of your code is too complicated.

Or if you think it's still OK, then invert the test, so you branch over an actual jump.
jnz skip
jmp newmm
skip:
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 33
Reputation: carson myers has a little shameless behaviour in the past 
Solved Threads: 1
carson myers carson myers is offline Offline
Light Poster

Re: long jump in tasm

 
0
  #3
Dec 10th, 2008
okay thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC