// Note: this program is not portable
#include <iostream>
int one = 2;
int two = 1;
void main()
{
    /*
    int tmp;
    tmp = one;
    one = two;
    two = tmp;
    */

    __asm push EAX
    __asm push EBX

    __asm lea EAX, one     ; EAX points to one
    __asm mov EBX, [EAX]   ; EBX gets one's value
    __asm push EBX

    __asm lea EAX, two     ; EAX points to two
    __asm mov EBX, [EAX]   ; EBX gets two's value

    __asm lea EAX, one     ; EAX points to one
    __asm mov [EAX], EBX   ; one gets two's value

    __asm lea EAX, two     ; EAX points to two
    __asm pop EBX          ; EBX gets one's value
    __asm mov [EAX], EBX   ; two gets one's value

    __asm pop EBX
    __asm pop EAX

    std::cout << " one = " << one;
    std::cout << " two = " << two;
}