When I assemble this code, I get a warning (see below).
CODE SECTION
Start:
jmp > L1
DB 128 DUP 90h
L1:
ret
GoAsm.Exe Version 0.57.0.2 - Copyright Jeremy Gordon 2001/12 - JG@JGnet.co.uk
Error!
Line 6 of assembler source file (jmp.asm):-
Forward short jump was to a place more than 127 bytes away (by 1 byte)
jmp > L1
In version 0.56 it would have been "line 4", i.e. the line where the actual JMP instruction is that should be fixed. Now it is the line with the destination label. Is this a bug or by design? If I have several JMPs to this label, I will have to guess which of them I must change. In 0.56 I used to fix the one mentioned and those that were above it.
I tracked this one down and that change doesn't seem related to any of the fixes for earlier revisions. So I would say more of a bug given that 'Line 4' is displayed... with an easy fix forwarded to Jeremy for inclusion in GoAsm version 0.57.0.3.
Hi Yuri
Yes, it's true. Wayne tracked down the bug fixed it and sent the source back to me!
So GoAsm 0.57.0.3 is available from here (http://www.godevtool.com/Goasm.zip).
Thanks Wayne!
Thanks! :8)
Hi
But a jump (jmp ) Must the target maximum of 126 bytes before and 127 bytes after the JMP instruction.
Or not?
Quote from: ragdog on March 01, 2012, 06:58:24 AM
Hi
But a jump (jmp ) Must the target maximum of 126 bytes before and 127 bytes after the JMP instruction.
Or not?
Only short jumps.
QuoteBut a jump (jmp ) Must the target maximum of 126 bytes before and 127 bytes after the JMP instruction.
the target is referenced to the first byte following the JMP instruction
for SHORT JMP's, the target may be -128 to +127 bytes from that address
the same applies to SHORT Jcc conditional branches