flat assembler
Message board for the users of flat assembler.
  
       
      Index
      > Compiler Internals > About 'fbld' | 
  
| Author | 
  | 
              
| 
                  
                   Tomasz Grysztar 06 May 2004, 11:54 
                  Yes, only floating point is allowed for "dt" (see docs), fasm integer expression calculator works on 64-bit values. You have to compose such value from smaller pieces, something like:
 
                  
                Code: label here tword dq 1234567876543210h dw 0000h ; four highest decimal digits Also some nice macro would be done...  | 
              |||
                  
  | 
              
| 
                  
                   Tomasz Grysztar 06 May 2004, 12:04 
                  Here's a sample macro:
 
                  
                Code: macro BCD name,value { label name tword virtual at 0 times 20 db '0' db `value qval = 0 wval = 0 repeat 16 load a byte from $-% qval = qval + (a-'0') shl ((%-1)*4) end repeat repeat 4 load a byte from $-16-% wval = wval + (a-'0') shl ((%-1)*4) end repeat end virtual dq qval dw wval } BCD here,12345678999999977773  | 
              |||
                  
  | 
              
| 
                  
                   BiDark 06 May 2004, 12:15 
                  Really wish an 'build-in' support (Masm has dt and real10 for this).
 
                  
                You'r really fast. Thanks!  | 
              |||
                  
  | 
              
< Last Thread | Next Thread >  | 
    
Forum Rules: 
  | 
    
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.