Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
i know Tim'sMobius shell can do it, through BIOS calls.
Afaik, that feature is motherboard dependent, and i don't think there is a standardized technique to shut the system down but using BIOS interrupts (thus yes, either go back to realmode or support V86)
You may use APM interrupts to shutdown. If you check posts I have posted a whole code for shutting down computer using APM interrupts.
Int 15/AX=5300h - APM v1.0+ - INSTALLATION CHECK
Int 15/AX=5304h - APM v1.0+ - DISCONNECT INTERFACE
Int 15/AX=5301h - APM v1.0+ - CONNECT REAL-MODE INTERFACE
Int 15/AX=5307h - APM v1.0+ - SET POWER STATE