ARDUINO code to C code.

byte ReadRAM(int address)
{ 
 
  digitalWrite(Rdpin,HIGH);

  digitalWrite(ALE,LOW);
  digitalWrite(ALE,HIGH);   
  
  DDRC=0xFF;
  DDRA=0xFF; 
  PORTC=highByte(address);

  
  PORTA=lowByte(address);  

  delayMicroseconds(5);
     
  digitalWrite(ALE,LOW);
 
  delayMicroseconds(5);
  
  DDRA  = 0x00;  
  PORTA = 0xFF;   
  
  digitalWrite(Rdpin,LOW);
  
  delayMicroseconds(5);

  z = PINA ;    
  PORTA = 0x00;  //High-Z
    
  digitalWrite(Rdpin,HIGH);
  DDRC=0xFF;
  DDRA = 0xFF;
  return(z);
} // End of READ routine

Hi guys,
this is my arduino code for reading a memory location and it is working fine.But now i want to run this code on keil.I am not able to find alternative for DDR,PORT and PIN functions.
any help would be helpful.
THANKYOU

Those items are hardware registers, specific to the AVR, you would have to read up on how to use the ports on an ARM CPU.

DDR for example is the data direction register. Each bit represents the mode of a pin (input or output), you'd need to find the equivalent to this.

Also there is a delay in there, if the RAM you are accessing requires very specific timing, you'll have to adjust for that as well.

I am using P89V51RD2 controller for reading external SRAM CY6264. Can i get a bit more specific help or document related to it.
thank-you.

Can i get a bit more specific help or document related to it.

You could, IF that was an Arduino. It isn’t, so asking for help with it here is not appropriate.

There you go.

Just switching IDE, framework and micro just isn't that simple...