flat assembler
Message board for the users of flat assembler.

Index > Main > fasm 1.67.21 bug not in 1.64?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1
all the code is now changed, I've now compiled everything with
the new version of fasm and its all functioning fine, Cool
Post 27 Mar 2007, 20:29
View user's profile Send private message Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden
In regards to chaging every jump call use an editor that has
"find/replace all"

ps. I've found that it is allways best to use full syntax with memory operands 'cause you can always read it easily and you xan allways see where its jumping, calling or read/write from

especialy in the case of 16bit segment program
Post 28 Mar 2007, 03:36
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
lazer1 wrote:

one problem I found is that there is no form of "loop label"
which both the earlier fasm and the current fasm accept,

the earlier fasm doesnt accept "loop dword label" but
accepts eg "jmp dword label" and "call dword label",


FASM.TXT wrote:

"loop" instructions automatically decrement CX (or ECX) and terminate the
loop (don't transfer the control) when CX (or ECX) is zero. It uses CX or ECX
whether the current code setting is 16-bit or 32-bit, but it can be forced to
us CX with the "loopw" mnemonic or to use ECX with the "loopd" mnemonic.


lazer1 wrote:

I got around that by replacing "loop label" by

sub cx, 1
jnz dword label

(I dont use "dec" as this code isnt speed critical, I
generally avoid the unusual opcodes of 16 bit. In fact
I will probably avoid loop in future as it is too complicated
to remember: does it loop if cx goes to 0 or from 0?
yes I know the answer is to 0, but I have to look that up
which wastes time. )


dec is supposedly slower on a P4 than sub anyways.
Post 31 Mar 2007, 03:12
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
rugxulo: Those are four different instructions:
Code:
loopw word label ; uses CX and IP, no prefix in 16-bit mode
loopw dword label ; uses CX and EIP, prefix 66h in 16-bit mode
loopd word label ; uses ECX and IP, prefix 67h in 16-bit mode
loopd dword label ; uses ECX and EIP, both 66h and 67h prefixes in 16-bit mode    

See also the announcement notes of the fasm's version that introduced the correction of jumps handling.

PS. When I write "uses IP", it means actually that high-order 16 bits of EIP get zeroed.
Post 31 Mar 2007, 03:51
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
You found the thread I was talking about Very Happy
Post 31 Mar 2007, 05:15
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.