Adapt this code to arduino

I have this C code and i would like to make changes on it so it could be adapted to arduino. but i don't know how. can someone help me?? thanks

// Compiler: Keil, Processor any 8051 core
#include <REGX51.H> // standard 8051 defines
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=- Hardware Defines -=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

char sbuffer[30], ch;
unsigned char pos;
unsigned char read1, read2, read3;

//receive serial character from serial port
char mygetchar(void)
{
char c;
while(!RI);
RI =0;
c = SBUF;
return SBUF;
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=- Main Program -=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void main()
{
// -=-=- Intialize variables -=-=-=
pos = 0;

// -=-=- Intialise Serial Port -=-=-=
//Sets up MCU to use 9600 bps @ 11.059 MHz Crystal
SCON = 0x52; // 8-bit UART mode
TMOD = 0x20; // timer 1 mode 2 auto reload
TH1= 0xfd; // 9600 8-n-1
TR1 = 1; // run timer1

// -=-=- Program Loop -=-=-=
while(1)
{
ch = mygetchar(); //loop till character received
if(ch==0x0A) // if received character is , 0x0A, 10 then process buffer
{
pos = 0; // buffer position reset for next reading

// extract data from serial buffer to 8 bit integer value
// convert data from ASCII to decimal
read1 = ((sbuffer[1]-'0')*100) + ((sbuffer[2]-'0')*10) +(sbuffer[3]-'0');
read2 = ((sbuffer[6]-'0')*100) + ((sbuffer[7]-'0')*10) +(sbuffer[8]-'0');
read3 = ((sbuffer[11]-'0')*100) + ((sbuffer[12]-'0')*10) +(sbuffer[13]-'0');

// Do whatever you wish to do with this sensor integer variables
// Show on LCD or Do some action as per your application
// Value of variables will be between 0-255

} else { //store serial data to buffer
sbuffer[pos] = ch;
pos++;
}
} // end while
}// end main

Read this: How to post to the forum .
Item 7 is the important one.

Then go and read Serial Input Basics and adapt the code from there.

This 8051 code doesn't seem to be doing anything more complex than parseInt().