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

Lionello Lunesu lio at lunesu.remove.com
Thu Nov 2 06:15:59 PST 2006


d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=474
> 
>            Summary: in ASM block last line can't be a label
>            Product: D
>            Version: 0.173
>           Platform: PC
>         OS/Version: Windows
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: DMD
>         AssignedTo: bugzilla at digitalmars.com
>         ReportedBy: davidl at 126.com
> 
> 
> 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
> 
> 
> 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;
> }

Or,
label: nop;

> and also if i have a array item i want i can get the address directly
> asm
> {
>        mov ax, myarray[1];
> }

I think you'd want "lea eax, myarray[1]".

L.



More information about the Digitalmars-d-bugs mailing list