Archive for April, 2008

Mouse in TC++

Posted on April 24, 2008. Filed under: Programming | Tags: , , , , , , |

Want to use mouse in C/C++ in DOS ? This section gives the basics to use a mouse in the 16-bit DOS world using C. The graphics mode used here is 640x480x16 color.

We use the int86() function to handle interrupts. Lets start. Put the declarations below first in your mouse header file.

REGS I,O;

SREGS s;

int visible,state;

1. To initialize the mouse, the function reset is defined as follows.

int reset()
{
I.x.ax=0;visible=0;
int86(0x33,&I,&O);
return 1;
}

2. To show the mouse pointer

void show()
{
if(!visible)
{
visible=1;
I.x.ax=1;
int86(0x33,&I,&O);
}
}

3. To hide…

void hide()
{
if(visible)
{
visible=0;
I.x.ax=2;
int86(0x33,&I,&O);
}
}

4. Get status. Returns 0 for no event, 1 for left click, and 2 for right click

int status()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.bx;
}

5. Get X and Y coordinates

int x()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.cx;
}

int y()
{
I.x.ax=3;
int86(0x33,&I,&O);
return O.x.dx;
}

6. Restricting pointer to (x1,y1) – (x2,y2)

void restrict(int x1,int y1,int x2,int y2)
{
I.x.ax=7;
I.x.cx=x1;
I.x.dx=x2;
int86(0x33,&I,&O);
I.x.ax=8;
I.x.cx=y1;
I.x.dx=y2;
int86(0x33,&I,&O);
}

7. Placing pointer at a coordinate (x,y)

void place(int x,int y)
{
I.x.ax=4;
I.x.cx=x;
I.x.dx=y;
int86(0x33,&I,&O);
}

Now the mouse can be initialised by the following calls…

mouse.reset();
mouse.show();

Advertisements
Read Full Post | Make a Comment ( None so far )

Heat from data center to warm a pool!!!

Posted on April 9, 2008. Filed under: Perspective, Uncategorized | Tags: , , |

A new computer center in Switzerland is making novel use of the hot air thrown off by its servers and communications equipment: The heat is being funneled next door to warm the local swimming pool.

When computing companies talk about “greening” their energy-guzzling data centers, that usually means powering the centers with renewable sources or using more-efficient servers.

In a few cases, the heat produced by the computers is used to warm nearby offices. In what appears to be a first, the town pool in Uitikon, Switzerland, outside Zurich, will be the beneficiary of the waste heat from a data center recently built by IBM Corp. for GIB-Services AG.

As in all data centers, air conditioners will blast the computers with chilly air — to keep the machines from exceeding their optimum temperature of around 70 degrees — and pump hot air out.

Usually, the hot air is vented outdoors and wasted. In the Uitikon center, it will flow through heat exchangers to warm water that will be pumped into the nearby pool. The town covered the cost of some of the connecting equipment but will get to use the heat for free.

Read Full Post | Make a Comment ( None so far )

GRID

Posted on April 9, 2008. Filed under: Computers, Uncategorized | Tags: , , |

The Internet could soon be made obsolete. The scientists who pioneered it have now built a lightning-fast replacement capable of downloading entire feature films within seconds.

At speeds about 10,000 times faster than a typical broadband connection, “the grid” will be able to send the entire Rolling Stones back catalogue from Britain to Japan in less than two seconds.

The latest spin-off from Cern, the particle physics centre that created the web, the grid could also provide the kind of power needed to transmit holographic images; allow instant online gaming with hundreds of thousands of players; and offer high-definition video telephony for the price of a local call.

David Britton, professor of physics at Glasgow University and a leading figure in the grid project, believes grid technologies could “revolutionise” society. “With this kind of computing power, future generations will have the ability to collaborate and communicate in ways older people like me cannot even imagine,” he said.

The power of the grid will become apparent this summer after what scientists at Cern have termed their “red button” day – the switching-on of the Large Hadron Collider (LHC), the new particle accelerator built to probe the origin of the universe. The grid will be activated at the same time to capture the data it generates.

