26 #ifndef __rom_system_h__ 27 #define __rom_system_h__ 46 bset #7,@0xc4:8 ; software standby mode\n\ 47 jsr @ power_off ; ROM call\n\ 57 jsr @ power_init ; ROM call\n\ 58 bclr #7,@0xc4:8 ; disable software standby\n\ 64 extern void reset(
void) __attribute__((noreturn));
67 extern inline void rom_reset(
void) __attribute__((noreturn));
77 #endif // __rom_system_h__ void power_off(void)
enters software standby mode.
void rom_reset(void) __attribute__((noreturn))
turns off interrupts, then issues reset.
void disable_irqs()
disable interrupt processing
__asm__("\n\
.text\n\
.globl _atomic_inc\n\
_atomic_inc:\n\
stc ccr, r1h ; save flags\n\
orc #0x80, ccr ; disable all but NMI\n\
mov.b @r0, r1l\n\
inc r1l\n\
mov.b r1l, @r0\n\
ldc r1h, ccr ; restore flags\n\
rts\n\
")
void power_init(void)
disables software standby mode so tm_idle_task() can use the sleep
Internal LNP Interface: RCX redirected IRQ vectors.
void reset(void) __attribute__((noreturn))
erases BrickOS, returning control to ROM.