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 22 Feb 2009, 15:08
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: 20300
Location: In your JS exploiting you and your system
revolution 22 Feb 2009, 15:10
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: 4624
Location: Argentina
LocoDelAssembly 22 Feb 2009, 15:16
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 22 Feb 2009, 15:28
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 22 Feb 2009, 15:35
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: 20300
Location: In your JS exploiting you and your system
revolution 22 Feb 2009, 15:41
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: 20300
Location: In your JS exploiting you and your system
revolution 22 Feb 2009, 15:44
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



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 22 Feb 2009, 15:45
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



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 22 Feb 2009, 16:14
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: 20300
Location: In your JS exploiting you and your system
revolution 22 Feb 2009, 16:20
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: 4624
Location: Argentina
LocoDelAssembly 22 Feb 2009, 19:18
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: 20300
Location: In your JS exploiting you and your system
revolution 22 Feb 2009, 19:29
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 23 Feb 2009, 15:44
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.