Re: from elsewhere, an assembler




"Betov" <betov@xxxxxxx> wrote in message
news:XnF990A64218AEA6betovfreefr@xxxxxxxxxxxxxxx
Betov <betov@xxxxxxx> écrivait news:XnF990A5D72965DDbetovfreefr@
212.27.60.40:

the semicolon is space-sensitive so:
push ebp; mov ebp, esp

is parsed as 2 instuctions (the semicolon is regarded as a seperator
here).

however:
push ebp ;mov ebp, esp

is parsed as a single instruction followed by a comment.

Oh! I skipped over this. And what of:

push ebp ; mov ebp, esp
push ebp;mov ebp, esp


? A "semi-comment" and an "half-comment" ?


the former will be parsed as a comment (only prefix space is considered in
this case).

the later will be parsed as globbed instructions.


:))

This is... terrible, in my opinion, and particulary absurd.
A kind of "Anti-Flexibility" performance.


I don't see what the big deal is really.


in many of my languages, I have made use of similar rules (where and how
whitespace is present, ...) wrt, for example, expression parsing,
distinguishing between function calls and definitions, ...


{foo: 1 2 -1 x*y}

fib(x)
if(x>2)fib(x-1)+fib(x-2) else 1;

foo(x)
bar(y)
vs:
foo(x)
bar(x)

....


intuitively, these things may seem rather distasteful, but IME they tend to
work out fairly well in practice...



Betov.

< http://rosasm.org >






.



Relevant Pages

  • Re: from elsewhere, an assembler
    ... push ebp; mov ebp, esp ... is parsed as 2 instuctions (the semicolon is regarded as a seperator ...
    (alt.lang.asm)
  • Re: disassembly questions
    ... > _random PROC NEAR ... > mov ebp, esp ... at [esp+4]. ...
    (comp.lang.asm.x86)
  • Re: Learning assembly
    ... mov ebp, esp ... conceptually, but what I don't quite grasp is the "mov ebp, esp" ... the parameters are located at a place pointed to by esp at entrance into your routine. ...
    (comp.lang.asm.x86)
  • Re: newbie questions
    ... mov ebp, esp ... so we're past push ebp. ... Now "mov ebp, esp" - what does that do? ...
    (alt.lang.asm)
  • Re: from elsewhere, an assembler
    ... push ebp; mov ebp, esp ...
    (alt.lang.asm)