flat assembler
Message board for the users of flat assembler.
Index
> MenuetOS > relative jump out of range |
Author |
|
eet_1024 12 Jan 2004, 23:15
Do you have that problem with fasm?
Fasm automatically decides which type of jump to use. |
|||
12 Jan 2004, 23:15 |
|
Chemist 13 Jan 2004, 00:08
[quote="eet_1024"]Do you have that problem with fasm?
Yes, i have this problem with fasm. I decided to use dec ecx cmp ecx,0 je ... jmp loop123 instead of loop loop123 and everything is ok now. |
|||
13 Jan 2004, 00:08 |
|
JohnFound 13 Jan 2004, 00:41
Chemist wrote: Yes, i have this problem with fasm. I decided to use dec ecx cmp ecx,0 je ... jmp loop123 instead of loop loop123 and everything is ok now. Well, AFAIK, loop is the only instruction where you can get this error. It is because loop have only short form of addressing. Every other jumps (conditional and unconditional) will be optimised by FASM, unless you set the exact operand size. Regards. |
|||
13 Jan 2004, 00:41 |
|
comrade 13 Jan 2004, 01:31
loop can only go +/- 127 bytes
|
|||
13 Jan 2004, 01:31 |
|
Bitdog 18 Jan 2004, 15:52
Hello. I'm a newbe 2 Fasm, but doesn't "DEC" set the Zero Flag ?
Quote: "dec ecx cmp ecx,0 je ... jmp loop123 instead of loop " Which makes the CMP redundant ? I don't know about Fasm, BUT Nasm allows NEAR/WORD conditional jumps? DEC ECX JNZ NEAR LABEL ;loop near +-0xFFFF bytes. Fantastic Fasm appears to use size as: DEC ECX JNZ WORD LABEL But then, this might be a final solution? DEC ECX JZ ENDloop JMP LOOPtop ENDloop: I hope I haven't overstepped my boundries here? But looked at MenuetOS yesterday for the first time, & it was a life altering event. I converted all my old PROCs to Fasm last night, and todays goal is to learn more Fasm MenuetOS, like how to get it to do something. (Show fonts, load from HD, run a program, etc.) (Generic newbe troubles.......... Bitdog |
|||
18 Jan 2004, 15:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.