flat assembler
Message board for the users of flat assembler.
Index
> Main > Constraints on label characters |
Author |
|
kempis 01 Jan 2009, 00:08
Code: ABCDEFGHIJKLMNOP: QRSTUVWXYZ: abcdefghij: klmnopqrstuvwxyz: !@$%^?....!!!!: ;number dd 09,$56715,0.43536 ;symbol `~#&*()-+={}[]|,/\ ;Quote is valid if it's not first char yahghasghs'"'"'"'"'"'"'jdh^'"'"': ;I dont't check it, but I use FASMW syntax highlighting. Happy new year 2009... |
|||
01 Jan 2009, 00:08 |
|
bitRAKE 01 Jan 2009, 00:10
This thread might be relevant. @@ does have special meaning as a anonymous label - addressable through @F/@B.
|
|||
01 Jan 2009, 00:10 |
|
edfed 01 Jan 2009, 01:38
the only problem i see with fasm labels is:
Code: 1stboot: 2ndboot: 3Dengine: dd 4s,'44', 4s: it might be usefull to be able to give labels names starting with a number. |
|||
01 Jan 2009, 01:38 |
|
revolution 01 Jan 2009, 01:44
edfed wrote: it might be usefull to be able to give labels names starting with a number. Code: 1b: db 1b ;<---- is this a label or a number? |
|||
01 Jan 2009, 01:44 |
|
edfed 01 Jan 2009, 02:08
i don't see where is the problem there.
just do the number convertion first, if it is a valid number, it is a number else, it is probably a label or equate, and will be very usefull to define labels for floating point unit. 5dot0 dd 2.0 fld [5dot0] it was just a suggestion. |
|||
01 Jan 2009, 02:08 |
|
revolution 01 Jan 2009, 02:13
edfed wrote: just do the number convertion first, if it is a valid number, it is a number. |
|||
01 Jan 2009, 02:13 |
|
MattBro 01 Jan 2009, 02:30
For my purposes I'm happy if I can start with some ordinary readable english letters and then have it's suffix be the user defined operator. So maybe something like
op+=: I think there are problems with sequences that contain certain characters though like # or $$ etc. At least I notice the syntax highlighter start to go crazy when I use these things. |
|||
01 Jan 2009, 02:30 |
|
revolution 01 Jan 2009, 02:37
I think the best way to find out if your desired label syntax is valid is just to try it and see if it assembles for you. If it doesn't assemble then just try something else.
|
|||
01 Jan 2009, 02:37 |
|
edfed 01 Jan 2009, 02:41
a valid number should not be a label, it is evident.
but all the rest, like my dear 3dengine, or 3dprojection or 3dcircle etc, etc, cannot be used as labels. a number is always a number, but for the rest, it is something else. i use sometimes lables like this: Code: efx dd 0 mov eax,[efx] ... xx dw 0 mov ax,[xx] .. and it is not so confusing. for me. |
|||
01 Jan 2009, 02:41 |
|
bitRAKE 01 Jan 2009, 02:57
<SARCASM>
I think instruction mnemonics should be allowed as labels. mov: mov eax,mov What is wrong with that? </SARCASM> |
|||
01 Jan 2009, 02:57 |
|
revolution 01 Jan 2009, 03:08
Then our source code can look like this:
Code: eax dd 000O mov: mov eax,eax 3d: mov [mov],3d |
|||
01 Jan 2009, 03:08 |
|
MattBro 01 Jan 2009, 04:50
Yes the fact that this is disallowed is clearly a flaw in the assembler
lol. In fact it is clearly functional programming when you can use labels as instructions too. |
|||
01 Jan 2009, 04:50 |
|
MattBro 01 Jan 2009, 04:57
After trying to compile a few cases, it looks like most of the shift first row characters on my keyboard:
!@#$%^&* cause problems. e.g. here's one that does compile, Code: org(0) ooo dd "text",0 op$%: mov ax, ooo and here is one that does not: Code: org(0) ooo dd "text",0 op+=: mov ax, ooo _________________ -- ------------------------------------------------------- "I am the Way and the Truth and the Light, no one comes to the Father except through me" - Jesus --------------------------------------------------------- |
|||
01 Jan 2009, 04:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.