flat assembler
Message board for the users of flat assembler.
Index
> Main > flat assembler 1.71.23 Goto page Previous 1, 2, 3, 4 Next |
Author |
|
Tomasz Grysztar 27 Oct 2014, 16:46
idle wrote: Will it be able to solve what fasm does? Then fasm 2 could be a future x86-assembler based on fasm g, but I'm not thinking about it right now. idle wrote: Will it be reusable / mergeable, thus a one will be able use its source-facilities in hiw own project? idle wrote: Which life shpere is it intended to be? |
|||
27 Oct 2014, 16:46 |
|
l_inc 27 Oct 2014, 17:11
Tomasz Grysztar
Quote: it is more like a tiny "probe" sent to investigate new areas OK. That makes sense. Quote: There are also some very subtle differences related to empty values and comma placement Yes. Thanks. Such subtle things are good to have in mind, when choosing a tool from the existing feature set. Using the occasion I'd like to ask a question regarding your example from the first post: Quote:
Why is the value of x still zero at the beginning of the second pass? I mean, the initial prediction is "zero, undefined", then it's "zero, defined" at the beginning of the second pass, and only at the beginning of the third pass it's "-3, defined". Why isn't the predicted value -3 already at the second pass? Btw. you seem to reconcentrate on the high-level stuff, but do you still remember about (or have any plans on improving) more basic issues such as encoding? I mean, for example, Code: use64 org 100000000h lea edx,[0] that still doesn't compile (preferably into the eip-relative addressing, which is currently quite inconvenient to do in fasm). _________________ Faith is a superposition of knowledge and fallacy |
|||
27 Oct 2014, 17:11 |
|
Tomasz Grysztar 27 Oct 2014, 17:47
l_inc wrote: I mean, for example, |
|||
27 Oct 2014, 17:47 |
|
l_inc 27 Oct 2014, 18:20
Tomasz Grysztar
Quote: This construction is defined to generate RIP-relative encoding, so it is doomed to fail here by specification Well, if we nitpick a bit here, then the manual states, that instruction pointer based addressing is automatically generated, which could refer to ip/eip/rip. Quote: It perhaps should allow at least [eip-$] to work here I think, it does. The above instruction can be compiled with the following code: Code: use64 org 100000000h lea edx,[eip-@F and 0xFFFFFFFF+0] @@: But that's the inconvenience. Anyway, I think there are other encoding things I find questionable. I remember one about the encoding of positive immediates: Code: mov rax,$70000000 The encoding doesn't seem to be optimal. Does it make sense to put REX here? Moreover it would be functionally equivalent to encode that as Code: mov eax,$70000000 but I'm personally against optimizations that exceed the scope of mnemonic ambiguity. _________________ Faith is a superposition of knowledge and fallacy |
|||
27 Oct 2014, 18:20 |
|
l_inc 27 Oct 2014, 20:57
Tomasz Grysztar
Disregard my last remark about positive immediates. It was one of my old questions, but somehow I didn't realize before that taking away the REX would exactly be covered by my condition of exceeding the scope of mnemonic ambiguity. However I'm still curious about the justification of an additional pass described in my pre-previous post. _________________ Faith is a superposition of knowledge and fallacy |
|||
27 Oct 2014, 20:57 |
|
Tomasz Grysztar 27 Oct 2014, 22:22
l_inc wrote: Using the occasion I'd like to ask a question regarding your example from the first post: |
|||
27 Oct 2014, 22:22 |
|
l_inc 27 Oct 2014, 23:02
Tomasz Grysztar
Quote: you can experiment yourself by commenting out the piece of code that zeroes the value (it's just before the "expression_value_ok" label) Well, I still continue to avoid looking into the source code with all those stunning bare numbers , but that did the trick and saved one pass in fact. Your explanation however was perfectly enough to justify the output of my pass-tracing macros. Btw. I think it's also helpful to display the output of the display directive when exceeding the pass limit (the "code cannot be generated" error). _________________ Faith is a superposition of knowledge and fallacy |
|||
27 Oct 2014, 23:02 |
|
l_inc 03 Nov 2014, 06:03
Tomasz Grysztar
There's a bug in the interpretation of the inequality signs by the new feature: Code: macro x args& { common match a:b, args \{ y a display 13,10 b \} } macro y arg1*, arg2 { display arg1,13,10 match any,arg2 \{ arg2 \} } macro nothing {} x <'Hello',' ','World!'> : nothing What is enclosed within the inequality signs is expected to be passed as a single argument to the y-macro (producing the "Hello, World" output). Instead the lower-sign is thrown away and the invocation of the nothing-macro is corrupted. Besides, I'd also expect the following to compile correctly: Code: macro x [args] { common match a:b, args \{ a display 13,10 b \} } macro y arg1*, arg2* { display arg1,13,10 arg2 } macro z arg1*, arg2* { display arg1,13,10 arg2 } macro nothing {} x y '1', <z '2', display 'Hello!'> : nothing The expected result is same as when using the new feature instead of the group argument, but fasm's argument validation here is too restrictive. As long as the documentation does not clearly specify this behaviour, much better would be to eliminate all outer matching pairs of the inequality signs (no matter at which place of the corresponding argument and how often these pairs actually appear) and leave the rest as is for the normal case of a single argument processing. For the case of processing in a common block everything should be left as is, which is actually the current behaviour, unless fasm's restrictive validation causes a compilation error. _________________ Faith is a superposition of knowledge and fallacy |
|||
03 Nov 2014, 06:03 |
|
Tomasz Grysztar 03 Nov 2014, 09:52
l_inc wrote: The expected result is same as when using the new feature instead of the group argument, but fasm's argument validation here is too restrictive. As long as the documentation does not clearly specify this behaviour (...) If it was replaced with a mechanism that you propose, "x" macro would get three separate parameters, one being "<z '2'" and the other "display 'Hello!'> : nothing". Removing ":nothing" from the end would be enough to suddenly get two parameters instead of three - and while fasm's syntax is by many already considered quite confusing, I would prefer to not add to the confusion in such a way, hence more restrictions are needed. As I see it, you created another good example of why "&" feature is better suited for use with "match" and custom syntaxes. Well, it is going to be better suited - when I fix the bug. Thank you for the report! |
|||
03 Nov 2014, 09:52 |
|
l_inc 03 Nov 2014, 14:05
Tomasz Grysztar
Quote: The manual uses the "such argument should be enclosed" phrase, which I thought should be unambiguous enough. You are right. It is unambiguous with respect to the question: "What to do, if ... ?". But it doesn't answer the question: "What happens, if ... ?" — and hence leaves some free space for possible variations in the details. Quote: If it was replaced with a mechanism that you propose, "x" macro would get three separate parameters, one being "<z '2'" and the other "display 'Hello!'> : nothing" I can't follow the logic. The inequality signs should create a processing context, in which commata are not interpreted as argument separators. This would be pretty much like passing arguments through the (Windows) command line: it's specified everywhere, that you should enclose paths or other arguments with spaces within quotation marks. Like this: Code: "C:\Program Files\Internet Explorer\iexplore.exe" But in fact you can enclose the spaces only or whatever parts of an argument with the spaces: Code: C:\Prog"ram Files\In"ternet" "Explorer\iexplore.exe Both would run the Internet Explorer. This kind of processing would not stay in conflict with the current documentation, because it does not specify the behaviour that precisely. Quote: Thank you for the report! Thank you for following and answering the reports. _________________ Faith is a superposition of knowledge and fallacy |
|||
03 Nov 2014, 14:05 |
|
system error 03 Nov 2014, 14:12
Tomasz, how about F-Compiler to replace that FASM G? It sounds flat, full, futuristic, classic, low-level and most importantly sounds like a boss that nobody wants to mess up with!!
|
|||
03 Nov 2014, 14:12 |
|
revolution 03 Nov 2014, 14:28
Since we are suggesting alternative names:
fasm-junior: Code: C:\Documents and Settings\We are the Borg\Our Documents>fj MyUberProggy.asm flat assembler junior version 2.00.00 (1048576 kilobytes memory) 12 passes, 1.5 seconds, 442880 bytes. |
|||
03 Nov 2014, 14:28 |
|
system error 03 Nov 2014, 14:40
C'mon revo, we need to get rid of those traditional '...ASM' thingy.
F-compiler sounds like a boss. fasm-junior sounds like,well,,,, a baby's milk formula. |
|||
03 Nov 2014, 14:40 |
|
revolution 03 Nov 2014, 14:44
system error wrote: C'mon revo, we need to get rid of those traditional '...ASM' thingy. system error wrote: F-compiler sounds like a boss. |
|||
03 Nov 2014, 14:44 |
|
revolution 03 Nov 2014, 14:46
system error wrote: F-compiler sounds like a boss. |
|||
03 Nov 2014, 14:46 |
|
system error 03 Nov 2014, 14:48
revolution wrote:
too many "..asm" out there and it doesn't have to be that way anymore. e,g, A386 or what else I can't remember. You like milk because you are a SOCCER MOM!! LOL LOL! |
|||
03 Nov 2014, 14:48 |
|
revolution 03 Nov 2014, 14:54
system error wrote: too many "..asm" out there and it doesn't have to be that way anymore. e,g, A386 or what else I can't remember. system error wrote: You like milk because you are a SOCCER MOM!! LOL LOL! |
|||
03 Nov 2014, 14:54 |
|
system error 03 Nov 2014, 14:59
revolution wrote:
I took it that FASM G is a kind of experimental and not quite related to FASM line. I like the idea of having separate line to experiment new things, freeing Tomasz from current architecture limitations, like FASM's own calling convention etc etc ;-p F-compiler or something similar sounds appropriate. |
|||
03 Nov 2014, 14:59 |
|
revolution 03 Nov 2014, 15:05
revolution wrote: Actually it sounds like a compiler for the F language (whatever that is). https://en.wikipedia.org/wiki/F_%28programming_language%29 |
|||
03 Nov 2014, 15:05 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.