I need the header files conio.h, dos.h and all that to make it run in Keil Compiler.. Where do I get these?
Let's say I need to use the outportb() fn.. No, let's not say that --- because it would be 100% wrong. You don't need that function, full stop. Erik says this a little more often than it strictly applies, but in your case he's 100% correct: you have to stop thinking of the 8051 as a PC. It's not. Not anywhere near it, actually. You lost your direction in a major way. So, please: stop whatever you're doing. Immediately. Go back at least half the way to the origins of the project you're in, and triple-check every single decision you made. Make sure you actually understand the reasons for making each and every choice along the way.
You lost your direction in a major way I guess sniffing chlorine will do that. Erik