// BitEksperimenter.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <conio.h>

using namespace std;

unsigned short c1 = 8;
short c2;
short c3;
short c4;
unsigned short c9;

int _tmain(int argc, _TCHAR* argv[])
{
	cout << "c1: " << c1 << endl;
	c9 = ~c1;
	cout << "~c1: " << c9 << endl;
	__asm
	{
		mov c2,0x1a;
		mov c3,-11;
		mov c4,0x081;
		push ax;
		mov ax,c2;
		add ax,c3;
		mov c3,ax;
		pop ax;
	}
	cout << "c2: " << c2 << endl;
	cout << "c3: " << c3 << endl;
	cout << "c4: " << c4 << endl;
	for (int i = 0; i < 16; i++)
	{
		if (c4 < 0)
			cout << "1";
		else
			cout << "0";
		c4 = c4 << 1;
	}
    getch();
	return 0;
}

