It's a 8051 style microcontroller. Maybe one of the most used architectures. (Although I call it outdated and thus don't use it)
Reading a pin is a most basic task.
You really need to learn how to do internet search on your own (besides reading the datasheet).
A simple internet search "8051 read pin example" gives more than 1.5 million hits.
The first one links to keil.com: https://www.keil.com/download/docs/84.asp
I wonder how you can not find suitable information.