#include "rom.h" xdef _sys_malloc _sys_malloc exg.a d1,c move.a c,r0 move.a b,c move.a c,r2 jsr restore_regs move.a r2,c jsr CREATETEMP bcs .fail move.a r0,c move.a c,d1 exg.a d0,c move.1 #7,p rtn .fail move.1 #7,p clr.wp c rtn ;; this is in the wrong place. need to reorganize real soon. xdef _sys_exit _sys_exit pop ; forget C caller move.a b,c move.a c,r0 jsr restore_regs move.a r0,c sub.a #5,d1 dec.a d move.a c,(d1) ; push object onto HP user stack move.a (d0),a add.a #5,d0 jmp (a) ; return to RPL (abort C program)