The answer is YES you can (look at my demo OS), but it requires a lot of knowledge.
The PE executable format is ready to run starting at the absolute location specified with the linker switch /BASE. Using the switch /SUBSYSTEM:NATIVE you can link your executable without any system library.
The switch /ENTRY allows you to define a start code entry point, but this address is only write in the PE header, without an underlying OS there is no automatic system to start your code. The most used technique is to "touch" your executable replacing the first bytes (and overwriting the PE header) with a small code that reads that start address and then jumps to it.
Up to here is the simple part. Now comes the difficult:
- The BIOS bootstrap loads just few sectors of disk in the specific area. You have to study the booting mechanism.
- The BIOS starts in X86 real mode, 16 bits segmented. The pellesC can compile only 32bits code. You have to switch the processor mode to use C, or program only in assembler. Setup the main memory pointers: stack, interrupts, etc.
- Switching the processor requires memory management (BIOS doesn't have any memory management, unless a minimal support for segmented code) and hardware management (errors etc.)
- BIOS support for video is minimal, no graphical support. You have to deal with video chip registers.
- Disk access in BIOS is limited to sectors access, no file system support. You have to write a file system code (driver) to access data.
In other words many hours of study and work without any debugger because there is no OS to handle debugging.
Another solution is to use one of the many open OS loaders that you can find around (LILO, GRUB) and hack them.
Good luck