AndreiMe
March 16th, 2009, 11:51 AM
so basically i have this program writen in borland c for dos
#include<dos.h>
#include<conio.h>
#include<stdio.h>
#include<iostream.h>
void interrupt (*old_09h)(...);
void interrupt new_09h(...)
{
unsigned short val = inportb(0x60);
printf("%x ",val);
old_09h();
}
void main()
{
clrscr();
old_09h = getvect(0x09);
setvect(0x09,new_09h);
delay(10000);
setvect(0x09,old_09h);
}
i want to convert it to be able to run on my ubuntu machine, so i can work for school without having to boot in windows.
i know that the first thing to is to remove the include<dos.h> and to add using namespace std; + #include<sys/io.h> but what next?
i searched for some help but didn't find any ?
:-s any help will be greatly appreciated. thanks
#include<dos.h>
#include<conio.h>
#include<stdio.h>
#include<iostream.h>
void interrupt (*old_09h)(...);
void interrupt new_09h(...)
{
unsigned short val = inportb(0x60);
printf("%x ",val);
old_09h();
}
void main()
{
clrscr();
old_09h = getvect(0x09);
setvect(0x09,new_09h);
delay(10000);
setvect(0x09,old_09h);
}
i want to convert it to be able to run on my ubuntu machine, so i can work for school without having to boot in windows.
i know that the first thing to is to remove the include<dos.h> and to add using namespace std; + #include<sys/io.h> but what next?
i searched for some help but didn't find any ?
:-s any help will be greatly appreciated. thanks