pushfifonode.c 426 B

12345678910111213141516
  1. #include <homescr.h>
  2. #include <error.h>
  3. __ATTR_LIB_C__ __HS_pushEmptyFIFONode__type__ __get_HS_pushEmptyFIFONode(void)
  4. {
  5. short *Ptr = (void*)HomePushEStack, *EndPtr = Ptr + 0x80;
  6. for (; (unsigned long)Ptr < (unsigned long)EndPtr; Ptr++)
  7. if (*Ptr == 0x4EBA) /* bsr */
  8. {
  9. Ptr++;
  10. void *Addr = (char*)Ptr + *Ptr;
  11. if (Addr != HS_newFIFONode)
  12. return Addr;
  13. }
  14. ER_throw (410);
  15. }