the future of microsoft was assured when gates bought the rights to a computer operating system , improved it and then sold it to international business machines corp. for use with ibm 's then-revolutionary personal computer .