15 lines
280 B
C++
15 lines
280 B
C++
|
#include <iostream>
|
||
|
using namespace std;
|
||
|
|
||
|
|
||
|
extern "C" void asm_swap(void *a, void *b) asm("asm_swap");
|
||
|
|
||
|
|
||
|
int main() {
|
||
|
long a = 1, b = 2;
|
||
|
cout << "a = " << a << ", b = " << b << endl;
|
||
|
asm_swap(&a, &b);
|
||
|
cout << "a = " << a << ", b = " << b << endl;
|
||
|
return 0;
|
||
|
|
||
|
}
|