flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [sug] Underscores within numbers to improve readability

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



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 03 Apr 2008, 20:31
edfed wrote:
i totally agree. i seek an explanation to azerty. and finally, i don't find any as well as for qwerty..
keyboard would be much simpler with abcde. but in the old ages of type machines, this great and wonderfull industrial revolution, some theoricians emit the layout, probably they argue with some freud theory... but as a result, informatics seems to be an obscure science to when you see the keyboard for the first time.

i tryed to change it's layout to abcde, and i didn't find it harder to type.


I don't use it, but you may wish to read about Dvorak.
Post 03 Apr 2008, 20:31
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 24 Aug 2008, 05:18
rugxulo wrote:

P.S. Octasm and Ada (EDIT: and NASM!) allow underscores, IIRC.

well, I think fasm needs to support quotes inside numbers.

Who starts a poll?

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 24 Aug 2008, 05:18
View user's profile Send private message Reply with quote
vador



Joined: 12 Nov 2006
Posts: 68
Location: Madagascar
vador 26 Aug 2008, 19:58
how about just writing a preprocessor for fasm sources?
Post 26 Aug 2008, 19:58
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 26 Aug 2008, 20:28
vador wrote:
how about just writing a preprocessor for fasm sources?
Oh, that would be hell. Having to run another program before running fasm! The task would be very complex, especially with things like macros and equ.
Post 26 Aug 2008, 20:28
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4347
Location: Now
edfed 18 Sep 2008, 21:50
and is it possible to make this?
where to put the modification?
parser?
assembler?
???
??
Code:
        mov dword[si+bx],0:7c00h
    
Post 18 Sep 2008, 21:50
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 19 Sep 2008, 10:39
Using ":" is bad idea, because of segment:offset addressing. But place to put such modification is "tokenizer", (the part of code which turns ASCII line to list of tokens, before preprocessing)
Post 19 Sep 2008, 10:39
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 19 Sep 2008, 10:47
No, not really. If you want to use "_" character for such purpose, as it is not a special one, you can make this change directly in the get_number routine. In fact I plan to do it for the next release.

It would also work with quotes the same way - quotes in places other than beginning of a token (where they mean the quoted text token) are not treated specially in fasm.
Post 19 Sep 2008, 10:47
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: 20363
Location: In your JS exploiting you and your system
revolution 20 Dec 2008, 12:23
Tomasz Grysztar wrote:
No, not really. If you want to use "_" character for such purpose, as it is not a special one, you can make this change directly in the get_number routine. In fact I plan to do it for the next release.
Yay, so 1.67.29 will have this! Great Smile


Code:
dq 0x12_34_56_78_90_ab_cd_ef    
Quote:
flat assembler version 1.67.29 (100000 kilobytes memory)
underscore_constant_test.asm [1]:
dq 0x12_34_56_78_90_ab_cd_ef
error: invalid name.
Sad
Post 20 Dec 2008, 12:23
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 13 Feb 2009, 10:30
revolution wrote:
Tomasz Grysztar wrote:
No, not really. If you want to use "_" character for such purpose, as it is not a special one, you can make this change directly in the get_number routine. In fact I plan to do it for the next release.
Yay, so 1.67.29 will have this! Great Smile

Ooop, I forgot to put that in. Smile
However, I've now implemented it with the single quote character instead of underscore. With underscores it looked a bit too much like "fill in the blanks" for me.
Post 13 Feb 2009, 10:30
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: 20363
Location: In your JS exploiting you and your system
revolution 13 Feb 2009, 11:06
I await with baited breath.
Post 13 Feb 2009, 11:06
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: 20363
Location: In your JS exploiting you and your system
revolution 13 Feb 2009, 11:34
Folks, Tomasz hasn't announced it, but it is now included in 1.67.32.
Post 13 Feb 2009, 11:34
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: 20363
Location: In your JS exploiting you and your system
revolution 13 Feb 2009, 11:36
Of course one problem with the single quote is that my editor thinks I have strings in my numbers!
Code:
dq 0x12'34'56'78'90'ab'cd'ef    
Looks weird for me, but okay on this phpBB board.
Post 13 Feb 2009, 11:36
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 13 Feb 2009, 13:05
revolution wrote:
Looks weird for me, but okay on this phpBB board.

This board's syntax highlight mimics the one from fasmw/fasmd, which is very closely reflecting fasm's parser.
Post 13 Feb 2009, 13:05
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: 20363
Location: In your JS exploiting you and your system
revolution 13 Feb 2009, 13:09
This is what I see in Notepad2


Description:
Filesize: 2 KB
Viewed: 9869 Time(s)

QuotesInNumbers.PNG


Post 13 Feb 2009, 13:09
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 15 Feb 2009, 14:31
revolution wrote:
This is what I see in Notepad2
Image


Fault of NP2 and 1'000'000'000'000 thanks to Tomasz for this feature with apo's Smile It even looks well in my IDE based on 1.67.29 also (doesn't compile, heh), in 1.67.32 it also seems to compile. Smile Let's hope it doesn't break anything Rolling Eyes
Post 15 Feb 2009, 14:31
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Feb 2009, 16:08
If apostrophe was added, I think due to already mentioned problems it would be wise to add underscore too. It would be stupid to keep fasm so deliberately separated from every "standard" tool.
Post 15 Feb 2009, 16:08
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 15 Feb 2009, 16:17
vid wrote:
If apostrophe was added, I think due to already mentioned problems it would be wise to add underscore too. It would be stupid to keep fasm so deliberately separated from every "standard" tool.
I had already decided to do this for fasmarm. The underscore is used almost everywhere else and I didn't want to force people to edit all the constants when copying source code.
Post 15 Feb 2009, 16:17
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 16 Feb 2009, 08:18
vid wrote:
It would be stupid to keep fasm so deliberately separated from every "standard" tool.


Then we must have assume and offset in FASM and delete format and store and much more.

Also, we must delete support for $ as prefix for hex as well as 0x and 0X prefixes and keep h suffix only. Also, the flat design has to be replaced by mess-it-around design.

BTW:

1. NASM rejects not only $FFFF'FFFF but also $FFFFFFFF ... it requires $0FFFFFFFF
Image

2. M.A.S.M. AFAIK rejects $0FFFFFFFF also ... only FFFFFFFFh is tolerable there Laughing
Post 16 Feb 2009, 08:18
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.