Menu
Home
Create new Paste
Log in
SO-11491144 - D Inline Assembler: Access Static Variable
Code
Theme: cobalt
Theme: eclipse
Theme: elegant
Theme: monokai
Theme: neat
Theme: night
Theme: rubyblue
module so_11491144_cybershadow; // http://stackoverflow.com/questions/11491144/d-inline-assembler-access-static-variable import std.stdio; __gshared int A = 1234; void SetA() { asm { mov A, 5432; } } int main() { SetA(); writeln(A); return 0; }
Result:
Success
/
Return code: 0
/
Compilation time:
4.566
seconds
/
Run time:
0.135
seconds
Disassembly
Application output:
5432
Username
Message
Add comment
Paste info
Author:
dejan
Views:
208
Private:
no
Expires:
Never
Uploaded:
15.07.12 19:05
Tags:
inline
static
assembler
Votes
:
0
Tweet
Compilation
Compiler:
DMD 2.062
Pointer size:
m64
Actions
Download
Fork
Raw
×
Confirm
Are you sure you want to delete this paste?
There's no way back!
×
Confirm
Reason