-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvolatile.cpp
More file actions
executable file
·38 lines (35 loc) · 864 Bytes
/
volatile.cpp
File metadata and controls
executable file
·38 lines (35 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* =====================================================================================
*
* Filename: volatile.cpp
*
* Description:
*
* Version: 1.0
* Created: 03/22/2019 14:25:04
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
#include <iostream>
using namespace std;
int main(int argc,char* argv[])
{
int i=10;
int a=i;
unsigned long ptr_number_1 = (unsigned long)&i;
unsigned long ptr_number_2 = 0;
cout<<a<<endl;
__asm__ __volatile__(
"movl -4(%ebp),80 \n" \
"movl -16(%ebp),-4(%ebp-4) \n" \
);
int b=i;
cout<<b<<endl;
cout << "number1" << ptr_number_1 << endl;
cout << "number2" << ptr_number_2 << endl;
}