This program switches off your DS. Yeah, that’s all to it. It was made after a request on the HKCC forum, where someone wanted to save wear and tear on the power button.
The important part is
IPC->aux |= BIT(6);
on the ARM9.
Thanks to ThomasS
No copyright. Use, modify and distribute as you wish.
poweroff.zip