flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Problem with "dt" !

Author
Thread Post new topic Reply to topic
DarkLight



Joined: 21 Feb 2009
Posts: 10
Location: Armenia
DarkLight
Why FASM report an error in this code:
Code:
format MZ
entry code_seg:start; set entry point
stack 256
segment data_seg
; add your data here!
per_1 db 2,3,4,6,8,2
per_3 dt 9875645
segment code_seg
start:
; set segment registers:
mov ax,data_seg
mov ds,ax
mov es,ax
; add your code here
mov ax,4c00h
int 21h    

Here is a error message:
Code:
aram@linux-39o6:~/Documents> fasm PRG_8_2-DOS.asm
flat assembler  version 1.67.33  (16384 kilobytes memory)
PRG_8_2-DOS.asm [7]:
per_3 dt 9875645
error: invalid operand.    

With per_3 dt 9,8,7, ... there is no error message.
Post 22 Feb 2009, 15:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
Use a decimal point:
Code:
9875645.0    
Post 22 Feb 2009, 15:10
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
Quote:

With per_3 dt 9,8,7, ... there is no error message.

I have error message with FASMW.
Post 22 Feb 2009, 15:16
View user's profile Send private message Reply with quote
DarkLight



Joined: 21 Feb 2009
Posts: 10
Location: Armenia
DarkLight
strange, very strange...
Post 22 Feb 2009, 15:28
View user's profile Send private message Reply with quote
DarkLight



Joined: 21 Feb 2009
Posts: 10
Location: Armenia
DarkLight
LocoDelAssembly wrote:
Quote:

With per_3 dt 9,8,7, ... there is no error message.

I have error message with FASMW.

Try "per_3 dt 9,9,9,9,9,9" ...
Post 22 Feb 2009, 15:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
Looks like a fasm bug to me.

dt 9,9 ; ---> 09 00 00 00 00 00 00 00 09 00
Post 22 Feb 2009, 15:41
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
fasm manual wrote:
dt accepts the word and quad word value separated with colon, the quad word is stored first.
Looks like a comma separator also works.
Post 22 Feb 2009, 15:44
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
Yup, it's a bug.
The only valid syntax for this should be dt 9:9
Post 22 Feb 2009, 15:45
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
OK, the new release with this minor fix is done.
Post 22 Feb 2009, 16:14
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
Look at that folks, less than half an hour after confirmation of the bug and it is fixed.

v1.67.34 is there.
Post 22 Feb 2009, 16:20
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
haha, I see that an even number of arguments was required to trigger the bug then, I tested "per_3 dt 9,8,7".
Post 22 Feb 2009, 19:18
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
LocoDelAssembly: You didn't do enough testing Wink
Post 22 Feb 2009, 19:29
View user's profile Send private message Visit poster's website Reply with quote
DarkLight



Joined: 21 Feb 2009
Posts: 10
Location: Armenia
DarkLight
Great !
Thank you!
Post 23 Feb 2009, 15:44
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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.

Powered by rwasa.