Why does an error occur during compilation? :
"Instruction does not allow NEAR indirect addressing"
The address to which the jump occurs is correct
My crystal ball is not working right now, but it might help if you posted at least the line that the assembler doesn't like.
hello alex-rudenkiy;
please, can you post an example so we can analise that brother.
Masm send as error/warning report line based.
Near to me means so so 128 bytes I think of instruction, 127?, (you start counting from 0 or 1? ) if that address space grow so far way will happen.
Jump to a label.
The near jump error sometimes takes place when you try to do a LOOP or a conditional jump for more than a near jump, then you have to change your jump in such a way that the far jump is for unconditional jump "JMP"
I am pleased to see that so many crystal balls are still working :t
Quote from: jj2007 on July 02, 2017, 07:05:51 PM
I am pleased to see that so many crystal balls are still working :t
:biggrin: :biggrin:
Well, I once again tried, like, it turned out, but, as it were, not. Why did the Nops move?
My crystal ball is a bit foggy at the moment, try this.
mov eax, address
jmp eax
You like complicate matters, huh? Instead of code, images. Anyway, if you want to jump somewhere, why not put a label there? It's the simplest way
jmp easy_label
....
easy_label:
nop
nop
nop
Okay, thanks, I overdid something :biggrin:
.code
start:
call that_addr
that_addr:
pop eax
sub eax, that_addr - start
;...
push start ;fake call
ret
Quote from: caballero on July 02, 2017, 08:16:01 PMif you want to jump somewhere, why not put a label there?
That sounds so easy, but if you don't have the source code, it can be quite difficult.