[Issue 474] New: in ASM block last line can't be a label

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Nov 1 21:24:31 PST 2006


<d-bugmail at puremagic.com> wrote in message 
news:bug-474-3 at http.d.puremagic.com/issues/...
> asm
> {
>   jmp label1;
>   mov EBX,EAX;
> label1:
> }
>
> when i have label in the last line of my asm block would make the compiler 
> fail
> to compiler it

Just put a semicolon after the label.  The same thing applies with regular D 
code -- a label must be followed by a statement, even if it's the empty 
statement.

> and i wonder how can this kind of hack being done
> asm
> {
>        mov label1, EAX;  //modify the code to get it run differently
> label1: dw 00;
> }
>
> and also if i have a array item i want i can get the address directly
> asm
> {
>       mov ax, myarray[1];
> }

Those I can't help you with :\ 





More information about the Digitalmars-d-bugs mailing list