Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- struct
- {
- int a;
- int b;
- #ifdef PAD
- char pad[PAD];
- #endif
- } c;
- c.a = 1;
- c.b = 2;
- int Count = sizeof(c);
- void *Dest = &c;
- asm ("rep; stosb"
- : "+D" (Dest), "+c" (Count),
- "=m" (*(struct {int x[sizeof(c)];} *) &c)
- : "a" (0)
- );
- printf("%u %u\n", c.a, c.b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement