flat assembler
Message board for the users of flat assembler.
Index
> Main > Backward short jmp problem in long mode |
Author |
|
kohlrak 04 Jan 2007, 04:24
Code: use64 format PE gui include 'FASMDIRECTORY\include\win32ax.inc' entry start section '.code' readable executable start: @@: jmp @b invoke ExitProcess, 0 section '.import' import readable writeable library kernel, 'kernel32.dll' import kernel, ExitProcess, 'ExitProcess' Not dos, but since you posted this in the main forum i'm assuming that you're not restricting it to DOS. Well, the above code works, though i usually don't use @b. I think that should referance an anonymous lable that was declared before the last declared label. Perhaps you want to use jmp @@. |
|||
04 Jan 2007, 04:24 |
|
fonolite 04 Jan 2007, 08:11
I made a coff object with use64.
But really backward jmp has a problem with new 1.67.18 fasm. |
|||
04 Jan 2007, 08:11 |
|
vid 04 Jan 2007, 08:38
fonolite:
did you create 64bit coff? Code: format MS64 COFF |
|||
04 Jan 2007, 08:38 |
|
fonolite 04 Jan 2007, 23:43
Thanks vid,
MS64 COFF does work for backward jmp. But I must use COFF, because my 16bit linker(dos programming) can't recognize MS64 COFF. (Exactly coff2omf doesn't.) ( my program : COFF(use64) -> COFF2OMF -> MS 16bit linker 5.60 + 16bit omf objects) What's wrong with backward jmp in use64 COFF? It works fine with fasm 1.67.14. |
|||
04 Jan 2007, 23:43 |
|
LocoDelAssembly 05 Jan 2007, 01:24
Quote: version 1.67.15 (Nov 20, 2006) Maybe the reason of your problem is using a 32-bit address on an instruction requiring a 64-bit address. Edit: though, a clarification of what exactly happens is welcomed. Tomasz |
|||
05 Jan 2007, 01:24 |
|
Tomasz Grysztar 05 Jan 2007, 09:33
First of all: it doesn't depend on whether it is a backward jump or forward jump, you must have been misled by some additional factors.
As for why this kind of error happens, it is possible that I was a bit too paranoid with sanity checks. I will look into this later. |
|||
05 Jan 2007, 09:33 |
|
Tomasz Grysztar 10 Feb 2007, 13:32
Corrected in 1.67.19. It appears that one of the check was not doing exactly what I intended because of a swap in values.
|
|||
10 Feb 2007, 13:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.