Cern, based near Geneva, started the grid computing project seven years ago when researchers realised the LHC would generate annual data equivalent to 56m CDs – enough to make a stack 40 miles high.

This meant that scientists at Cern – where Sir Tim Berners-Lee invented the web in 1989 – would no longer be able to use his creation for fear of causing a global collapse.

This is because the Internet has evolved by linking together a hotchpotch of cables and routing equipment, much of which was originally designed for telephone calls and therefore lacks the capacity for high-speed data transmission.

By contrast, the grid has been built with dedicated fibre optic cables and modern routing centres, meaning there are no outdated components to slow the deluge of data. The 55,000 servers already installed are expected to rise to 200,000 within the next two years.

Professor Tony Doyle, technical director of the grid project, said: “We need so much processing power, there would even be an issue about getting enough electricity to run the computers if they were all at Cern. The only answer was a new network powerful enough to send the data instantly to research centres in other countries.”

It means Britain alone has 8,000 servers on the grid system – so that any student or academic will theoretically be able to hook up to the grid rather than the internet from this autumn.

Read Full Post | Make a Comment ( None so far )

MinWin

Posted on April 8, 2008. Filed under: Computers |

A minimalistic variation of the Windows kernel, known as MinWin, is being developed for use in Windows 7. The MinWin development efforts are aimed towards componentizing the Windows kernel and reducing the dependencies with a view to carving out the minimal set of components required to build a self-contained kernel as well as reducing the disk footprint and memory usage. MinWin takes up about 25 MB on disk and has a working set (memory usage) of 40 MB. It lacks a graphical user interface and is interfaced using a full-screen command line interface. It includes the I/O and networking subsystems. MinWin was first publicly demonstrated on October 13, 2007 by Eric Traut. The demo system included an OS image, made up of about 100 files, on which a basic HTTP server was running.

Incidentally, the name MinWin was also used earlier to refer to what is currently known as Server Core in Windows Server 2008. However, the two are quite different. While both efforts are to consolidate and componentize the core of Windows, with server core, the functionality of the OS is constrained according to server roles, and unneeded components (which will never be used as the role isn’t supported) are removed from the binary image. However, the dependencies still exist in code, and the code cannot compile without the components. In contrast, with MinWin, the dependencies are consolidated into MinWin and what is not needed is removed at the code level itself. As a result, the code compiles even without any extraneous components and builds a stripped-down self-contained OS kernel image.

Read Full Post | Make a Comment ( None so far )

Windows 7

Posted on April 8, 2008. Filed under: Computers | Tags: , , |

Windows 7 (formerly known as Blackcomb and Vienna) is the working name for the next major version of Microsoft Windows as the successor of Windows Vista. Microsoft has announced that it is “scoping Windows 7 development to a three-year timeframe”, and that “the specific release date will ultimately be determined by meeting the quality bar.” Windows 7 is expected to be released sometime in 2010. The client versions of Windows 7 will ship in both 32-bit and 64-bit versions. A server variant, codenamed Windows Server 7, is also under development.

Microsoft is maintaining a policy of silence concerning discussion of plans and aspirations for Windows 7 as they focus on the release and marketing of Windows Vista, stating that Microsoft doesn’t want to promise features and then fail to deliver, though some early details of various core operating system features have emerged. As a result, little is known about the feature set, though public presentations from company officials have disseminated information about some features. Leaked information from people to whom Milestone 1 (M1) of Windows 7 was shipped also provide some insight into the feature set.

Windows 7 beta UI screenshots–

Windows 7 desktop

Music Library

” I will say that if you are impressed by the “touch features” in the iPhone, you’ll be blown away by what’s coming in Windows 7. Now if only we could convince more OEMs that Windows Touch Technology is going to drive their sales.”

Also, Bill Gates has said that Windows 7 is also “a big step forward” for speech technology and handwriting recognition.

All we can do is hope for the best. Microsoft, please make it right this time!

Read Full Post | Make a Comment ( None so far )

« Previous Entries

Liked it here?
Why not try sites on the blogroll...