Unless your program contains all the logic to deal with low-level interfaces on the Pi to deal with memory, I/O, etc., then your program won't run. That's what the operating system provides for you.
However if you want to learn how to do all those things yourself this is the right place to come for information and questions!
Check out the resources post on this forum for pointers. Most people start with Alex Chadwick's excellent introduction to bare metal assembly on the Raspberry Pi, called "Baking Pi", https://www.cl.cam.ac.uk/projects/raspb ... orials/os/