doors.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef DOORS
  2. #define DOORS
  3. #ifdef NOSTUB
  4. #error "doors.h" must not be included in "nostub" mode!
  5. #undef DOORS
  6. #else
  7. #include <default.h>
  8. #define __REDEFINE_ALL_ROM_CALLS
  9. #include <romsymb.h>
  10. /* Begin Auto-Generated Part */
  11. #define _ram_call_addr(ind) (&_RAM_CALL_##ind)
  12. #define _ram_call(ind,type) ((type)(&_RAM_CALL_##ind))
  13. /* End Auto-Generated Part */
  14. extern void
  15. _RAM_CALL_0,_RAM_CALL_1,_RAM_CALL_2,_RAM_CALL_3,
  16. _RAM_CALL_4,_RAM_CALL_5,_RAM_CALL_6,_RAM_CALL_7,
  17. _RAM_CALL_8,_RAM_CALL_9,_RAM_CALL_A,_RAM_CALL_B,
  18. _RAM_CALL_C,_RAM_CALL_D,_RAM_CALL_E,_RAM_CALL_F,
  19. _RAM_CALL_10,_RAM_CALL_11,_RAM_CALL_12,_RAM_CALL_13,
  20. _RAM_CALL_14,_RAM_CALL_15,_RAM_CALL_16,_RAM_CALL_17,
  21. _RAM_CALL_18,_RAM_CALL_19,_RAM_CALL_1A,_RAM_CALL_1B,
  22. _RAM_CALL_1C,_RAM_CALL_1D,_RAM_CALL_1E,_RAM_CALL_1F;
  23. #ifndef _GENERIC_ARCHIVE
  24. _INCLUDE_PATCH(__kernel);
  25. #ifdef USE_PREOS_COMPRESSED_TABLES
  26. _INCLUDE_PATCH(__preos_headers);
  27. #endif
  28. #ifdef RETURN_VALUE
  29. #define __str(x) #x /* A set of nasty hacks with preprocessor */
  30. #define __xstr(x) __str(x) /* based on some very specific features */
  31. #define __var(x) x##1
  32. #define __xvar(x) __var(x)
  33. #if __xvar(RETURN_VALUE)
  34. _INCLUDE_PATCH(__doors_retval);
  35. #else
  36. _INCLUDE_PATCH(__doors_retval_var);
  37. asm("\n"
  38. " /* RETURN_VALUE <variable> Extra Support */\n"
  39. " .xdef __retval_var_name__\n"
  40. " .byte 0\n"
  41. " .ascii \""__xstr(RETURN_VALUE)"\"\n"
  42. "__retval_var_name__:\n"
  43. " .byte 0\n"
  44. " .even\n"
  45. " ");
  46. #endif
  47. #undef __str
  48. #undef __xstr
  49. #undef __var
  50. #undef __xvar
  51. #endif
  52. #if defined(ENABLE_ERROR_RETURN)
  53. __INCLUDE_PATCH(__special_error_return_support);
  54. #endif
  55. #ifdef COMMENT_STRING
  56. char _comment[] = (COMMENT_STRING);
  57. #endif
  58. #endif
  59. #endif
  60. #endif