Doc Comments /
IAsm
Difference (last change) (no other diffs, normal page display)
Deleted: 72,182d71
Inline Assembler
More Information
CMPXCH8B vs. CMPXCHG8B
Why is the op-code named CMPXCH8B and not CMPXCHG8B? -- ThomasKühne
Operand Types: AsmTypePrefix
The section "Operand Types" does not contain the keyword "qword ptr". This keyword is required even for 32bit machines. Some MMX instructions take arguments of this type!
Did I miss something?
from NG:digitalmars.D/31469 by Tiago Gasiba
Note: qword ptr also seems to work as double ptr.
Accepting Different Styles of the Assembly Syntax
Q: How difficult would it be to alter the inline assembler to accept parameter 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. (based on NG:digitalmars.D/40249)
A: Very time consuming - you'd have to write whole new assemblers. ( NG:digitalmars.D/40251)
Non-usable Data Definition Keywords
- db - define byte
- dw - define word
- dd - define double word
- dq - quad word
- etc.
What about assembly functions?
How about something like :-
![]() |
|
The compiler handles the function call handling but the body of the function is pure assembly. This saves the tedious bit of handling the function call which is normally fairly fixed and lets you focus on the assembly implementation. It also provides a small amount of implementation independence.
How would this be different from the below code? ThomasKühne
![]() |
|
Message
Add your comments here...
Links
Corresponding page in the D Specification
- Examples: