flat assembler
Message board for the users of flat assembler.

Index > Main > Initializing 10 bytes to zero

Author
Thread Post new topic Reply to topic
Byte



Joined: 21 Mar 2026
Posts: 33
Byte 13 Sep 2026, 10:41
Why does the string
Code:
_PBCD_res       dt   0     

cause an error?
Code:
flat assembler  version 1.73.35  (1048576 kilobytes memory)
bosvars.asm [32]:
processed: _PBCD_res dt 0
error: invalid operand    


And the next line
Code:
_PBCD_res       dt   ?     

doesn't get on an error?
Post 13 Sep 2026, 10:41
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4614
Location: vpcmpistri
bitRAKE 13 Sep 2026, 11:04
From the manual ...
Quote:
dt accepts the word and quad word value separated with colon, the quad word is stored first. The dt directive with single expression as parameter accepts only floating point values and creates data in FPU double extended precision format.
... it covers two data types, and the question mark means to reserve space for.
Post 13 Sep 2026, 11:04
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: 21108
Location: In your JS exploiting you and your system
revolution 13 Sep 2026, 12:31
More specifically, to place zero do this:
Code:
_PBCD_res       dt   0:0    
Or this:
Code:
_PBCD_res       dt   0.0    
Post 13 Sep 2026, 12:31
View user's profile Send private message Visit poster's website Reply with quote
Byte



Joined: 21 Mar 2026
Posts: 33
Byte 13 Sep 2026, 14:19
Thanks, everyone.
But it’s strange—zero should be zero everywhere, regardless of whether it’s an integer or a floating-point number.
Post 13 Sep 2026, 14:19
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: 21108
Location: In your JS exploiting you and your system
revolution 13 Sep 2026, 14:42
There isn't any 10 byte integer format in x86. It is segment¹(16)+offset(64).

There is a 10 byte FP format in x86.

¹aka selector
Post 13 Sep 2026, 14:42
View user's profile Send private message Visit poster's website 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-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.