ASM extensions

Hasan Aljudy hasan.aljudy at gmail.com
Thu Jul 13 03:20:50 PDT 2006



Walter Bright wrote:
> Gabe wrote:
> 
>> How difficult would it be to alter the inline assembler to accept 
>> paramter
>> arguments for new default syntaxes?  For instance, you could have 
>> something like
>> asm(intel) or asm(gas) or asm(arm) or asm(hal).  That way somebody could
>> progromatically decide the base style of the assembly syntax they were 
>> going to
>> use.  It doesn't seem to be internally inconsistent, as virtually all 
>> assembler
>> code should be written in 'version' tags anyway, as I see it.
> 
> 
> Very time consuming - you'd have to write whole new assemblers.
> 

You don't have to implement any of it, this could be a syntactic sugar.

for example,
asm(intel)
{
...
}

would be a shortcut for
version(intel)
{
asm
{
....
}
}



More information about the Digitalmars-d mailing list